Edgewall Software

Changes between Version 36 and Version 37 of GenericTrac


Ignore:
Timestamp:
Aug 3, 2010, 10:25:49 PM (14 years ago)
Author:
Christian Boos
Comment:

a few clean-ups

Legend:

Unmodified
Added
Removed
Modified
  • GenericTrac

    v36 v37  
    166166
    167167For other relations, it can be less clear cut, we have to take sides. For example, concerning the ticket relations:
    168  - ''**parent**/child'': a child ticket necessarily has a ''parent'' ticket, otherwise it's not a child ticket ; the parent ticket may have one or more children tickets, but it can also exist on its own
    169  - ''**blocked-by**/is-blocking'': a ticket can be ''blocked-by'' one or more tickets ; the converse relation ''is-blocking'' is less strong
    170  - ''**duplicate-of**/duplicated-by'': a ticket may be qualified to be a ''duplicate-of'' of another ticket ; that other ticket is ''duplicated-by'' one or many tickets, but this is less strong
     168 - ''**parent**/child'': a child ticket necessarily has a ''parent'' ticket, otherwise it's not a child ticket; the parent ticket may have one or more children tickets, but it can also exist on its own
     169 - ''**blocked-by**/is-blocking'': a ticket can be ''blocked-by'' one or more tickets; the converse relation ''is-blocking'' is less strong
     170 - ''**duplicate-of**/duplicated-by'': a ticket may be qualified to be a ''duplicate-of'' of another ticket; that other ticket is ''duplicated-by'' one or many tickets, but this is less strong
    171171
    172172==== History
     
    180180 - one representing the metadata corresponding to the change, describing the act of creating a new version, i.e. revisioning:  "{resource}_rev", e.g. a `ticket_rev` (or `ticket_revision`?)
    181181
    182 ||||||||=  '''ticket_version_prop'''  ||
    183 ||= id ||= prop ||= value ||= seq ||
    184 ||||||||=  '''ticket_rev_prop'''  ||
    185 ||= id ||= prop ||= value ||= seq ||
     182 ||||||||=  '''ticket_version_prop'''  ||
     183 ||= id ||= prop ||= value ||= seq ||
     184
     185 ||||||||=  '''ticket_rev_prop'''  ||
     186 ||= id ||= prop ||= value ||= seq ||
    186187
    187188The main resource and the derived resources would be related together:
     
    190191
    191192Typical example:
    192 ||||||||=  '''ticket_prop'''  ||
    193 || 1001 || id || 1 || 2021010101 ||
    194 || 1001 || lastchange || 101001 ||
    195 ||||||||=  '''ticket_rev_prop'''  ||
    196 || 101001 || ticket  || 1001         ||  23232323333 ||
    197 || 101001 || auth    || 1            ||  23232323334 ||
    198 || 101001 || date    || 123123211422 ||  23232323335 ||
    199 || 101001 || version || 202002       ||  23232323336 ||
    200 ||||||||=  '''ticket_rev_prop_int''  ||
    201 || 202002 || author  || cboos        ||  23232323337 ||
    202 || 202002 || comment || random change ||  23232323338 ||
     193 ||||||||=  '''ticket_prop'''  ||
     194 || 1001 || id || 1 || 2021010101 ||
     195 || 1001 || revision || 101001 ||  2021010102 ||
     196
     197 ||||||||=  '''ticket_rev_prop'''  ||
     198 || 101001 || ticket  || 1001         ||  23232323333 ||
     199 || 101001 || auth    || 1            ||  23232323334 ||
     200 || 101001 || date    || 123123211422 ||  23232323335 ||
     201 || 101001 || version || 202002       ||  23232323336 ||
     202
     203 ||||||||=  '''ticket_rev_prop_int''  ||
     204 || 202002 || author  || cboos        ||  23232323337 ||
     205 || 202002 || comment || random change ||  23232323338 ||
    203206
    204207A given revision instance (here 101001) is usually related to a specific change in one resource,
     
    246249   for an instance (i.e. all the records within `{resource}_prop...`
    247250   tables with the same `id`)
    248  - an "abstractmodel",  object wrapping a view
     251 - an abstract "model",  object wrapping a view
    249252   (for keeping around the "old" values), but mutable
    250  - "model", concrete subclass of the above, which implements loading
    251    by fetching the data from a set of tables following the generic scheme
     253 - "sqlmodel", concrete subclass of the above, which implements loading
     254   by fetching the data from the database, in a set of tables following
     255   the generic scheme
    252256
    253257Note that `view`s could eventually be cached, somehow (need to think carefully about how to do cross-process invalidation, though; there's certainly a way on top of the CacheManager).
    254258
     259If most of the code deals with the "model", the SQL details can be abstracted away,
     260facilitating eventual adaptation to other backends (e.g. "nosqlmodel").
     261
    255262=== Applied on Milestone module ===
     263
    256264 - modify the Milestone module so that it uses the new proposed datamodel.
    257  - experiment new tabbed view for the milestone (''View'', ''Discussion'', ''History''). See TracProject/UiGuidelines.
    258  - milestone should be able to have attachments, too (#3068)
    259265 - adapt the Roadmap module to the new model
    260266 - adapt the Milestone admin component to the new model
    261 
    262 Once this is complete, validate the genericity by promoting the components to be first class resources as well (#1233).
     267 - for a first approach, the generic scheme would be enough,
     268   no need for versioning as we currently don't support that
     269
     270Later:
     271 - experiment new tabbed view for the milestone (''View'', ''Discussion'', ''History''). See TracProject/UiGuidelines.
     272 - migrate to generic versioned scheme
    263273
    264274=== Applied on Ticket module ===
     
    281291If we do this, we can also at the same time think about the storage model, in particular how past versions could be stored in a VCS (#1132). We could then think about a serialization model that would play nicely with the genericity of the Trac resources on one hand side, and with the external editors on the other hand.
    282292
     293See how a VCS backend could be written for the versioned generic scheme...
     294
    283295=== Applied on Component module ===
    284296
    285 An other possibility would be to start on fresh ground, implementing not yet existing resource typse in a generic way. That would be the less disrupting approach, as everything else should just continue to work unchanged (or mostly unchanged, except for things like #5211 and places where we deal with the old `component` table).
     297An other possibility would be to start on fresh ground, implementing not yet existing resource typse in a generic way (#1233). That would be the less disrupting approach, as everything else should just continue to work unchanged (or mostly unchanged, except for things like #5211 and places where we deal with the old `component` table).
    286298
    287299