|
@@ -39,6 +39,7 @@ in most projects this is also fine, but ends up later to some recoding in differ
|
|
|
|
|
|
Also in regular .NET web projects we have
|
|
Also in regular .NET web projects we have
|
|
|
|
|
|
|
|
+
|
|
```
|
|
```
|
|
Persistence:
|
|
Persistence:
|
|
Proj.Data.Contacts
|
|
Proj.Data.Contacts
|
|
@@ -51,14 +52,16 @@ Logic:
|
|
Proj.Web
|
|
Proj.Web
|
|
Controllers
|
|
Controllers
|
|
Views
|
|
Views
|
|
-
|
|
|
|
|
|
+```
|
|
as Views are Processed and sent to browser,
|
|
as Views are Processed and sent to browser,
|
|
Controllers receive request and go to ModelBO retrieving Contacts, it return a view which are processed and sent back to server
|
|
Controllers receive request and go to ModelBO retrieving Contacts, it return a view which are processed and sent back to server
|
|
|
|
|
|
-```
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
The goal
|
|
The goal
|
|
-Create independent contexts:
|
|
|
|
|
|
+Create independent contexts:
|
|
|
|
+
|
|
```
|
|
```
|
|
Persistence:
|
|
Persistence:
|
|
Pkg.DataStore - persistence
|
|
Pkg.DataStore - persistence
|
|
@@ -70,6 +73,7 @@ ImageService:
|
|
Pkg.ImageLogic
|
|
Pkg.ImageLogic
|
|
```
|
|
```
|
|
|
|
|
|
|
|
+
|
|
The caller must be independent from browser, we can create different front ends such as CLI.
|
|
The caller must be independent from browser, we can create different front ends such as CLI.
|
|
|
|
|
|
Service can require more than one Querier, we can create virtual DB with tables
|
|
Service can require more than one Querier, we can create virtual DB with tables
|
|
@@ -90,18 +94,19 @@ Service performs logic, validation, authorization
|
|
Communication receives
|
|
Communication receives
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
tests
|
|
tests
|
|
-------
|
|
|
|
|
|
+----
|
|
|
|
|
|
|
|
+With independent services we should have a maincore:
|
|
|
|
|
|
-With independent services we should have a maincore:
|
|
|
|
|
|
|
|
```go
|
|
```go
|
|
- Core will prepare the database, session etc
|
|
|
|
|
|
+//Core will prepare the database, session etc
|
|
|
|
|
|
- core.Session();
|
|
|
|
-
|
|
|
|
- core.User().Login etc
|
|
|
|
|
|
+core.Session();
|
|
|
|
+core.User().Login etc
|
|
|
|
+```
|
|
|
|
|
|
|
|
|
|
|
|
|