S
S
ssrdop2015-09-09 19:33:19
CMS
ssrdop, 2015-09-09 19:33:19

What micro modular php engine would you recommend for learning the internals?

I need to understand the logic of modular architecture. In order not to step on a rake, I would like to consider a micro engine, since there should not be much that is superfluous in the case of large cms. Please advise engines with adequate architecture, which could at least be equal to. Thanks in advance!

Answer the question

In order to leave comments, you need to log in

5 answer(s)
D
Denis, 2015-09-09
@ssrdop

Let me send you to google with a slightly modified question , guided by the following argument that 90% of problems are solved using templates and spending time on bicycle building even for self-study purposes is highly discouraged, because studying architecture in general - you will solve more problems and build your own "microengine" in a couple of days, after understanding the basics of design.

Take a look at microdrive
<?php

error_reporting(E_ALL);
ini_set('display_errors', 1);

class Extension1
{
    public function renderContent()
    {
        return "Hello";
    }
}

class Extension2
{
    public function renderContent()
    {
        return "Word!";
    }
}


class MicroApp
{
    private $extensions;

    public function __construct($extensions)
    {
        foreach ($extensions as $extension) {
            $this->extensions[] = new $extension();
        }
    }

    public function run()
    {
        echo "<!DOCTYPE html>";
        foreach ($this->extensions as $extension) {
            echo htmlspecialchars($extension->renderContent(), ENT_COMPAT, 'UTF-8', true) . " ";
        }
        echo "</html>";
    }
}


$app = new MicroApp([
    'Extension1',
    'Extension2',
]);

$app->run();

S
sim3x, 2015-09-10
@sim3x

If you don’t step on the rake yourself, you won’t be able to learn anything.
So your task is rather to do it not like everyone else, but in your own way, and therefore redo it as it should

V
Vladislav Gaiduk, 2015-09-17
@Danan

simplemvcframework.com on gihab has examples.
https://github.com/panique/mini

D
dmitriy, 2015-09-11
@dmitriylanets

as an option, start a framework without a framework and then build your own version of the engine

A
Alexey Vasilyevich, 2015-09-17
@mariczzz

Take a look at Monstra - it's probably easier than ever :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question