Why PRADO?

This post is a response to Paul M. Jones post called “ASP-style programming in PHP?“. Paul is the man behind the Solar system and Savant, a light-weight templating system for PHP. In his post he talks about “the ASP way” and “the PHP way” of web application development in PHP and directly relates “the ASP way” to the PRADO Framework.

As it turns out, there’s a PHP framework out there that maps well to “the ASP way”: Prado.

I would like to define what’s “the ASP way” that Paul’s mentioning. Even though I haven’t developed one line of code in ASP or ASP.NET I’m pretty sure that everyone can agree that ASP.NET is about component-based and event-driven development in addition to be using some declarative programming approach. In respect to this development approach for web applications Microsoft and the Windows platform has ASP.NET, Java has Java Server Faces and Wicket, Apple has Web Objects and Prado is now filling this gap in the PHP world.

I can see that Prado is very much *not* my style; I don’t know a lot of open-source scripter types (Perl/PHP/Python/Ruby) who would really go for this, as it seems over-architected to me. This is not meant as a critical point against Prado, because it obviously fills the needs for those who like that style of programming. Personally, I don’t really want another language on top of PHP (this relates back to why I started Savant; i.e., as a response to Smarty). But if you’re used to Microsoft or Java, I can see how this would be an easy way to get on board in the open-source world and start using PHP with your previous non-PHP habits.

Habits or not, being a PHP programmer doesn’t mean that you won’t like the component-based and event-driven approach. I’ve been a PHP developer for about 5 years now which means that I have some PHP habits, and as I said I’ve never touched ASP or ASP.NET. The reason I choose Prado over another presentation framework back in late 2004/early 2005 was it uniqueness. It stood out with well documented API documentation and a lot of reusable components like web controls, validators, I18N components etc. which I could start to build our complete new applications from. All developed using the a standard way of writing components, fully object-oriented using the latest features in PHP 5. Having this in place also helped my team quickly start developing and create a lot of new reusable components we could use in other applications. Prado is mostly about the presentation layer and interaction with the web application and doesn’t lock you in to use one database abstraction layer over another. Another good reason that I choose Prado was events and handler functions which keep your focus on the functional part of your logic and kind of express what you actually are trying to do.

Even though Prado may be the solution for a lot of web applications in PHP I see a lot of good web applications comming from what Paul call “the PHP way”. Take this particular blogging application for example, WordPress, which does a really good job at using PHP that way. I came to Prado after used years in “good old fashion PHP” and Perl code. I must admit that I was a bit tired of too much ustructured code and everyone had their own little framework or their own way of doing things. Taking over maintanance of a web application from another developer mostly ended in rewriting the whole application in the end.

Update: Mike Naberezny have some thoughts on this topic in his post.

2 Comments

Intol  on April 28th, 2006

I think that PRADO is realy good thing, is even revolution in PHP programming way of thinking.

Jarnail  on May 6th, 2008

Excellent, i can’t explain it in words.

GREAT JOB.

Leave a Comment