Sunday, January 8, 2012

My answer to "zendframework"

This is my answer to a Question on Support site for LampCMS project


I would not recommend it. This project, I mean the structure, the organization of classes, the autoloader, all work very well, acting as a full featured framework already.

Zend, is good framework but it's not going to be easier, it would be more difficult and less efficient if you were to use Zend. The reason I wrote everything from scratch is because I wanted to have a very efficient, very fast program.

I have given it alot of thought as far as rewriting it as a module for Symphone2 framework, since the whole approach to loading classes using dependency injection (out Registry class) is very similar to Symphony approach.

So if would be easier to port this to Symphony2 than to Zend, but then the question is why?
If you want to make it slower and more difficult to use then go ahead, port it to Zend, just include my copyright on modueles you going to reuse and rewrite.

As for me, I thought of rewriting it in Java just because in would be even faster in Java, but the speed gain would only mean anything if this project was used in a super highg traffic site where you get thousands of requests per second - not per minute but per second. And again, I had (still have) an idea to write it in Java but only to write the RESTful api service, no UI at all, then wrote UI completely in JavaScript for the web, mobile etc. Also can write Android and Iphone native apps using the API. Only for this type of service it's going to be worth it to rewrite it in java and then it can probably compete in scalability with big social network type of sites.
I recently took time to learn about Java Spring framework, Jersey framework and Guise frameworks, but this was just a research type of thing, have not decided on either one. Spring is something that worked for me, but I think Jersey is better for just RESTful service with no frontend, but I could not make Jersey to work in my environment, I saw many people are having the same difficulties getting Jersey based API to even work.

By the way, if anyone has experience with Java Jersey framework or with Spring, especially with Spring MVC, I am very interested in collaboration and starting a super-high efficiency API.

So in conclusion, I does not make sense to port this project to something slower, only to something that would be faster (Java or C++, but C++ is way to unfriendly as a language, so I have to pass)

The way it's written now, this program can handle couple of million page requests per day on a single server easily, then can add more servers and scale.


No comments:

Post a Comment