Most applications today are 3-tier applications. There are 3 layers:
1. The presentation layer : For example, in a web-based application, the presentation layer is the website itself. It's what the clients can see and interact with.
2. The Business Logic Layer : The logic behind our application. Defined in the server computer.
3. The Data Access Layer : Defines how we access data in the database.
I have once built a simple client-server program using Java and Sockets. It worked excellent from within the home network (under the same router) and even with multiple computers mimicing different clients. However, when I tried to use it from outside of
the home network, the client just couldn't access the server. I have tried everything within my power, including trying to conneect using different IP/gateway and even to contact my ISP and request help but to no avail.
My question is simple. I'm building a client-server application using .NET 4. Lets say I have the website and I have a server application running on a server computer. The client wants to send a request to the server (lets say, buying something). How is
it done in .NET? Do I use sockets? What technologies / tools do I have to study to implement such a system (assume also that I want to make use of a database).
Actually there is no difference in using socket programming in java or .Net but You can use ASP .NET /WCF Technology to implement same system because WCF which is an SDK that unifies many of these communication technologies. WCF abstracts your business logic
from the underlying plumbing. A single service can support binding to various transport technologies by only changing metadata while the underlying WCF framework handles the remaining
Regards
Marked as answer by shai44 on Jan 23, 2012 04:42 AM
Of course. The question is how to implement such an event. I know some socket programming, but I was afraid maybe it would not work / suffice when programming on the web.
Is it a lot to study for simple cases? All I want is to send requests to the server and then reply with information back to the presentation layer. If there's no other choice, I'll study WCF. But I think I've heard about a REQUEST/RESPONSE mechanism that
works for web applications. Isn't it more simple? If so, how can I use it?
Of cource there are many options, but WCF is the best choice for any distributed application development in .Net. Though there are many things in WCF, I bet anyone can start writing services on their very first day of learning it.
Marked as answer by shai44 on Jan 23, 2012 04:42 AM
shai44
Member
99 Points
55 Posts
How to send requests from client to server
Jan 22, 2012 06:14 AM|LINK
Hi everyone.
Most applications today are 3-tier applications. There are 3 layers:
1. The presentation layer : For example, in a web-based application, the presentation layer is the website itself. It's what the clients can see and interact with.
2. The Business Logic Layer : The logic behind our application. Defined in the server computer.
3. The Data Access Layer : Defines how we access data in the database.
I have once built a simple client-server program using Java and Sockets. It worked excellent from within the home network (under the same router) and even with multiple computers mimicing different clients. However, when I tried to use it from outside of the home network, the client just couldn't access the server. I have tried everything within my power, including trying to conneect using different IP/gateway and even to contact my ISP and request help but to no avail.
My question is simple. I'm building a client-server application using .NET 4. Lets say I have the website and I have a server application running on a server computer. The client wants to send a request to the server (lets say, buying something). How is it done in .NET? Do I use sockets? What technologies / tools do I have to study to implement such a system (assume also that I want to make use of a database).
Please help.
MetalAsp.Net
All-Star
112032 Points
18231 Posts
Moderator
Re: How to send requests from client to server
Jan 22, 2012 06:22 AM|LINK
shabirhakim1
Star
13496 Points
2145 Posts
Re: How to send requests from client to server
Jan 22, 2012 06:26 AM|LINK
Hi,
Actually there is no difference in using socket programming in java or .Net but You can use ASP .NET /WCF Technology to implement same system because WCF which is an SDK that unifies many of these communication technologies. WCF abstracts your business logic from the underlying plumbing. A single service can support binding to various transport technologies by only changing metadata while the underlying WCF framework handles the remaining
Regards
shai44
Member
99 Points
55 Posts
Re: How to send requests from client to server
Jan 22, 2012 07:41 AM|LINK
Of course. The question is how to implement such an event. I know some socket programming, but I was afraid maybe it would not work / suffice when programming on the web.
shai44
Member
99 Points
55 Posts
Re: How to send requests from client to server
Jan 22, 2012 07:46 AM|LINK
Is it a lot to study for simple cases? All I want is to send requests to the server and then reply with information back to the presentation layer. If there's no other choice, I'll study WCF. But I think I've heard about a REQUEST/RESPONSE mechanism that works for web applications. Isn't it more simple? If so, how can I use it?
Thanks
Ramesh T
Contributor
5079 Points
821 Posts
Re: How to send requests from client to server
Jan 22, 2012 10:18 PM|LINK
Of cource there are many options, but WCF is the best choice for any distributed application development in .Net. Though there are many things in WCF, I bet anyone can start writing services on their very first day of learning it.
shai44
Member
99 Points
55 Posts
Re: How to send requests from client to server
Jan 23, 2012 04:42 AM|LINK
Thanks.