📜 ⬆️ ⬇️

Relational approach

I’ll make a reservation, I’m not writing my CMS, I’ll only voice the ideas that I would like to see in a CMS.

Document model, deferred rendering



CMS modules should not form the HTML code, but the object model of the document. This allows you to postpone data acquisition for rendering until the very last moment by grouping repeated or similar requests to data.
')
In addition, the document object module allows you to work correctly with several output data formats (HTML, RSS, WML, etc.).

Sets, chains, lazy execution


So, I would like to see a relational approach to data in CMS.

That is, at any moment in time, the core works not with one article, not with one comment, not with one link, but with a multitude (even if from 0-1 elements).

In addition, a lazy execution implementation is desirable (similar to LINQ, DBIx :: Class).

Functionally, it is desirable to implement this in the same way as jQuery relational logic (call chains, set operations).

Simple API Templates


If the CMS implementation is to be in PHP, then the template engine should do only three things by default - create a global environment via extract, include a template via include, and then clean the global environment.

And now the template can, for example, if you wish, redirect your work to a more specialized template engine (Blitz, Smarty, ZendView etc.).

Result


First of all, you get a CMS that works effectively with a database.

Most of the CMS works with instances of objects, which means a lot of data retrieval operations for one HTTP request.

Source: https://habr.com/ru/post/53396/


All Articles