It is that time of the year, when my customer starts looking at his portal page a little more critically. It starts with him wanting to update the text in my fancy throbbing button that I created a while back. Then it morphs into a few other changes and before you know it, we need a meeting to discuss the entire space. Which is ok, content needs to be updated periodically or it becomes stall.
I would not normally roll my eyes or have any type feeling of "really?", except the fact that I have not done much coding over the past 12 months and these updates will require me to look at my php. Repeat after me, you are a programmer, programmers program, programers program....
This is the portal page i am sprucing up. I follow a traditional MVC design pattern when building the content for this area of the site. There is a clear separation between code that displays things and code that gets things and code that directs things.
This is a snapshot of the portal directory:
Most of the files are written in php and are what are called view files. They contain HTML, CSS and PHP and contain the logic to display the content. The files that end in .php have some php code in them. The pages that end in html, contain only HTML, CSS and poss. some javascript.
The DAO.php file is what I call the model layer file and contains the php and SQL that speaks to the DB(s) and is responsible for getting data from the DB and delivering to the view pages that render it.
The index and studentindex.php files are what I call a controller. They contain logic that determines which action is being called and what files, mainly view, to include in the page.

No comments:
Post a Comment