Next Step in Web Development – UI Frameworks
How do we turn it over and make things easier? Answer is — PHP UI Framework.
Difference between PHP UI and regular PHP Framework
The “PHP UI” is a reference to a type of a server-side framework, which handles generation of User Interface.
The regular PHP Framework such as Zend, CI, Symfony, Yii do not impose any of the requirement for the user interface. Some modules or software built on them can have a bit of interface, but it’s not generally universal. Most importantly – 3rd party software or plugins cannot rely on the interface.
The UI frameworks have their roots in the desktop windowing environments such as Cocoa, Windows API and Turbo Vision. Such a framework allows you to define “views” which can be placed into other container-”views”. Each view can be placed there multiple times and each instance would work perfectly and independently.
UI Framework with Rich Browser Client
One of the first to play with idea of visual UI was Microsoft. Having a rich experience in windows-based software they were able to build the tools for Web Development using User Interface builder. Unfortunately the didn’t look very web-like and the UI layer of .NET was often replaced.
The approach of rich client-side application is not always the answer, because what they offer is not exactly a Website.
Server-side UI Frameworks
While looking for different PHP UI Frameworks, I came over the quote: “PHP does not create UIs. PHP just outputs stuff to stdout”. It reflects the the problem with PHP quite well. Many of us want PHP to create User Interface. Let’s see what’s out there:
This is quite nice suite of different components. It’s been around for a long while and gives developer a simple way to get user interface going. http://www.koolphp.net/
KoolPHP is commercial-only.
PhpPeanuts does in general not generate code. Instead its components adapt dynamically to the data definitions. It doesn’t do just CRUD, relations and searching are also scaffolded. Because it adapts dynamically you can start with the simpelest thing that could possibly work for your application, and refactor later if the need arises, without losing much productivity. The eXtreme Programming way.
There are open-source and commercial versions of phpPeanuts. It also looks like it’s not very active one.
A recent newcomer to PHP UI Framework, Agile Toolkit, focuses on the Object-Oriented aspects of User Interface building and strong integration with jQuery. Agile Toolkit have a very strong focus on simplicity of Web Development and flexibility.
There are open-source and commercial versions of Agile Toolkit.
NOLOH is commercial-only and closed-source.
I’ve came over many “generator” solutions for PHP. Form-generator, CRUD-generator and so on. They make it very simple for non-developer to get something going and their certainly pack some strong punch behind them. However they are not suitable for any projects which require to produce more than one page of user interface.
There are many other PHP frameworks which try to tap into User Interface.
- Drupal is worth mentioning, although it’s more focused on End-user rather then developer.
- QCodo is an interesting framework which embraces object-oriented approach and aims to make things simpler for developers.
- If I have missed some others, please mention them in the comments.
Picking up a UI Framework can save a lot of time developing a web application or a website. There you might loose a bit of flexibility, depending on the framework you pick, although you get the job done. In most cases, the UI framework comes with would be quite decent, possibly even better than the one you would have done yourself.
UI Frameworks would generally also protect you against many of the injections. Collecting input and outputting data safely is a primary job of UI Framework.
The most important part is that UI Framework will finally put a infrastructure into your user interface. The PHP will no longer “just output stuff to stdout” , it will actually let you manipulate real, visible objects.
There is always a challenge which is there due to the nature of PHP language and RESTful nature of web apps — Framework must produce HTML and it must produce it FAST. While UI Frameworks offer more features, some of them might be slower.
I myself believe that the UI Frameworks are greatly demanded in PHP and I encourage you to look into them, download them an try them in your next project. You will be amazed at how much more efficient you could get.