I spent the last few weeks trying to discover the best PHP MVC framework to develop my fresh new projects. CakePHP, CodeIgniter, Zend, Symfony, the newest Laravel and many others… At least for my intentions most of them have a very long learning curve and I have found some other issues that really bothers me: complexity to installing (I’m not a fan of composer), unnecessary rewriting of native PHP methods, very poor performance on SQL queries, too many conventions to memorize, etc.
So I decided to start my own PHP MVC Framework: Moj
I don’t know if this is a smart decision (probably not because of reinventing the wheel), but now I’m very happy coding over my own framework (that I completely understand) and keeping my worries on what does matter for me.
I took some hours and built the skeleton. Then I downloaded the unstyled version of HTML5 boilerplate and merged up. For now I have what I’m calling a PHP boilerplate, just the way I wanted. And I don’t intend to make it bigger. My main objective is to keep it very simple, light-weight, fast to execute and ease to learn, install and use. But this doesn’t means that I’m not gonna make some basic modules to extend the available features. It means that these improvements should be completely independent. So, despite the possible bugs and crucial functionality that I can be missing, the core of Moj is practically done. Beta version is available online: https://github.com/leomuniz/moj
Moj’s skeleton benchmarks 95/100 on Google Pagespeed Insights Test. This value is higher even than Google’s home (90/100). But, no matter what PHP MVC Framework you are using, it will be very difficult for a complete developed website to maintain this score (there are many things developers should pay attention like image compression, render-blocking JS and CSS, prioritize visible content, etc) but I believe it is a very good start point.
Moj next steps:
- Create a different version with twitter bootstrap.
- Create separated and common modules that I can use like plugins (register and login user controller, Google and Facebook login controller, paypal integration controller, fileupload, pagination and other common functionalities to help me speed up the development process).
- Integrate SASS (and I also have to learn it)
- Develop a cache system to allow Moj usage on big sites
- Create an installer (an easy way to configure) for the first time accessing the Moj directory.
Moj is a free and an open-source PHP MVC Framework. It will be an honor for me if somebody uses it or helps me on development making suggestions of coding, performance or anything else. On the next posts I will explain how to use Moj and I will be available to help everyone using Moj.