Controller
Posted: Thu Sep 17, 2009 7:11 pm
There's the database then there's the presentation of the data from the database. But then there's this glue-code, so to speak, that inserts data into the database. Integrity must be kept between the different parts of the database. This integrity is kept by the "glue-code". So it'd be ideal to make this glue-code universal, global, and reusable. So should I put this glue-code or controller code in a separate file as a class or something? What directory structure is ideal for organizing my classes? Do you (as a developer) put your glue-code in a separate interface, whether it be a class or a collection of functions? If so, then where do you put these files in your directory model/architecture/design?
Just to clarify what I mean by glue-code in this post: It's the code that takes data, checks if it's valid, and inserts it into the database. It's the code that basically keeps the database the way it should be. It's PHP in this case, 'cause it's the server-side language I use.
All I want to know is the file structure for organizing files. I find that file organization is one of the least talked about things in web development, unless I just don't know where to look. If anyone could point me to some good resources on web site files organization, that would be nice. But my question is on where do I put my php class files?
Thanks for reading. All help is so very much appreciated.
Just to clarify what I mean by glue-code in this post: It's the code that takes data, checks if it's valid, and inserts it into the database. It's the code that basically keeps the database the way it should be. It's PHP in this case, 'cause it's the server-side language I use.
All I want to know is the file structure for organizing files. I find that file organization is one of the least talked about things in web development, unless I just don't know where to look. If anyone could point me to some good resources on web site files organization, that would be nice. But my question is on where do I put my php class files?
Thanks for reading. All help is so very much appreciated.