📜 ⬆️ ⬇️

Moving KodiCMS from the Kohana Framework to Laravel 5



When writing articles on Habré, I noticed that the deceased Kohana framework was not to many people, and I heard a lot of criticism of the project for this reason and thought about the question: “ How to be and what to do with Kohana? “, Because the framework does not contribute to the development of CMS throughout the year.

The first thoughts were about the continuation of the development of Kohana on its own. First of all, Composer was integrated into the system, modules and plugins migrated to packages in the repository https://packagist.org/packages/kodicms/ and the package types https://github.com/composer/installers were added to the composer installer. After this, having spent some time searching, I came across the Kohana54 project ( https://github.com/kohana54/core ), the developer of which decided to bring all the classes into conformity with the PSR-4 standard, but apparently left to better times. At first, it didn’t worry me much, you could try to finish it for him, but after a few days I realized that in addition to the kernel itself, I would have to rewrite the rest of the standard framework modules as well as all the CMS modules, which is equivalent to using another, more modern framework and decided to finally tie it up with Kohana.
')

There was a question: “Which framework to choose?”



Comparing frameworks can pull on a whole article, so I’ll confine myself to my choice, the Laravel framework, which intrigued me:


For many people, April 1 is associated with the April Fool's Day, and for me, the birthday of a new project - KodiCMS on the laravel framework. On this day a new repository was created https://github.com/KodiCMS/kodicms-laravel and the first commit was added to it.

I will tell you a little about the structure of the new CMS. Many people know that Laravel out of the box does not have a modular structure, and the packages are not the same as the modules, so the ModuleLoader was the first thing to write that helped with the organization of the modular structure and the dynamic connection of the modules simply by specifying its name in the config file.

As a result, the structure of the module has the following form



Read more about modularity here.

By analogy with the modules, it is planned to connect third-party plug-ins with the only difference that they will be activated via the administrative interface with the ability to download them from the repository.

As they say, the eyes are afraid, but the hands do. After the implementation of the modular structure, the procedure for transferring standard modules of the system and the implementation of basic capabilities began. And at the moment, according to my estimates, a little more than 60% of the functionality has been transferred:


It was originally planned to transfer all the functionality for at least 6 months, but something went wrong and the process went faster ... The developers from the group in VK http://vk.com/laravel_rus and on the LaravelRUS channel became interested in the system , after which enthusiasts began to offer assistance in developing the project of one of the coolest OpenSource CMS on one of the coolest frameworks.

Why do we need another CMS?


When using different CMS, I often come across the fact that many of them offer the same functionality but with slight differences. Those. in fact, many CMS pushes the user into a certain frame, be it the URL structure or the placement of content on the pages of the site. Many of them have a self-written core, which is either difficult to expand, or you have to study the documentation for a long time to start developing.

When writing my CMS, I wanted to collect all the best from them and combine them into one. For a start, I decided to use one of the popular frameworks and to make changes to the kernel at a minimum, so that any developer could enter the development process in the shortest possible time. In addition, I do not want a CMS like everyone else, just with my name, my goal is to create a certain constructor in which you can construct your own sections (blog, news, etc.) by adding fields of the necessary types to them through the admin panel, which not rigidly sewn into the system code, but would be added with the help of plug-ins by third-party developers. The same with content output on the site pages. So that each user without special knowledge in programming and picking site templates can display the necessary data, be it a list of documents or a menu of the site or plain HTML. Allow the content manager to use his favorite text editor, which can be embedded into the system through the API and fully used in the admin panels.

Ideas on the system of the sea and all of them are implemented and most of them have already been implemented. Some of them may need to be improved. But everything as usual rests on the developers. Therefore, we invite everyone to join the development, the more it will help to improve their experience in working with the Laravel framework, as well as to use their experience in the future.

As usual you can always see the result of the work:


Website: http://laravel.kodicms.ru/backend

oror download and install locally https://github.com/KodiCMS/kodicms-laravel

Thanks


Thanks to KodiCMS, I discovered a world of good services and people who are ready to provide their help:

Ps In the near future, the first online meeting will be held to discuss the project, which will tell in more detail about the system, its history and current status https://vk.com/kodicms?w=wall-48395169_287%2Fall

Upd. At the moment, the system still has the status of the Alpha version and there may be errors in work or deficiencies, which will be subsequently eliminated. Bug reports are welcome.

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


All Articles