Link to home
Start Free TrialLog in
Avatar of pclarke7
pclarke7

asked on

Advise on developing a C# Client Server application

Hello,
I am looking to develop a C# Client Server application which will be used to process inputs from barcode scanners on a factory floor and also from interfaces. This will require the Server program to accept input interactively from a user or via a batch file from an interface. I would like the Server to be a windows service and for it to implement logging and plug & play functionality to enable new logic to be added without requiring a new implementation of software.

I am looking for:

(a). Some good examples of Client/Server skeleton applications which implement either logging and/or plug & play that I can take some inspiration from and to enable me to build a solid foundation.

(b). Any tips/advise in developing a client/server application in c#    

regards
Pat
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

Why a server as a Windows Service? A server is usually on a remote system. A Windows Service runs locally.

As far as the server side is concerned, you are probably looking more at a web service or Windows Communication Foundations application (WCF).

And plug & play is usually associated with hardware, not software. Unless you do a very bad choice of scanner, you can almost be sure that it will be plug & play, which means that it will be recognized by Windows if it connects to a computer with any type of standard cable.

This being said, the first place to look is with the provider of the scanners. The scanner will be communicating with your system in some way. So how you design your server is in part dependent on the scanner itself. You thus need to know the characteristics of the scanner communication system, and possibly on the software that the scanner manufacturer provides with its hardware.

Will the scanner be communicating with your server through Wi-Fi, a http connection or will it be connected to a portable Windows station that will be used to communicate with the server?

If through WiFi or http then you probably need a service (not Windows service which is not the same thing) as a link between the scanner and your database.

If it is through a Windows station, the thing won't need to run when the scanner is not used, and then there is not need for a Windows Service. A standard Windows Application will be sufficient, easier to write, and will enable you to create your interfaces, something that a Windows Service cannot do. The application might then be able to write directly to the database through your network, or might need a service if you do not connect through the network.

So before you start thinking about the design or your software, you need to think about the organization of the hardware and the communication, and this is controlled in part by the type of scanner you will be using.

Client/server is nice. But since there can be many different types of clients, many different types of server and many different ways to communicate between them, there is no such thing as a universal "Client/Server skeleton applications".
Avatar of pclarke7
pclarke7

ASKER

Hi James,
Thanks for your comments. You raise a number of valid points so let me select some of these that require clarification.

Hardware configuration:
The Server application will be run on a remote application server with it's database situated on a separate SQL server.

The Client application will run on
(a). barcode scanners communicating through a Wi-Fi connection.
(b). on std windows platform with users inputting manually or via wedge scanners
(c). To cater for interfaces where there is no requirement for manual or scanned inputs the Server application will receive the interface input via a batch input file. So the Server job will be listening for inputs from 2 different sources, User input & interface input.

Windows Service Application V WCF
I don't understand why you say the server application could not run as a windows service application on the remote application server ? Can you explain why ?

I thought that WCF was more for  web services.
Question 1:
What are the advantages of running a WCF service application over a Windows service application

Plug & Play
When I talk about plug & play I am referring to the ability of adding additional functionality to the server application without having to modify/recompile the application. The server application will be driven be a series of rules & commands which can be configured into transactions. To give you a simple example , one of the commands that a transaction might utilize could be, RTV-NXTNBR, which would retrieve the next available unique number from a designated next number file. I want the user to have the capability of adding their own commands (eg. RTV-NXTNBR2) along with the code that the command is to execute and have the application pick up and execute this new command without have to re-compile the application.

I would still like to see some sample code for Window service applications. I know that there is no such thing as a universal "Client/Server skeleton application". I am just lloking for "Some" examples and I can then pick and chose elements that I want to incorporate.  
 
regards
Pat
ASKER CERTIFIED SOLUTION
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks James,
for your excellent information on Client/Server. I will certainly now look at WCF in a lot more detail

Pat