Main Content

Frameworks - learning through exploring and understanding data sources

Archive - Originally posted on "The Horse's Mouth" - 2013-03-27 18:02:06 - Graham Ellis

When a newcomer joins a team that's been working on an existing large project for years, (s)he often finds that so much work has been done, and such extra layers of abstraction added on top of the basic tools, that it's very difficult to get into the project. The problem is often compounded by development outstripping documentation of that development, perhaps with old / original documents being left around which will range from being useful to being totally out of date and misleading and without any flags as to which is which.

So on this week's course, which is introducing newcomers to PHP, the Zend Framework and projects with a large stack on top of Zend, I'm training in such a way as to show how all the jigsaw pieces go together. Yesterday we started with a PHP revision / review and a following review of how objects work in PHP, then we started a new project - with the stated objective as we work through to revealing the various data sources that a web base application can make use of (and display) - starting from a simple application and looking out at all the types of resources available to us. To give our work some visibility, we added a sample piece of data from each source into the view.



After one day, that's only a part of it... so far the example shows:
• Information hard coded into the view
• Information calculated within the view
• Information passed in from the controller
• Information extracted from the controller
• Information from the URL we're called under
• Information from parameters filled in onto a form
• Information about our browser
• Information about the remote location of our client
• Infrmation from the server's environment
• And static resources from within the application framework
and we haven't even started to look at the most important data sources, which come via the model.

Although this is written for PHP / Zend, similar principles apply for Python / Django and for Ruby / Rails. Yesterday's delegates tell me that I had solved a lot of mysteries for them and given them confidence as they delve around the project stack. And so, today, we'll add the model and accesses to data beyond the model.