How to Develop a Client Server Application
Client Server applications are widely used, both on the Web and within internal organization networks. Client Server applications work on the basis that the data and application logic lies on a Server and is made accessible to Clients using multiple other computers on the same network. This means that a Client Server application will normally involve creating a number of linked components. A database, an interface for users to access the data at Client side, and code connecting these are the main elements in a Client Server application. Depending on the overall purpose of your application, there may be other additional elements.
Instructions
-
-
1
Design and build your database. You can create a database using free or commercial software. If your Client Server application is going to be used over the Web, you can use systems such as MySQL. Depending on your Web host, you may have access to free tools such as phpMyAdmin, which make building a database far easier. Design your database from an abstract level first, using Entity Relationship modeling if your database is Relational. Come up with a good design before you start actually building the database, as the end result will be more efficient. Create your database, either using an interface for your chosen Database Management System, or by running an SQL script. (See References 1)
-
2
Connect to your data. For a Web application, you should use Server Side programming to connect to your data. If your Client Server application is going to be run on the Desktop, you may be able to connect to the data and build your user interface within the same program, using the same programming language, for example if you're working in Java. Client Server applications on the Web commonly use languages such as PHP and ASP to connect to their databases, carrying out queries and updates. The most common model is one in which these Server Side scripts connect to the data and write out HTML, sending this to the Web browser as part of the Client interface. (See References 2)
-
-
3
Build your Client interface. If your application is on the Web, your interface should typically be built using HTML. On the desktop, a language such as Java may be used to both connect to the data and build the Client interface at the same time. If you are using PHP or ASP on the Server, you can either use your Server Side scripts to write out HTML content as they run, or alternate the Server Side scripting with HTML content. Either way, your HTML will need to provide an interface for users to interact with your application. The set of tasks that your users need to be able to perform should be facilitated by the HTML interface. Typically, this will include forms allowing users to query, add to and update the data. (See References 3)
-
4
Style your interface. Your Client interface will be more effective if it is styled appropriately. For Internet applications, you can use CSS files and images to achieve this. If your application is for a specific organization, it may require predetermined styling that fits in with their branding image. Your images and CSS declarations will normally be stored on the Server. For CSS, you can include style properties within the HTML content, or in separate files linked from the HTML. (See References 4)
-
5
Enhance your interface with Client Side scripting. If your application is going to be accessed from a Web browser at the Client Side, you can use languages such as JavaScript to enhance it. As well as making the interface more visually appealing, when done correctly, Client Side scripting can make an interface more usable. Use JavaScript to carry out styling effects and to aid user interaction. A common use for Client Side scripting is within forms that capture user input, with JavaScript used to validate what the user has entered. (See References 5)
-
1
Tips & Warnings
Build your Client Server application one component at a time. Try not to worry about how you will connect the parts together until you have developed each of them in turn. Once you have finished, make sure you test the application thoroughly.
Try to be sure you are not connecting to your database unnecessarily. Reduce the number of times your application has to connect to the Server where possible, as this minimizes both network traffic and the likelihood of data being lost or corrupted along the way.
References
Resources
- Photo Credit Server world image by Satan from Fotolia.com