Next Step in Web Development – UI Frameworks

Thursday, September 8th, 2011|Beginner tips, Brainstorming, Misc|by Romans

Over the decade now web developers had to constantly evolve and learn more and more skills. The basic knowledge of HTML and the server-side language (such as PHP) is no longer sufficient. Expectations for web applications grow and Web Developers need to know CSS, HTML5, JavaScript, SQL as wall as many other libraries and frameworks – jQuery, CSS Frameworks, PHP 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.

JavaScript quickly picked up and a number of rich client-side frameworks appeared. They prefer to communicate with the server through JSON and they do most of the stuff on the client-side. In fact, a plain PHP framework could be quite efficient at pairing up with rich client-side framework. FRAPI, Recess are sufficiently thin candidates for the job.

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:

KoolPHP

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 just a set of tools though. It’s not a framework. It also comes with it’s own JavaScript layer and is difficult to extend.

KoolPHP is commercial-only.

phpPeanuts

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.

http://www.phppeanuts.org/

There are open-source and commercial versions of phpPeanuts. It also looks like it’s not very active one.

Agile Toolkit

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.

http://agiletoolkit.org/

There are open-source and commercial versions of Agile Toolkit.

NOLOH

NOLOH stands for “Not a line of HTML”. NOLOH is an event-driven lightweight, on-demand, object-oriented Web application development platform. NOLOH binds with the client-side proprietary JavaScript library which then talks with the framework and implements the interface.

http://www.noloh.com/

NOLOH is commercial-only and closed-source.

Generators

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.

Others

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.

Conclusion

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.

1 Comment

Prodmetrics
Posted August 27, 20129:55 am

JavaScript quickly picked up and a number of rich client-side frameworks appeared.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.it is good to understand and getting a good response to your site..
Continue your success like this…