Skip to content

Commit 73155ad

Browse files
committed
DDD refactoring: 1) Starting writing new classes; 2) diagramming the old schema.
1 parent 1ad8c1a commit 73155ad

File tree

12 files changed

+2685
-13
lines changed

12 files changed

+2685
-13
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ ClientBin/
229229
*.pfx
230230
*.publishsettings
231231
orleans.codegen.cs
232+
*.~*
232233

233234
# Including strong name files can present a security risk
234235
# (https://github.com/github/gitignore/pull/2483#issue-259490424)

FashionStore.sln

+8-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "misc", "misc", "{EF3ACB30-6
2929
EndProject
3030
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ViewModelsTests", "tests\tests\ViewModelsTests\ViewModelsTests.csproj", "{9C8559E5-B6F4-4D2B-BF77-EC31495249F6}"
3131
EndProject
32-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApplicationCoreLegacy", "src\ApplicationCoreLegacy\ApplicationCoreLegacy.csproj", "{AA3F6843-6E5B-42D9-8BFB-EA12590DEF4B}"
32+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApplicationCoreLegacy", "src\ApplicationCoreLegacy\ApplicationCoreLegacy.csproj", "{AA3F6843-6E5B-42D9-8BFB-EA12590DEF4B}"
33+
EndProject
34+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "design", "design", "{B6FB1121-D255-47D9-84E3-017756A5BAD6}"
35+
ProjectSection(SolutionItems) = preProject
36+
design\DDD_old.uml = design\DDD_old.uml
37+
design\DDD_old_Main.png = design\DDD_old_Main.png
38+
design\DDD_old_Sales.png = design\DDD_old_Sales.png
39+
EndProjectSection
3340
EndProject
3441
Global
3542
GlobalSection(SolutionConfigurationPlatforms) = preSolution

README.md

+10-12
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,32 @@
33
## Purpose and history
44

55
This program is used in small network of fashion stores of one of my
6-
clients. It manages items in stock using visual size matrix. It
7-
supports a few warehouses, movement of goods between them, sells,
6+
clients. It manages items in stock using visualized size matrices. It
7+
supports multiple warehouses, movement of goods between them, sells,
88
returns, reports and other typical features.
99

10-
There were already existed many store automation suites, but main
11-
motivation force for developing this another one was to be able to be
10+
Prior to this project, there were already existed many store automation suites, but main
11+
motivation for developing this another one was to be able to be
1212
used by employees without any PC experience, by “non-users”. The UI
1313
should've be as simple and intuitively understandable as possible. And
1414
that consideration has lead to many design constraints, so this software
1515
is essentially tailored to suit that particular client, and maybe not
16-
suitable at all for any “generic” fashion store.
16+
suitable to any “generic” fashion store.
1717

1818
After many years I’m publishing it as an open source (with respective
1919
copyright permissions) as part of **my professional portfolio**.
2020

21-
## Demonstration of my skills
22-
23-
Current development is located inside of [efcore](https://github.com/vkradio/FashionStore/tree/efcore) branch.
21+
## Demonstration of my current skills
2422

2523
### 1. Project architecture
2624

27-
The central part of the solution is an [ApplicationCore](https://github.com/vkradio/FashionStore/tree/efcore/src/ApplicationCore) subproject. It contains domain entities (according to DDD), service interfaces (to support DI) and other basic stuff. Entities, according to Single Responsibility principle, are almost 100% decoupled from any persistence storage infrastructure such as EF, JSON etc, they only contain Primary and Foreign Key properties when needed.
25+
The central part of the solution is an [ApplicationCore](https://github.com/vkradio/FashionStore/src/ApplicationCore) subproject. It contains domain entities (according to DDD), service interfaces (to support DI) and other basic stuff. Entities, according to Single Responsibility principle, are almost 100% decoupled from any persistence storage infrastructure such as EF, JSON etc, they only contain Primary and Foreign Key properties when needed.
2826

29-
User Interface (in it's modern WPF Store Selection control) employs MVVM pattern. ViewModels are located in the dedicated project [ViewModels](https://github.com/vkradio/FashionStore/tree/efcore/src/ViewModels), they are totally ignorant of UI infrastructure (they are not coupled to WinForms or WPF or any other such dependencies). ViewModels have dedicated [unit tests](https://github.com/vkradio/FashionStore/tree/efcore/tests/tests/ViewModelsTests).
27+
User Interface (in it's modern WPF Store Selection control) employs MVVM pattern. ViewModels are located in the dedicated project [ViewModels](https://github.com/vkradio/FashionStore/src/ViewModels), they are totally ignorant of UI infrastructure (they are not coupled to WinForms or WPF or any other such dependencies). ViewModels have dedicated [unit tests](https://github.com/vkradio/FashionStore/tests/tests/ViewModelsTests).
3028

31-
I do not use any third-party MVVM libraries here, so there is a simplest [MvvmInfrastructure](https://github.com/vkradio/FashionStore/tree/efcore/src/MvvmInfrastructure) project which contains reusable functionality such as subscription to property change events. Also I have a couple of miscellaneous utilities projects. And the remaining parts are legacy WinForms and custom DAL code which were just renamed to comply with modern practices.
29+
I do not use any third-party MVVM libraries here, so there is a simplest [MvvmInfrastructure](https://github.com/vkradio/FashionStore/src/MvvmInfrastructure) project which contains reusable functionality such as subscription to property change events. Also I have a couple of miscellaneous utilities projects. And the remaining parts are legacy WinForms and custom DAL code which were just renamed to comply with modern practices.
3230

33-
Accordance to Single Responsibility principle in solution structure, where projects are loosely coupled with each other, allow us to relatively easy refactor and and extend functionality. For example, near [FashionStoreWinForms](https://github.com/vkradio/FashionStore/tree/efcore/src/FashionStoreWinForms) I can add FashionStoreWinFormsCore project with migration to .NET Core 3 WinForms, or FashionStoreWpf, if I would need to port it to WPF, or even FashionStoreAngular, if there will be a need to create an Angular SPA. I can add Web API subproject which will be a bridge to storage and other core functionality, and I can even restructure project to a set of different microservices and serverless function groups. For example, one microservice could contain functionality for sales person and another one - for business administrator.
31+
Accordance to Single Responsibility principle in solution structure, where projects are loosely coupled with each other, allow us to relatively easy refactor and and extend functionality. For example, near [FashionStoreWinForms](https://github.com/vkradio/FashionStore/src/FashionStoreWinForms) I can add FashionStoreWinFormsCore project with migration to .NET Core 3 WinForms, or FashionStoreWpf, if I would need to port it to WPF, or even FashionStoreAngular, if there will be a need to create an Angular SPA. I can add Web API subproject which will be a bridge to storage and other core functionality, and I can even restructure project to a set of different microservices and serverless function groups. For example, one microservice could contain functionality for sales person and another one - for business administrator.
3432

3533
### 2. Unit tests
3634

0 commit comments

Comments
 (0)