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
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?