Changeset 189 for Doc/Backend
- Timestamp:
- 12/16/11 16:33:07 (13 years ago)
- Location:
- Doc/Backend
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Doc/Backend/DBInterface.tex
r180 r189 194 194 and store data through instances of precreated classes. All these classes inherit from a global 195 195 ResearchToolObject class. A UML class diagram of the model classes can be found in Appendix \ref{models}. 196 The most important thing to note is that references to other objects are not evaluated immediately. Rather, 197 these classes with references have to override the evaluate() function, which in turn tries to query the 198 database and resolve those UIDs to model objects. This gives us two advantages: initial queries do not scale 199 exponentially because of the 'lazy' evaluation, and the boolean return value notifies us when there exists an 200 incorrect reference. By evaluating before saving an object, we ensure that there cannot exist invalid values in 201 the database. 196 202 \subsection{Connectors} 197 203 Although the front end developer only uses one general DatabaseInterface, the different files for the different … … 200 206 methods are implemented in the baseclass Connector, which should be extended. In every connector, 201 207 the get() and set() methods are different. A get() method builds the querystring based on the given arguments, 202 then retrieves the data and performs other necessary queries (like retrieving a different object from another 203 file) to ensure the PHP DataModel is comoplete. A set() method has to store the data accordingly. 208 then retrieves the data and performs other necessary queries (like retrieving a set of fields of unspecified 209 length) to ensure the PHP DataModel is complete. A set() method has to store the data accordingly. 210 204 211 \subsection{PHPDoc} 205 212 PHPDoc for the database classes can be found at
Note: See TracChangeset
for help on using the changeset viewer.