Posts

Showing posts with the label framework

PHP Framework Comparison (update: opcode caching)

Image
Reading about PHP frameworks, you'll get a lot about Symfony and Zend Framework. It is true that these frameworks have a lot of features and do great marketing. But what about performance and scalability? There are 2 kinds of frameworks: those written in C as an extension and those written in PHP Using a framework written in C will definitively give the best performance. But fixing (security) bugs and maintaining them requires C knowledge. If the documentation is not complete or incorrect, you might need to read the code to understand the functionality or wait for the maintainer to help you. So if you don't need super high performance, my recommendation is using a framework written in PHP. Here is a test from Laruence (PHP core developer): higher numbers are better, source Here is another test from Zeev Suraski (Zend/PHP core developer): higher numbers are better, source Here is another excellent test from Wang Rui: smaller numbers are better, source (with call graphs, respon...

ircmaxell: Framework Fixation - An Anti Pattern

ircmaxell: Framework Fixation - An Anti Pattern , short summary: delegation of architecture decisions to frameworks may not be optimal or even wrong only use frameworks when doing prototypes or projects you don't need to maintain frameworks don't save time/money in the long term frameworks don't make it easier to hire good programmers using a framework prevents developers from understanding backgrounds not all framework developers are super heroes (look at the bug trackers ...) favor libraries over frameworks Quotes: Most of the monolithic frameworks are red herrings...solving problems of yesterday The typical mantra of "just let a framework do it for you" helps nothing except creating brainless code monkeys. ( source ) My opinion: frameworks are not so bad, but you need to evaluate them very carefully before using evaluation means checking code quality, features AND performance matching the specific problems of your business choosing the wrong framework throws...

Development Principles - Think first programming

Image
A professor once told me: Remember, a string goes into the server, a string goes out. Not more, not less. So let's ask the following questions: do you need a seven tier architecture? do you need to write a servlet container in PHP? do you need to derive a class more than twice? where do you need OOP? do you need design patterns? how to choose the right technology? And here are the development principles: keep it simple and stupid! (kiss principle) don't write your architecture on more than one slide write less code, you must maintain it! test your code, you're responsible for it! don't import much code from libraries, you might need to fix or upgrade it don't trust user input, don't trust foreign code, trust your own code don't use design patterns you don't understand no backup, no future don't use technologies you haven't evaluated for the current task if you're not sure how to decide, make more tests don't follow general recommendation...