Developers/Concepts/Tinebase Layout
Tinebase and Admin Layout
The patterns used in Tinebase and Admin are similar to the application patterns and also follow (in general) the 3-tier rule. However, Tinebase consists of many classes with very different complexity. As such, using the same design pattern for all of them would not fit to most of the problems solved in those classes.
Contents |
[edit] Tinebase
In general all Tinebase classes are controller like classes. They don't have any user interface or server representation methods and also they have no back-end or storage logic.
All Tinebase classes implement the singelton pattern or only consist of static functions.
It's important to note, that Tinebase classes do not check permissions for their actions. All acl and permission checks have to be done in the application controllers, e.g. in the Admin_Controller or Tinebase_Controller.
[edit] Trivial Example: Tinebase_Accesslog
An example of a light weight Tinebase class is Tinebase_Accesslog. It only consists of the accesslog controller the corresponding model.
| Class Name | Functionality |
|---|---|
Tinebase_Accesslog | singelton, domain logic |
Tinebase_Model_Accesslog | model |
As the persistence of access log entries is trivial, Tinebase_Accesslog has no seperate back-end but uses a general sql-table back-end from Tinebase. Moreover there is no server representation of Tinebase_Accesslog required, as viewing access logs is a task of the Admin application.
[edit] Complex Example: Tinebase_User
The User class of Tinebase is a bit more complex. The User back-end could be SQL or LDAP. Moreover the class deals with two models and last but not least it needs its own server operations, e.g. for filling user selection dialogs.
Again, the Tinebase_User class could be used as a controller like class. But under the hood, Tinebase_User combines a singelton and a factory to return the configured back-end which needs to implement a given interface.
| Class Name | Functionality |
|---|---|
Tinebase_User | singelton, factory |
Tinebase_Model_User | model with public data only |
Tinebase_Model_FullUser | model with all data (except password of course) |
Tinebase_Json_User | for user selection dialogs |
Tinebase_Backend_Interface_User | Interface for a Tinebase_User back-end |
Tinebase_Backend_Abstact_User | Abstract implementation of a Tinebase_User back-end |
Tinebase_Backend_Sql_User | SQL implementation of the Tinebase_User back-end |
Tinebase_Backend_Ldap_User | LDAP implementation of the Tinebase_User back-end |




