Benefits of PHP Frameworks

January 15th, 2012

Working with PHP Frameworks usually makes going live with a site much easier, primarily because the simplicity in using PHP sometimes acts against it. Since there are very few coding restrictions, developers tend to write a bad code

Some of the primary advantages of using a PHP framework are:

  1. Finish coding faster: Frameworks help the developers to write code in a shorter amount of time. In startups, time is is money, and money is in short supply. Not working with a framework means you reinvent the wheel every time.
  2. Coding consistency: The MVC code is easy to write and also follows the code restrictions. Due to a uniform and standard coding, things are simpler and bugs can be resolved faster. This also makes maintaining the code easier when multiple people work on the project or one developer initially writes the MVP and someone else has the responsibility for adding functionality.
  3. Code Recycling: By using PHP frameworks in web development, most basic features are almost same, and thus you can recycle the code (modified if necessary) of any module in different projects.
  4. Reliability: PHP frameworks already run millions of applications. They have been tested and proven, giving your application a very solid foundation.
  5. Debugging: PHP frameworks have their own specific debugging methodologies that allow you to easily identify errors in your development.
  6. Community Assistance: You can always ask for help in the very active framework community.
  7. Capability/Functionality: The frameworks have numerous functions that have been developed to assist in developing your application. There are functions for handling date formats, database connections, handling emails, editing strings etc. You no longer need to manually enter all the validation criteria for forms etc. You merely instantiate a new form validator object and instruct it as you wish. The framework will handle the rest.

An important consideration though is that Frameworks are for experienced people. Rails has the same problem, but maybe in even worse form, as most Rails coders have their first exposure to Ruby through Rails and not starting as a Ruby developer.

The bottom line is that frameworks considerably speed up the development of an application and contribute to a greater ease of maintainability and the adding of functionality.

PHP Frameworks

December 19th, 2011

There has been an explosion in the number of PHP frameworks over the past several years for use with PHP. This coincides with the explosion of the use of PHP in web development. PHP is easy to learn and was designed as a language specifically for producing web pages. This means that choosing PHP as your implementation language allows you to build a dynamically-generated web site quickly and easily.

However, coding in PHP, or most any language, can get repetitive when the same task is coded time after time. This results in lost productivity and the possibility of introducing coding errors. This is why frameworks have been built.

A framework streamlines the development of web applications by providing a basic structure. They promote rapid application development (RAD), saving time, money and providing the ability to get a product (maybe MVP for a lean startup) to market faster. A framework also helps build more stable applications as framework code, once it is developed, thoroughly tested and subsequently used, doesn’t require the same amount of testing each time it is used as a newly built application. Frameworks can enable you to get increased productivity and coding reliability from junior developers, which can result in reduced development costs and allow you to spend more time creating the actual web application rather than writing the same code to do common functions time after time.

The general concept used by a framework is the use of a Model View Controller (MVC) architecture. The basis of the MVC architecture is to isolate the business logic from the User Interface (UI) and the input logic while providing a loose coupling between the elements. In MVC, Model refers to data, View is the presentation layer and the Controller receives user input and initiates a response. The use of an MVC architecture allows you to work on individual components of an application while leaving the other elements untouched.

As I mentioned, there are many different frameworks, some of the most widely used being Zend, Symfony, CakePHP, CodeIgnitor and Yii. You can even create your own. However, you should always examine your project to decide if you should even use a framework. Will the framework save the development team time and effort? How will the app perform? Will the framework improve application stability? If so, a framework should be considered.

In a future post I’ll discuss the advantages and disadvantages of using PHP frameworks in greater detail.

.NET – Strengths and Weaknesses

September 18th, 2009

The biggest strengths of .NET are its widespread use and ease of finding skilled developers and admin, primarily due to the fact that so many companies already run Windows based servers.  While it has wide adoption in Windows based organizations, this platform is not as frequently seen in startups which start from a clean slate and are more cost conscious.

Let’s look at some key components for a comparison:

Open Source – No

Object Oriented – Yes

Compiled Code – Yes

Scripted Language – No

Licensing Cost – Expensive licensing costs

Platforms – Windows

Hardware Costs – Mid-range costs

Staffing – Easy to find qualified admin staff

External Hosting – Available, but more expensive than PHP

Security – Getting better

Performance – The better the hardware the better the performance

Scalability – Can be difficult

Admin – Easy

Available Frameworks – One standardized framework.

Compatibility – Mid-range.  New releases sometimes break functionality.