Welcome Guest, Not a member yet? Register   Sign In
Anatomy of a library - how should they interact with the database?
#1

[eluser]warpkid[/eluser]
Hi There,

I am building a little site and re-factoring some code that a colleague wrote to manage the editing of pages - a content management system of sorts.
This kinda code strikes me as something that would be suited to a library, as its something we could use across a multitude of sites.

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?
Also, is it best to not access post data from within a library and instead have all required data passed in? Just to make the library more 'generic'.

I know I could probably do it anyway I liked, but Id like to get an idea of what best practise dictates in terms of library creation.

Thanks!


Messages In This Thread
Anatomy of a library - how should they interact with the database? - by El Forum - 03-31-2010, 03:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB