Ticket #935 (closed Task: fixed)
Core: refactor update/delete logic
Reported by: | jri | Owned by: | jri |
---|---|---|---|
Priority: | Major | Milestone: | Release 4.8 |
Component: | DeepaMehta Standard Distribution | Version: | 4.7 |
Keywords: | Cc: | dgf, Malte, JuergeN | |
Complexity: | 13 | Area: | |
Module: | deepamehta-core |
Description
From the architectural viewpoint the various Core responsibilities -- DB access, complex update/delete operations on DM objects, Access Control, creating directives, firing events -- are partly still too intertwined. The current layering approach is not stringent and thus makes the DM Core more and more difficult to maintain. This became evident at least in the face of the required refactoring of the Delete operation (see #833).
Currently the DM objects still have too much responsibilities. After the proposed refactoring the situation looks like this:
- Creating directives and firing events has moved from the DM objects to the persistence layer.
- The complex update and delete logic (for operating on composite structures) has moved from the DM objects to the persistence layer as well.
- The sole responsibility of the DM objects is to let the Core API user operate on persistent (= DB attached) application objects. The DM objects do not contain any retrieval/update/delete logic themselves. Instead they delegate to the persistence layer. Internal core operations do not involve DM objects but take place at the persistence layer.
The DM objects could be created lazily, that is only when accessed by the Core API user. - The persistence layer have unrestricted access to the DB. Access Control is performed at a higher level, that is the Core Service.
Note: 3 years ago (DM 4.0.13) it became evident that DM objects should not be responsible for fetch/store themselves. In the course of the former refactoring (see #340) the fetch/store logic has moved to the persistence layer (namely to the TypeStorage and ValueStorage helper classes). Basically now the same will happen for the update/delete operations as well.
See also #933.
Change History
comment:2 Changed 9 years ago by jri
- Summary changed from Core refactoring to Core: refactor update/delete logic
comment:10 Changed 9 years ago by Jörg Richter <jri@…>
comment:11 Changed 9 years ago by Jörg Richter <jri@…>
comment:12 Changed 9 years ago by Jörg Richter <jri@…>
comment:13 Changed 9 years ago by Jörg Richter <jri@…>
comment:14 Changed 9 years ago by Jörg Richter <jri@…>
comment:15 Changed 9 years ago by Jörg Richter <jri@…>
comment:16 Changed 9 years ago by Jörg Richter <jri@…>
comment:17 Changed 9 years ago by jri
This greater refactoring is now merged into master.
Please test!
comment:18 Changed 9 years ago by Jörg Richter <jri@…>
comment:19 Changed 9 years ago by Jörg Richter <jri@…>
comment:20 Changed 9 years ago by Jörg Richter <jri@…>
comment:21 Changed 9 years ago by jri
Refactoring the delete logic is basically done.
Now let's tackle the update logic, the Core's most complex affair at all.
comment:22 Changed 9 years ago by Jörg Richter <jri@…>
comment:23 Changed 9 years ago by Jörg Richter <jri@…>
comment:24 Changed 9 years ago by Jörg Richter <jri@…>
comment:25 Changed 9 years ago by Jörg Richter <jri@…>
comment:26 Changed 9 years ago by Jörg Richter <jri@…>
comment:27 Changed 9 years ago by Jörg Richter <jri@…>
comment:28 Changed 9 years ago by Jörg Richter <jri@…>
comment:29 Changed 9 years ago by Jörg Richter <jri@…>
comment:30 Changed 9 years ago by Jörg Richter <jri@…>
comment:31 Changed 9 years ago by Jörg Richter <jri@…>
comment:32 Changed 9 years ago by Jörg Richter <jri@…>
comment:33 Changed 9 years ago by Jörg Richter <jri@…>
comment:34 Changed 9 years ago by Jörg Richter <jri@…>
comment:35 Changed 9 years ago by Jörg Richter <jri@…>
comment:36 Changed 9 years ago by Jörg Richter <jri@…>
comment:37 Changed 9 years ago by Jörg Richter <jri@…>
comment:38 Changed 9 years ago by Jörg Richter <jri@…>
comment:39 Changed 9 years ago by Jörg Richter <jri@…>
comment:40 Changed 9 years ago by Jörg Richter <jri@…>
comment:41 Changed 9 years ago by Jörg Richter <jri@…>
comment:42 Changed 9 years ago by Jörg Richter <jri@…>
comment:43 Changed 9 years ago by Jörg Richter <jri@…>
comment:44 Changed 9 years ago by Jörg Richter <jri@…>
comment:45 Changed 9 years ago by Jörg Richter <jri@…>
comment:46 Changed 9 years ago by Jörg Richter <jri@…>
comment:47 Changed 9 years ago by Jörg Richter <jri@…>
comment:48 Changed 9 years ago by Jörg Richter <jri@…>
comment:49 Changed 9 years ago by Jörg Richter <jri@…>
comment:50 Changed 9 years ago by Jörg Richter <jri@…>
comment:51 Changed 9 years ago by Jörg Richter <jri@…>
comment:52 Changed 9 years ago by Jörg Richter <jri@…>
comment:53 Changed 9 years ago by Jörg Richter <jri@…>
comment:54 Changed 9 years ago by Jörg Richter <jri@…>
comment:55 Changed 8 years ago by jri
- Status changed from accepted to closed
- Resolution set to fixed