How To Create An Engine

Table of contents:

How To Create An Engine
How To Create An Engine

Video: How To Create An Engine

Video: How To Create An Engine
Video: Ep. 1: Window - Sparky Engine (How To Make a Game Engine) 2024, May
Anonim

When it comes to creating serious projects, the optimal solution in such cases is to create your own engine for specific needs. By taking the time once, you can create grids of definitely built projects without burdening them with unnecessary modules and functions of ubiquitous engines like Joomla or Wordpress. Of course, it is easier to order the development of the engine from specialists, but only by creating a CMS yourself, you will see through your sites and instantly solve emerging problems.

How to create an engine
How to create an engine

It is necessary

Computer, Internet access, created site with a clear structure, knowledge of object-oriented programming, PHP, CSS, Javascript

Instructions

Step 1

Layout all the pages of your site. There is no need to draw a design document, this is done later. But it is necessary to draw a clear structure of the appearance: the location of the menu, logo, header, the number of columns, etc. Subsequently, everything can be changed, but to debug the engine, you still need an elementary appearance.

How to create an engine
How to create an engine

Step 2

Create all the required tables for the database. For example, a table with articles, sections, etc. It's not scary if you forget something, but the tables will need to be created as efficiently as possible so that the internal structure of the engine is clearly outlined. Next, create a set of classes, each of which will be responsible for a specific part (a class for managing users, a class for working with databases, etc.). Remember that one class should not perform tasks that are specific to another. This will require a global abstract class for methods that apply to all classes.

How to create an engine
How to create an engine

Step 3

Divide the template into several component parts and save them in separate files with the.tpl extension. To do this, copy a separate part, for example, an authorization form, and paste it into a separate.tpl file. Next, create a class whose task is to work with such template files and set the corresponding data instead of {elements}. For example, instead of {username}, the class will insert the name of the user being logged on. Display all the elements on the pages of the site using the above class, thereby assembling the pages "brick by brick".

How to create an engine
How to create an engine

Step 4

Develop a website design. To do this, you will need to fix the.tpl files (leaving the {elements}), add the CSS and JavaScript files. But it is better not to touch the functionality of the site, if, of course, you did everything correctly in the previous stages.

Recommended: