A web application framework is a bunch of source code organized into a certain architecture that can be used for rapid development of web applications. You can think of frameworks as half-produced applications that you can extend and form to make them take shape according to your needs. Well, that means half your work has already been done, but for some it is as much a blessing as a curse because this work was done in a particular way, without your supervision.
Thus all frameworks are either stained with a coding methodology and naming and structural conventions, or if they try to avoid these restrictions, they need to be heavily configured by you. This either reduces their flexibility or makes their learning curve significantly steeper. And if you really want to escape from these problems toward a more library-like approach, you have to sacrifice some development speed. You can see that frameworks are all about trade-offs.
That’s why it is really good to take a look at many frameworks and compare their differences. Perhaps one of them offers conventions that you would use as good practices, anyway? Perhaps you have nothing against some initial configuration that allows you to be rapid and flexible at the same time? And maybe you want just a library of powerful components to link together by yourself? The choice is yours, and if you find a way to mitigate their disadvantages, you can fully enjoy the greatest benefit of all frameworks: truly rapid development.
Further advantages of frameworks are elegance of code and minimizing the risk of programming errors.Frameworks conform to the Don’t Repeat Yourself (DRY) principle, which means that they have all the pieces of logic coded only once in one place. This rule forbids duplication of code, especially copypasting. This facilitates maintenance of code and prevents nasty errors. Generally,frameworks promote code re-usability and other good programming practices wherever they can, which is great for programmers who do not have enough knowledge or discipline to care for quality of code by themselves.
Another great feature is the clean organized look of links that can be done with URL rewriting, which is supported by most frameworks. Instead of /animals.php?species=cats&breed=mainecoon, type just /animals/cats/mainecoon. This is not only appealing to the eye but also very search engine optimization(SEO)–friendly.
Framework versus Library
The main difference between a library and a framework is that:
• libraries are called from your code
• frameworks call your code
In other words, a framework in your application is a skeleton that you fill with features or serves as a platform on which you build your modules. Whereas a library instead provides attachable modules on top of a platform made by yourself. Some people perceive a framework as something better or more complete than a library, so “framework” became a buzzword that is often overused.
That’s why people call some libraries frameworks, even though they do not invoke developers’ code. There is nothing wrong with a piece of code being a library, as it is just a different entity. And there are also some bad frameworks that damage the reputation of the goodones—basically you can take any half-done application,release it, and call it a framework. These two software groups just behave differently and should not be confused.
In the coming week we are going to brief down some of most popular PHP Application framework and features and advantage. And why HypoHosting is called 100% Application Framework Hosting Provider.