Solved

looking for feedback on developing a WCF Client/server application

Posted on 2014-09-18
8
260 Views
Last Modified: 2014-09-19
Hello,
I am trying to design and develop a simple WFC service which will do the following:

The Server application will wait for messages from the Client containing a Company name & a 10 digit transaction code. The initial company will be 000 and the initial transaction code for all users will be "LOGIN" and when this is received by the server program it will load up the transaction lines associated with Login. The "Login" transaction will send a request back to the client for Username and password.  If a Valid Username and Password entered then the user's company name and user's Initial menu will be retrieved from the Customer master  file (eg "101" and "INITMENU1" ) and this will be passed to the server program for processing. The various options within "InitMenu1" will return other transactions codes which will in turn be processed when selected by the user etc etc...

Company   Transaction
000            LOGIN
101           INITMENU1
101           SFCMENU1
101           PICKLIST01

I am new to C# and client/server applications and would appreciate any feedback/suggestions on the above design concept.  Is there any sample or skeleton WCF applications out there that I can build on ?

regards
Pat
0
Comment
Question by:pclarke7
  • 4
  • 3
8 Comments
 
LVL 25

Expert Comment

by:apeter
ID: 40332687
Basically the requests are disconnected in wcf service. From your scenario, the is a session maintained between the request like a web site.

Wcs is a service and will serve the requests. It will not request a client for something  unless they are duplex wcf service.

Please provide more information on above so that it will be helpful in creating a client.
0
 

Author Comment

by:pclarke7
ID: 40333164
Thanks for the reply,
I understand that both the server and the client run independently of each other but for example on a web site when you take an option ("Search" for example) then the server will process the search request from the client and when the results of that request are complete the client will "React" by displaying the results.

Take a simplified transaction DISPRATE as follows:
Seq Type  command          
1     TAG   Start
2     CON  Set base currency as 'EUR'
3     LOG   retrieve today's exchange rates
4     OUT   Display "Please enter your currency"
5     INP    Input Currency
6     OUT  Display "Your exchange rate is &Rate"
7     LOG  goto start

In this example the client will pass the transaction code DISPRATE to the server program which will load and run the transaction. The transaction has various type of statements, (Tag, Constants,Logic, Decision, Input,Output etc..). When transaction gets to an INPUT statement (INP) then it will exit the Server application passing back the data which it has collected (Such as the Display information which the client should display).  The client is used to gather Input information for the transaction. After the client Inputs the currency then the server will be called again for transaction DISPRATE and will pass the input information to the server application (ie USD ). The server will then resume the transaction at the next line (Seq  6).

Hopefully this explains the concept of what I am trying to achieve. If there is a better way of achieving this other than using WCF, then I am certainly open to suggestions. The only condition is that it has to be a web based solution.

regards
Pat
0
 
LVL 80

Expert Comment

by:David Johnson, CD, MVP
ID: 40333193
your example has them on the same page and by doing a post-back you are seeing the results. there is state here.

one normally uses an api ley for authentication.  and you would use a soap or rest interface between them.
i.e. you would send the request including the api key and the command you want results for, then the service would process the request and return the data.
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:pclarke7
ID: 40333501
Hi David,
thanks for your comments.  Unfortunately most of what you have said is unfamiliar to me. At this point i need 3 things.

1. Confirmation that a WCF service is either suitable, or not suitable,  for what I am trying to achieve.
2. A simple example which demonstrates a client making a request of a server, the server processing the request and the client reacting to the completed request.
3. Someone to point me towards relevant documentation that will help me

regards
Pat
0
 
LVL 80

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 40333525
0
 

Author Comment

by:pclarke7
ID: 40333620
Thanks David,
one last question - do you think that WCF is suitable what what I am trying to do ? - or is there something else I should be looking at

regards
Pat
0
 
LVL 80

Expert Comment

by:David Johnson, CD, MVP
ID: 40333632
since I really don't know what you want to do ultimately the choice is yours.. one advantage is that your service can be called via many methods i.e. iphone/android/WP app, Console/Desktop App, WebSite
0
 

Author Closing Comment

by:pclarke7
ID: 40333673
Thanks David
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question