Abstracting functionality with centralised content

Michael Peacock (10.Oct.2010 at 09:45)
Talk at PHP North West 2010 (PHPNW10) (English - UK)

Rating: 4 of 5

Most content on web sites and web applications, such as pages, e-commerce products, blog entries, news articles and even job vacancies, comprise mostly of common attributes. By centralising this content at the Model and database level, extending upon a core set of tables for more diverse content types we can save development time by sharing functionality to all content types. User features such as commenting, rating, viewing content as an RSS feed, and administrative functionality, such as CRUD functions, deactivating content, rolling back versions, and moving content within a site or menu hierarchy can be applied to all of the content types. This approach is similar to how content works in Drupal, with all content stemming from a “node”. By combining this with a simple MVC architecture, new content types can easily be dropped in, with models inheriting from a parent content type which holds the data common to all content types, and controllers inheriting from a parent content controller, which centralises hierarchies of content of each type, and CRUD functions.

Through real examples, this talk would show developers how to save development time, increase efficiency, and reduce testing time by showing how content can be centralised, and functionality can be abstracted so that it can easily apply to any type of content, without any additional work. This would mean an e-commerce site with product ratings, could add ratings to pages, blog entries and other content, without any extra development work.

This is the perfect complement to any MVC based development framework, making code even easier and quicker to extend. Since introducing this approach to our own frameworks, productivity has increased dramatically, and as new content types are added, only a few lines of new code need to be added to get the full set of CRUD functions.

Who are you?

Claim talk

By clicking this button you are declaring that you are the speaker responsible for it and a claim request will be sent to the administrator of the event.

If the claim is approved you will be able to edit the information for this talk.

Are you sure?

 
Comments closed.

Comments

Rating: 4 of 5

10.Oct.2010 at 15:36 by Michelangelo van Dam

although we arrived halfway during the talk, I was really liking the relaxed way Michael was presenting his talk.

good job!

Rating: 4 of 5

10.Oct.2010 at 20:59 by Ryan Mauger

Interesting concepts and ideas, inspired me to make sure I will be looking at our revisioning structure with this in mind to see where I can make improvements

Rating: 5 of 5

10.Oct.2010 at 21:43 by Gavin Taylor

I found this talk very useful indeed, more so than some of the sessions from the "main" part of the conference.

walked away with some very good ideas and a few changes planned to our cms I think.

presented very well, albeit a bit quiet at times and disrupted briefly by the workmen next door, but Michael didn't let that interrupt him or slow down the momentum of the talk.

Rating: 4 of 5

11.Oct.2010 at 11:01 by Alex Mace

Big props for stepping into the breach when the previous speaker was late and for not being put off by the drilling that started 5 minutes from the end.

Although the concepts weren't anything especially new to me, it did reinforce that we need to use something like this when the fabled day comes that we refactor our database. With that in mind I would have liked a look at how to move a database schema towards this model.

Rating: 5 of 5

11.Oct.2010 at 16:23 by Alex Luneburg

Michael did an excellent job of presenting his interesting talk, especially as he unexpectedly had to step into the first slot of day and battle against the noise of drilling.
It was clearly presented, though I'm not sure that I'll be using this approach any time soon.

Cloud server hosting by Combell Combell      © Joind.in 2012