Skip to main content
Tweeted twitter.com/#!/StackProgrammer/status/647707161150267392
added 787 characters in body
Source Link

I'm staring new project, cross-platform. I want to use onion architecture there. It will be a simple game (tic tac toe), just for education purposes. This app will be client-server type.

Now, I read a lot about onion architecture, but I'm still not exactly sure how to deal with it in client-server.

Should I create two different repositories(1) for server and for client? Or should I keep them both in single solution(2) (since many class/interfaces in Core/Domain are the same for both)?

  • (1) - source code repositories (on bitbucket or sth like that)
  • (2) - Visual Studio Solution

EDIT:

It will be cross-platform app (C# via xamarin) with single server also in C#. Communication via WCF. Server will just store user accounts, watch every move, save history of games - not important, it's just for education.

Answering @Kasper, how do I see OA in client-server app:

I thought, I could share as much code as possible in Core of Onion - like Entities, Helpers, Logger(?), Interfaces... Then, I will have another layer - project for Client API (Application and Domain services) and Server API (Application services - consuming and sending messages from/to clients), then Interface layers. Separated for Clients and for Server.

So, single VS solution, two apps, single Core. I know it's technically possible - but is that a good practice?

I'm staring new project, cross-platform. I want to use onion architecture there. It will be a simple game (tic tac toe), just for education purposes. This app will be client-server type.

Now, I read a lot about onion architecture, but I'm still not exactly sure how to deal with it in client-server.

Should I create two different repositories(1) for server and for client? Or should I keep them both in single solution(2) (since many class/interfaces in Core/Domain are the same for both)?

  • (1) - source code repositories (on bitbucket or sth like that)
  • (2) - Visual Studio Solution

I'm staring new project, cross-platform. I want to use onion architecture there. It will be a simple game (tic tac toe), just for education purposes. This app will be client-server type.

Now, I read a lot about onion architecture, but I'm still not exactly sure how to deal with it in client-server.

Should I create two different repositories(1) for server and for client? Or should I keep them both in single solution(2) (since many class/interfaces in Core/Domain are the same for both)?

  • (1) - source code repositories (on bitbucket or sth like that)
  • (2) - Visual Studio Solution

EDIT:

It will be cross-platform app (C# via xamarin) with single server also in C#. Communication via WCF. Server will just store user accounts, watch every move, save history of games - not important, it's just for education.

Answering @Kasper, how do I see OA in client-server app:

I thought, I could share as much code as possible in Core of Onion - like Entities, Helpers, Logger(?), Interfaces... Then, I will have another layer - project for Client API (Application and Domain services) and Server API (Application services - consuming and sending messages from/to clients), then Interface layers. Separated for Clients and for Server.

So, single VS solution, two apps, single Core. I know it's technically possible - but is that a good practice?

added 112 characters in body
Source Link

I'm staring new project, cross-platform. I want to use onion architecture there. It will be a simple game (tic tac toe), just for education purposes. This app will be client-server type.

Now, I read a lot about onion architecture, but I'm still not exactly sure how to deal with it in client-server.

Should I create two different repositories(1) for server and for client? Or should I keep them both in single solution(2) (since many class/interfaces in Core/Domain are the same for both)?

  • (1) - source code repositories (on bitbucket or sth like that)
  • (2) - Visual Studio Solution

I'm staring new project, cross-platform. I want to use onion architecture there. It will be a simple game (tic tac toe), just for education purposes. This app will be client-server type.

Now, I read a lot about onion architecture, but I'm still not exactly sure how to deal with it in client-server.

Should I create two different repositories for server and for client? Or should I keep them both in single solution (since many class/interfaces in Core/Domain are the same for both)?

I'm staring new project, cross-platform. I want to use onion architecture there. It will be a simple game (tic tac toe), just for education purposes. This app will be client-server type.

Now, I read a lot about onion architecture, but I'm still not exactly sure how to deal with it in client-server.

Should I create two different repositories(1) for server and for client? Or should I keep them both in single solution(2) (since many class/interfaces in Core/Domain are the same for both)?

  • (1) - source code repositories (on bitbucket or sth like that)
  • (2) - Visual Studio Solution
Source Link

Onion architecture in client-server application

I'm staring new project, cross-platform. I want to use onion architecture there. It will be a simple game (tic tac toe), just for education purposes. This app will be client-server type.

Now, I read a lot about onion architecture, but I'm still not exactly sure how to deal with it in client-server.

Should I create two different repositories for server and for client? Or should I keep them both in single solution (since many class/interfaces in Core/Domain are the same for both)?