Page 1 of 1

Another Day, Another Framework -- Call for Intl Standards

Posted: Mon Jul 13, 2009 10:49 am
by volomike
Seems PHP MVC frameworks are now being generated at about 2 per month, and they appear to usually have an emphasis on minimalism. Here's two more:

http://www.phparch.com/main/news/view/1 ... _architect

Madeam PHP Framework

sierra-php Framework

There are similar traits in all of the MVC frameworks. I'd like to all the people who have built these frameworks get together with the International Standards Organization for a conference and then form working committees out of that in order to create ISO standards. If we did that, then it would be easier to get a PHP job because you know the PHP MVC international standard. Currently when looking for a PHP job, you have a list of several PHP MVC frameworks -- mostly CakePHP, CodeIgniter (CI), Zend Framework, and Symfony -- but then again I see job listings that state, "Must know an MVC framework like Zend or CI."

It would be great if the standards were community-driven by calling a fair vote based on reason and logic, but unfortunately I think things may be too weighted for Zend and the other larger frameworks because more people know those than others. I'd like to see devs go into a room, list out all the ways that the gazillion PHP MVC frameworks (even lightweight ones) handle just one thing, such as their controller interaction. They'd have a public debate on the advantages and disadvantages of these object model designs or what's under the hood in the native API that drives those designs, and then decide for instance that they like the interface of CakePHP, for instance, but perhaps like the more sound API approach of Sierra. (Oh, and I just pulled that out of my hat -- don't take me literally.) From there, they could work together to create the best controller interface and native PHP API approach and come out with something new. But then it's not over -- you'd have to do the same thing with the model API, the view API, and then work towards getting a consolidated approach among them all that everyone can agree upon. From there, you could step back a bit and start to get vague, explaining things in a looser format such that all the current MVC frameworks could work towards that goal rather than be handed lines of code and told, "Stick that in your PHP framework."

The end goal would be that no matter what MVC framework you go with, if it meets the international standard, then its core API would be at least 80% identical in interface, and there would be recommendations (not requirements) for how those interfaces are applied to the native PHP API underneath. From there, the rest of the MVC framework could deviate from that standard with new ideas. So the end goal would provide for developers to get started on a project fast without confusion, and then learn the rest of the particular MVC framework after that. This has worked well for the databases with at least the ANSI-92 base standard. (Yes, I'm aware that other ANSI SQL standards have come after that, but most databases have at least tried to comply with ANSI-92.)

Or perhaps the standard could be limited to the M, V, and C. And a framework could say, "Meets international PHP MVC controller standard ISO 800054.1" for just the controllers, let's say. I don't know if I like that approach, but perhaps some others may like it.

///

Another thought I have is about Apache2 and the typical trick one does for handling a web-based front controller with a PHP MVC framework in the .htaccess file:

Code: Select all

RewriteEngine On
SetEnv URL_PREFIX  /myapp
# or could also be SetEnv URL_PREFIX  /
php_value auto_prepend_file 'system/bootstrap.php'
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . %{ENV:URL_PREFIX}index.php [QSA]
You see that so often that I wonder if the Apache core devs are watching, and if they might want to consolidate this a little better like:

Code: Select all

BaseURL /myapp
BootStrap system/bootstrap.php
FrontController index.php
And so whether this is Python, Ruby, PHP, or whatever, it would all pretty much act the same way.

Re: Another Day, Another Framework -- Call for Intl Standards

Posted: Mon Jul 13, 2009 10:53 am
by volomike
The ISO says on their site that the first line of contact is the standards organization in your country. For the USA, that means ANSI, and their email is:

info@ansi.org

I'm considering an inquiry on PHP MVC frameworks. It's about time.

EDIT: I contacted ANSI by email to see how to get the ball rolling here. I'll let you know what they respond. More than likely I'll get the run-around with their monstrously huge political organization. And as I don't have a lot of spare cash sitting around for a membership, they'll probably just flick me off like a fly. Hahaha.

Re: Another Day, Another Framework -- Call for Intl Standards

Posted: Mon Jul 13, 2009 12:11 pm
by volomike
They contacted me and said I should contact this address:

INCITS Secretariat
c/o Information Technology Industry Council
110 K Street NW, Suite 610 | Washington, DC 20005
Phone 202-737-8888 | Fax 202-638-4922
email incits@itic.org

EDIT: Just sent them the email. Let's see where this goes.

Re: Another Day, Another Framework -- Call for Intl Standards

Posted: Mon Jul 13, 2009 12:25 pm
by matthijs
The problem of course is, that there are always more ways to do things. Certainly if you're talking about such a huge and complex thing as a code framework/library.

Different situations require different solutions. Different people have different preferences. Therefore, it's totally logical that there are many frameworks out there. And there is room for plenty of frameworks. Framework A fits better for project X, framework B fits better for project Y

However, I can see that having at least some established "standards" as recommendations would be a good thing. So to start an official coding standard would be nice (maybe ZF's is the defacto one). Then after that a naming standard for the different design patterns. That alone would be such a huge difference. So that when I read something about Someframework_Registry that I know it's about the same as Someotherframeworks_Registry.

Gathering these definitions and finding some consensus would be a massive job however (if you'd ever be able to succeed)

Re: Another Day, Another Framework -- Call for Intl Standards

Posted: Mon Jul 13, 2009 8:09 pm
by volomike
Let me put the analogy like this. Look at the ANSI-92 standard. Almost every SQL product/project on the market usually hits this compatibility to at least 80% or 90% within 2 years of being released. It's a small subset of SQL commands. By having this, we developers have been able to get jobs a little easier. Now if you know one SQL API, you pretty much know most SQL platforms to some degree. Also, by it being an open standard worked out on a national community level, or an international level, it permits us to move beyond a patent troll from blocking you from using ordinary things like a SELECT statement.

That's the kind of thing I'm seeking for PHP MVC frameworks. I'd like to see a small subset of basic workflow API through the M, V, and C, from the best minds in the industry, put towards the goal of working this out. I'd like to see:

A. A minimalist MVC workflow ironed out that has an established object model and naming convention. Each MVC framework that supports this standard would support that object model, but may also extend that model or make a dual model so that one could go either route.

The core API would mean that you know how to handle routes with front controllers and page controllers (should this be a web model), data entry input, data validation and filter (as well as security filter like XSS), model loading, output parameter filter, view loading and output parameter population, and view rendering and displaying.

B. A set of suggestions on best practices for the native PHP API implementation of that object model.

C. Continued work on addon libraries to that MVC core API with the most commonly necessary libraries, such as for cookie management, session management, compression management, and so on. It would follow the same work as points A and B -- a minimalist object model that gets the job done, and a set of suggested best practices for the native PHP API implementation of that object model. This would be outside the core standard, but would be called a standard library addendum.

From this you could pick any given MVC framework off the Internet that supported the standard, and be right at home in handling MVC workflow or common things like cookie management. Sure, you can also deviate into extra stuff outside the core standard API, but at least you could be off and running fairly fast and we PHP developers could simply get ourselves ISO PHP MVC 901 Certified (I pulled that out of my hat) for example, and get ourselves onto a project far easier than having to learn the top 5 PHP MVC frameworks.

How many of you would like to pass one certification exam and be at home on almost any PHP MVC framework on the market, catch any future PHP project that uses an MVC framework, and not have to learn the top 5 PHP MVC frameworks instead? For me, I'd rather go the certification route. It's cleaner and I can join any project team in progress and be completely at home just like I'm at home with any project using ANSI-92 SQL.

And how many of you would like to stick to a PHP MVC framework knowing full well you're going to be protected from the software patent trolls later on down the line -- because you used an open standard from the ISO? Yeah, that's another benefit.

Re: Another Day, Another Framework -- Call for Intl Standards

Posted: Tue Jul 14, 2009 7:02 am
by matthijs
I think everybody agrees that having those standards would be a huge advantage for everyone. The problem is, how to get everyone to agree what standards to define and to use

heck, just look at the fact that the US (and some other countries) still use measures like miles, feet, gallons, pound, etc. even though there is a perfect standard available.

Re: Another Day, Another Framework -- Call for Intl Standards

Posted: Tue Jul 14, 2009 7:15 am
by Jenk
I must say with all honesty, there is no benefit from having a standard, ANSI or otherwise. ANSI are particularly awkward to work with, from experience in Smalltalk, as they have some questionable criteria (such as they take credit for your work..)

If you don't like a framework, don't use it. No point having a standards authority that everyone is likely to ignore anyway.

Re: Another Day, Another Framework -- Call for Intl Standards

Posted: Tue Jul 14, 2009 7:15 am
by Eran
I don't think such standards are possible. The standards are the patterns, the implementation is much more preference oriented. By comparison, the patterns are the ANSI SQL standard, and the framework is the database engine (which people cannot agree on which is best either).

In a room full of developers you'll probably be hard pressed to find two that agree on what an MVC stack should include and how it should be implemented. The proliferation of MVC frameworks is the result of this issue. If people could agree that any of current frameworks represent something close to a standard, they won't be building their own offshoots.

Re: Another Day, Another Framework -- Call for Intl Standards

Posted: Tue Jul 14, 2009 8:49 am
by alex.barylski
I agree with the above sentiments. Standards won't work here, not until one framework rises as the clear winner, which Zend has failed to do IMHO, although it maybe be the dominant player, the sheer number of other frameworks gives Zend maybe a 10% market share at best.

The best thing you can do Mike, is find a framework which you love and adore, and master it, promote it and be it's number one advocate.

Zend is a good choice because of it's relative popularity and recognition as an industry leader, although I personally think it's way complex and frustrating to work with.

Re: Another Day, Another Framework -- Call for Intl Standards

Posted: Tue Jul 14, 2009 12:24 pm
by Christopher
It seem like the goal here is to allow some number of programmers like volomike to potentially get more work. So the first question is whether the problem widespread enough that many programmers would join together to solve it? The second question is whether the proposal will actually solve the problem?

Re: Another Day, Another Framework -- Call for Intl Standards

Posted: Tue Jul 14, 2009 1:31 pm
by alex.barylski
I see what Mike is trying to do, and logically it makes sense, but realistically I think it's a pipe dream, at least in a community driven environment like PHP and LAMP.

If you want standards, I would have to say go with ASP.NET. You get one framework, lots of support, excellent IDE but your confined to that environment almost always. I haven't used M$ technologies in a long while, but the same can be said for Windows desktop development.

C++ has many frameworks and tools, so many it's hard ot keep up, so most developers who develop for Windows just stick with MFC as it has become the defacto standard, beating out Borland OWL and many others.

In open source, you lack those standards because it would stiffle innovation, which is the very thing that keeps the movement going forward.

It's a double edge sword really, I can see advantages/negatives to both commercial/proprietary and open source, I selected PHP because it was free to learn, whereas M$ wanted money for ASP at the time. :P

Cheers,
Alex