Thursday, October 27, 2005

Zend Framework (post is too long so make sure to grab coffee)

I've been happy to see that there has been so much positive feedback regarding the Zend Framework. I'd like to thank everyone who have shared their thoughts and suggestions with me either via email or blog postings.

I'm aware that things are a bit fuzzy at this point (vapourware?), although Wez's recent blog posting has definitely made things a bit more real for many.

My intention is to share some of the work as early as possible so that people can start to play around with it. Main reason why we're holding back right now, is because at this point I don't believe we have enough implemented to make a good first impression. We have made some good progress when it comes to modules such as implementations for application-level search (ala Lucene), database access (active record), input filtering and logging but we definitely need to remain focused on the development in order to get it together.

As some know, our ultimate goal for the framework is what we call "Extreme Simplicity". Some might have heard me use that term in some of the talks regarding PHP, and I'd like to bring this concept over to the framework. I believe this is what the PHP spirit is all about and the idea behind it is that it's possible to create very simple & easy-to-use languages&frameworks which still remain powerful and flexible, e.g. PHP, SimpleXML or ext/soap. Sure it's tough, because you have to choose the 80% feature set that you want to implement and not the 100%, and giving up functionality isn't always easy, but by creating what I call a use-at-will architecture you can do that but still let people use other mechanism if they need to (for example, power users of PHP write C extensions, e.g. Yahoo!). Another example of use-at-will is DB access. I believe a large amount of framework users would prefer to use PDO or native DB access, and not ActiveRecord. But people who are looking at creating rapid applications and don't need to go down to the native driver level, would have a much easier time. Both would work which I think is also what people expect.

In any case, the progress we've made is still short from being called a framework. We are currently working on some of the key MVC glue which would really define the framework for what it is. We have gotten some great ideas, especially from 100days who are working with us on the framework. The main challenge is to create a model-controller that is both simple to use and powerful. I definitely wouldn't want to go into what I consider a complicated route such as Java struts. Striking the right balance is hard and it often means implementing just the features, which make it "good enough". In fact, that's harder than doing something which does everything.

I know there have been some questions regarding licensing although Wez' blog entries have cleared most of that up. I definitely think that in order for PHP to continue to be a market leader and kick some of our competitor's butts (you know who you are), it is important to offer the capability for companies to build their solutions on top of something they know won't get them into legal trouble. Today, most companies who are actually doing commercial work around PHP, are building everything from scratch exactly for this reason, which at the end of the day is a big waste of good talented cycles. Software vendors (e.g. SugarCRM) have to be careful because they are building their commercial business around their PHP based application. If you don't have a license to the code you're selling, it can get you in a lot of trouble, therefore Sugar had to build everything from scratch.

So by us putting a CLA in place which is almost identical to the Apache CLA and by having a license which is pretty much a replica of the PHP license, we are enabling non-crippling widespread commercial & non-commercial use and allow users to feel very comfortable with the integrity of the code on which they are building their solutions. In regards to Lukas's post, I'd like to point out that by signing a CLA one doesn't assign their IP to another entity, but rather grant a license, and in addition, make a declaration that the contribution is truly yours and not taken from a third-party. So at the end of the day, contributors are still 100% free to do what they want with theirown code, but just giving us permission to use it in the framework.

I've also seen some comments regarding PEAR, and have had discussions with some of the main PEAR guys and contributors over the past week. I'm glad that the folks that I talked to sees things similar to me. There's a good portion of our community, for who the issue of IP is not significant to their day to day business, who are likely to make usage of PEAR components in conjunction with the Zend Framework. And there's no real reason for it not to be so. There are some great packages in PEAR and the Zend Framework is not aiming at being as rich in functionality as PEAR. Rather, we are trying to take what we think is the important foundation for next-gen Web applications and building that in a very straightforward and simple way, making it easy to build powerful apps on top of it.

Anyway, the main focus right now is to get something ready which we can actually show (re: Vaporware). We are working as hard as we can to get something out quickly. Creating a simple and uniform framework is definitely not an easy task, which is why having a small focused group is so important.

I am planning to give a Webcast with php|architect within a bit over a month where we'll talk more about the framework and hopefully also have some stuff to show. If there's enough to show before that, I'll definitely do so.

Back to work. Thanks again for all the feedback and emails. Keep it coming.

