Anatomy of a library - how should they interact with the database? |
[eluser]n0xie[/eluser]
[quote author="warpkid" date="1270044220"] My question is, is there a specific best practise way of putting a library like this together? The code makes use of a model to access the database - is it the done thing to build a library that relies on a associated model?[/quote] I think what you are looking for is modules. In this case you would create a 'page' module which has some basic CMS like behaviour which you drop into an application and which handles the CRUD of basic pages. The module would consist of some model(s) to do basic CRUD, some controller(s) and some scaffolding view(s). PyroCMS works on this principle but it is not hard to build a system like this yourself. There is very good HMVC implementation made by wiredesignz you could checkout. |
Messages In This Thread |
Anatomy of a library - how should they interact with the database? - by El Forum - 03-31-2010, 03:03 AM
Anatomy of a library - how should they interact with the database? - by El Forum - 03-31-2010, 03:07 AM
Anatomy of a library - how should they interact with the database? - by El Forum - 03-31-2010, 03:27 AM
Anatomy of a library - how should they interact with the database? - by El Forum - 04-01-2010, 02:07 AM
Anatomy of a library - how should they interact with the database? - by El Forum - 04-01-2010, 10:00 AM
|