How to create the engine

How to create the engine

When there is a speech about creation of serious projects, an optimal solution in such cases – creation of own engine under certain needs. Having spent time once, you will be able to create grids of definitely built projects, without aggravating them unnecessary modules and functions everywhere of the used engines, such as Joomla or Wordpress. Of course, it is simpler to order development of the engine from specialists, but, having only created CMS most, you will see through the websites and to instantly solve the arising problems.

It is required to you

  • The computer, Internet access, the created website with accurate structure, knowledge of object-oriented programming, PHP, CSS, Javascript.

Instruction

1. Impose all pages of the website. It is not necessary to draw the design document, it becomes then. And here it is necessary to draw accurate structure of appearance: arrangement of the menu, logo, cap, quantity of columns, etc. Subsequently everything can be changed, but debugging of the engine all the same will require elementary appearance.

2. Create all necessary tables for the database. For example, the table with articles, with sections, etc. It is not terrible if you forget something, but tables will need to be created to the maximum qualitatively that the inner pattern of the engine was accurately outlined. Further create a set of classes, each of which will be responsible for a certain part (a class on management of users, a class on work with databases, etc.). Remember that one class should not carry out the tasks characteristic of another. For this purpose the global abstract class for the methods applicable to all classes will be required.

3. Break a template into several components and save them in separate files with the .tpl extension. For this purpose copy any separate part, for example, an authorization form, and you insert into the separate .tpl-file. Further create a class which problem is to work with such files templates and to install the relevant data instead of {elements}. For example, instead of {username} the class will insert a name of the registered user. Bring all elements to pages of the website, applying the above class, thereby, collecting pages "on bricks".

4. Develop design of the website. It will be for this purpose necessary to correct files of .tpl (having left {elements}), to add the CSS and JavaScript files. And here it is already better not to touch functionality of the website if you, of course, at the previous stages executed everything truly.

Author: «MirrorInfo» Dream Team


Print