16 comments:

  1. One question I haven't seend answered: Is the Zend Framework something that has been extracted from an existing application base, or is it being created from design principles first?

    ReplyDelete
  2. Hi Michael,

    We are creating the Zend Framework from scratch according to our design principles. As I mentioned in my blog posting, it is very hard to achieve simplicity and I believe the only way to achieve that is to start the right way from scratch.

    Of course, many of us, have been involved in other projects and are also looking at other technologies from which we are learning, and areadapting that knowledge to these design principles. There are also some isolated instances, such as the Syndication implementation (RSS/ATOM), where we might possibly refactor some code which we already have and is very much inline with these principles.
    I hope that answers your question.

    ReplyDelete
  3. Andi,

    Thanks for the intriguing post. I am very excited to see what the Zend framework will offer commercial php developers.

    I am employed as a fulltime php web application developer making online learning components and so forth. We have some very large projects (the flagship application was approaching 200,000 lines of code when last I heard and it drives a MySQL database of about 400mb over 70 tables or so). I think it's safe to say that that is, by php standards, a fairly large web application.

    As you mentioned, due to the licensing concerns and the need for code IP (our stakeholders are not interested in funding open source development as a courtesy), we cannot use any available code and have, thus far, developed everything in house (I even just finished developing a trim little forum application along the lines of phpbb (but about 1/10th the complexity) just because we cannot afford to get caught up in legal issues.

    So, my point is that as an enterprise level php development house, IP is a tremendous concern and so I am very interested and excited to see what the Zend framework will offer.

    I have been playing with Ruby on Rails lately and my company is considering using it in the future to implement new projects which don't require access to our existing libraries. While I am certainly fascinated by the ruby language and have no qualm with the idea of learning a new language/framework in the interest of moving toward better code separation and more maintainable applications, it would really be a blessing if there was a php framework which does what rails does and does it as well as rails. Over the last week I have downloaded and reviewed perhaps a half dozen php MVC frameworks which are basically rails clones (for all intents and purposes) and not a single one of them could even scratch the surface of the level of quality and documentation available in rails.

    Most of them were pretty low-standard code and the ones which looked almost like they could be usable had little to no documentation. When I asked some of the project developers about the lack of documentation for the project, a few of them said that they didn't bother documenting because the API was changing so frequently that the docs would be quickly outdated.

    This reinforces my concern that php is lacking an enterprise-ready framework. No one with any common sense at all is about to undertake a serious project using a library which will probably change so much over the next short period that the application would break if you wanted to update for bugfixes. Also, I hate to be cynical, but I wouldn't bet any money that any of these frameworks are going to be in any better situation 1, 2 years from now (if they are even still active at all). Open source projects, which I appreciate what they offer (I'm a full-time linux user, myself) are very unreliable at best. Some of them are incredibly well maintained and reliable, but so many of them just die off overnight because a maintainer loses interest or no longer has free time or insert a reason here.

    A web framework backed by a solid foundation like Zend (of whom my company is already a client) would be a very reassuring vote for the software's longevity and expected quality of maintenance.

    Is there any way to get on to a beta test unit so that I could evaluate the zend framework and perhaps offer some input? I understand you don't feel it's ready for public yet, but you must be getting some feedback outside the organization? If so, email me.

    justin dot rebelo at telus dot net

    Thanks

    ReplyDelete
  4. Something I've not seen answered: Will the framework be distributed with PHP? If so will updates only be available as and when new releases of PHP are available, or will they be downloadable separately? IIRC this was quite an issue for PEAR for a while.

    IMHO, to gather momentum and users, there should be at least some part if not all distributed with PHP itself.

    ReplyDelete
  5. Something i've been asking myself for a while now: Why is there so much talk about input filtering if most of the problems are with output (eg: php6 wishlist thread). I just hope the template system has good default output filters (i don't consider htmlentities and urlencode to be enough)

    ReplyDelete
  6. Hi

    It would be nice to use some PEAR classes like HTML_Quickform and other template systems like Smarty all together with the new framwork.

    regards

    ReplyDelete
  7. Personally think Zend Framework is great news and something PHP badly needs. In fact I'm tired (very very tired) of having to contend with the current lack of framework of solid framework. And there "solid" is defined more by "stable / maintained / predictable / useful", all of which Zend can deliver, rather than ignenious API design.

    The only point that concerns me though you've raised (any other API apart from this I don't really care about so long is it works):

    "We are currently working on some of the key MVC glue which would really define the framework for what it is. We have gotten some great ideas, especially from 100days who are working with us on the framework. The main challenge is to create a model-controller that is both simple to use and powerful."

    It would be great to get Jeff's input on this.

    You may be aware he's been working on WACT for some time now (yes - yet another PHP framework and a long way from being stable enough for widespread use but...).

    Jeff's really being thinking out of the box for WACT rather than attempting to copy some other (java) implementation. A significant piece of his thoughts on MVC in general are here.

    In particular it's worth examining how this example works. Jeff explains the implementation here and there's some highly original thinking here.

    Without wishing to resort to hype / cheese I really believe that if Jeff ever gets it stable, he'll have something that outstrips any other web MVC implementation I'm aware of, both in terms of ease of use, having captured the essence of stateless PHP web applications and by supporting most any use case you can throw at it. Yes everyone's got great ideas, no doubt more than you can take on board, but Jeff's approach really needs looking at.

    That said, IP Note: whether Jeff would be happy to contribute (directly or indirectly) I can't say. And sorry to Jeff for having jumped in here unasked.

    The bottom line here is "extreme simplicity" is also extremely hard to capture. I'd almost be happier the Zend framework wasn't specifying a controller architecture. Controller APIs, more than other libraries you might use, have the most dramatic impact on the code using them. The opportunities to "blow it" with MVC are many and with PHP you're always a small step away from "this would have been quicker / easier in vanilla PHP".

    Anyway, with that off my chest, good luck with the framework. Looking forward.

    ReplyDelete
  8. I'm glad to hear your goal is for "Extreme Simplicity".

    I've worked on a commercial CMS framework which has similar aims. Keep it simple so you can get going quickly, but allow more poweful customisation if its required. We've certainly found it a difficult thing to get right. But essential for real growth.

    If you need anyone to help test the framework in real world applications my company would be happy to help. (simon at studio24.net)

    good luck with it all,
    Simon

    ReplyDelete
  9. I highly appreciate your great work! Zend changed my business and thus it changed my life - thanks.

    An offical Zend Framework, based on patterns - releasing all the oop-php5-power is exactly the right product.

    just - keep on struggling!!
    BTW - nice to see you on blogspot ;-)

    ReplyDelete
  10. I like PHP because it's simple and yet powerful. For big developers Zend Framework will be very intrigueing but I have seen not more than 1000 projects in internet that are in PHP and really difficult. Others could be written faster with simplier functions. I prefer programming for results and not for programming itself. Currently I use several commercial scripts that use PEAR and Smarty. And they are noticably slower than my own projects. However Zend will find its niche

    ReplyDelete
  11. I see a wide array of benefits to using the Zend Framework:

    1. Free license

    2. Entire framework created from scratch - no obsolete code over-head hanging around for backward compatibility

    3. Support and insistence of PHP 5

    4. Extreme simplicity - easy to learn/use

    5. Light weight - so it can be used on very large websites

    6. Free from IP infringement issues - very important!

    7. Use only what you need in your logic. This feature used to be called serviced-based architecture (SBA) - instantiate only what you want on a need-to-use basis. I worked on SBA on PowerBuilder/PFC before and can say it is the most optimal architecture. This keeps the performance at its peak (can be used even on large websites) as we don't need to load/instantiate unnecessary classes into memory. If in doubt, try defining a couple of classes inside a single file, include it in another PHP file and run the debugger - you would notice it pre-loads each and every class found in the file into memory although class definitions themselves are not executable unless invoked/instantiated.

    I only hope they don't restrict us from using templating engines such as Smarty, Savant...

    Shekar C. Reddy

    ReplyDelete
  12. umm...

    when can we expect a beta of this framework? i read a few people are halting work on their own frameworks, to see what your framework offers instead.

    myself, i want to see what all the fuss is about but im not going to wait around for it :)

    will there be a beta for summer 2006...??

    ReplyDelete
  13. Hi andi,
    I have a project to build like(vistaprint.com), the main feature is they are writing text on images dynamically and provided the grid layout so u can move that text on the image. Of course this site build on .net,but i want to know that is there any facility in zend framework like that .net framework provide.

    ReplyDelete
  14. hi

    i tried zend lucene search and it's working fine.but when i search for numbers inside a text it won't work..any idea where i am missing..i am giving a small coding below;

    require_once 'Zend/Search/Lucene.php';
    $index = new Zend_Search_Lucene('index', true);
    $doc = new Zend_Search_Lucene_Document();
    $data = "ann is 5 years old";
    $doc->addField(Zend_Search_Lucene_Field::Text('contents', $data));
    $index->addDocument($doc);
    $index->commit();

    search page

    $index = new Zend_Search_Lucene('index');
    echo "Index contains {$index->count()} documents.\n";
    $search = "ann"; //---INSTEAD OF THIS IF I GIVE 5 IT WILL RETUN ZERO RESULTS
    $hits = $index->find($search);
    foreach ($hits as $hit)
    {
    echo str_repeat('-', 80) ; echo 'ID: ' . $hit->id ;
    echo 'Score: ' . sprintf('%.2f', $hit->score) ;
    $document = $hit->getDocument();
    echo $document->getFieldValue('contents');
    }


    How can i search for number 5 inside the text.

    ReplyDelete
  15. I'm usually not a fan of Gehry's work, but this is an exception. Using wood as a wrapper imitating structure is not only novel, but ties the space down through the use of a consistent, inviting, and non-distracting material palette. Perhaps Gehry is more suited to small-scale projects Laptop battery.

    ReplyDelete
  16. One night, a Delta twin-engine puddle wow cdkeys jumper was flying somewhere above New Jersey.RuneScape Gold There were five people on board:flyff power leveling the pilot,Eve isk Michael Jordan,world of warcraft gold Bill Gates,2moons dil the Dali Lama,2moons power leveling and a hippie.wow gold Suddenly, an illegal oxygen generator exploded loudly 2moons gold in the luggage world of warcraft power leveling compartment, age of conan power leveling and the buy wow gold passenger cabin began cheap aion kinah to fill with smoke.wow leveling The cockpit door opened,dog apparel and LOTRO Gold the pilot burst into archlord power leveling the compartment. Gentlemen,knight online power leveling he began,I have good news knight online power leveling and bad news. The bad news is last chaos gold that we're about to crash maple story mesos in New Jersey. The good news Archlord gold is that there are wow Power Leveling four parachutes,and I have flyff power leveling one of them

    ReplyDelete