[kforge-dev] KForge architecture
John Bywater
john.bywater at appropriatesoftwarefoundation.org
Mon Mar 20 00:41:12 UTC 2006
John Bywater wrote:
<snip>
>
> What Patterns Have Been Applied In KForge?
> ==============================
>
<snip>
I should like to add that importantly in the presentation layer, to be
specific in the web user interface, there is also:
Model View Controller
- splits user interface interaction into three distinct roles
In respect of this pattern, we have applied Django, which is an
excellent implementation of MVC.
Now, at least two questions arise:
1. Why not write KForge as a Django application?
The first answer is that KForge was started months before Django was
released. The second answer is even if it had been released before
KForge was started, it would still have been preferable to build a
Domain Model system for KForge, rather than sitting on a Data Mapper, as
Django does with SQLObject:
2. Why build a Domain Model, rather than sitting on SQLObject?
The Domain Model pattern provides the composite pattern, allowing domain
object classes to be designed as a composite class hierarchy. For
example, basic named, dated, stateful, standard (=>named+dated+stateful)
Domain Object classes can be defined, then efficeintly concrete Domain
Object classes can be derived, and also extended by others.
Additionally, the KForge Domain Model semantics are those of object
oriented design (HasA, HasMany, String, Integer, etc.) which is useful
for modelling a domain. At the same time, because SQLObject is an
excellent implementation of a Data Mapper, it quite rightly has
semantics that correspond to relational database management systems
(ForeignKey, StringCol, IntCol). That is why KForge makes use of
SQLObject through the KForge Data Mapper, which effectively provides
programmatic control over SQLObject, and reflects the Domain Model into
the RDBMS.
As a correction to my last message: please note that "Presentation
Layers" isn't in fact a pattern.... So it's a mistake to have put it in
the list of patterns. Instead, it could appear in a list of the major
system packages.
I will write soon with such a list of major features, with links to code.
Best regards,
John.
More information about the kforge-dev
mailing list