Creating a C#Client-Server architecture

Asked

Viewed 459 times

1

I made a test application in N layers (access to Database, presentation, business (model) and transfer objects) worked quietly and learned a lot about 3 layers and N layers.

Now I’m willing to do a show that’s client-server and I’m having these doubts:

  • When we speak on server the system business layer is all on the server or client as well, since I reference the business DLL in the presentation application?

  • If the business layer is entire on the server, how do I access it on the client?

  • To the server work also as a service I can only make a console application and ask to install or have to develop as a service application?

  • If I want to separate the database access layer as well, can I keep the database connection persistent? My idea is to build an application that I have the possibility to configure any database using ODBC.

1 answer

1


When we speak on server the system business layer is all on the server or client as well, since I reference the business DLL in the presentation application?

It depends. This can indicate that you have not done the layers so well. A part is in the client, a part is in the server and a part is in both.

If the business layer is entire on the server, how do I access it on the client?

I do not know if I understand, but it does nothing special, just communicate the way you decided to do between the client and the server, establish criteria. Hard to answer so abstractly, has a lot of nonsense to do this.

To the server work also as a service I can only make a console application and ask to install or have to develop as a service application?

Basically this is it, see. But you can use a template that already comes everything configures to facilitate:

Visual Studio com Windows Service template

More.

If I want to separate the database access layer as well, can I keep the database connection persistent? My idea is to build an application that I have the possibility to configure any database using ODBC.

Yes, but usually it is not necessary, almost always this lot of layer, generalization is idealism and cake recipe that does not bring real advantage, on the contrary. Now it would be nice to learn to do simpler things that seem to be more difficult these days. The more complexity you put into the more experienced application you need to be, the more team you need, the more trouble you get. There are cases you need, but they’re rare.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.