Wednesday, May 29, 2013

Less Frame, More Work

When I started to code QetriX in PHP, I didn't plan to release it as a framework. But with progress of the concept my perspective slightly changed.

First of all, the idea is cross platform, cross environment and cross language. It says just "what", not "how". Second of all, I think the idea may be used in a wrong way, so It's gonna be better, if I set the rules here and let fellow programmers just to follow them and stick with them.

Because all languages I'm focusing on are very similar, I decided to unify the code across all these langs. I'm talking about PHP, Java and C# here.

How it works:
  1. Install
  2. Profit
I don't plan to document the framework to the core. I don't want people to mess with the core code. One day I may release a printed book, as I always wanted, with deeper explanation how stuff works.

I don't want to look like I'm hiding something there. I know my coding habits are sometimes obsolete, but I'm strictly against today's beloved bloats, like giant classes in PHP even in situations, when simple function would do the job as well. I want my code quick and sleek, performance tests speaks loudly against OOP in PHP. In latest PHP builds it's better, but still little slower and more memory consuming.

On the other hand because I decided to unify the code, I have no choice but use objects. Making full OOP in PHP is like mounting wings on a car and trying to fly with that - it takes a lot of time and effort and the result is questionable. So I will try use the OOP wisely, only in situations, that otherwise would be problematic (like no object for "toolbox" or app itself).

Except for that, I don't want anyone to change anything in the code (PHP, JavaScript), everything is there for a reason. If you need anything to work in a different way, you may consider to look somewhere else. The framework is built to be "just enough" for the purpose it serves. I want full out-of-the-box experience.

During implementation it's possible to add a new module, but again - with deep respect to the ecosystem. The only part I'm completely OK about changes is CSS, but even there I created everything you may need.

Regardless, I'd love to hear a suggestions or constructive criticism (preferably with refactored code), if it stays in defined boundaries.

No comments:

Post a Comment