Solar 1.0.1 Stable Released

I just released version 1.0.1 (stable) of the Solar Framework for PHP 5. You can get it from the usual places. The change notes are here.

The most significant change is a bugfix to eager fetches in the model system. When eager conditions are present, and no join type is specified, eager fetches will use an ‘inner’ join by default. This means that the eager conditions now have the proper effect when using count_pages.

(Cross-posted from the Solar blog.)

ConFoo 2010 Wrapup

Many thanks to the organizers and hosts of ConFoo 2010 in Montréal! It was great meeting everybody there. I always say my favorite part is talking to the attendees; that’s where most of the interesting stuff is.

I gave two talks this time around. The first was the venerable “How To Organize you PHP Project”, which I still love to give, and which I think is really valuable both to new and to experienced developers. The slides are at http://www.slideshare.net/pmjones88/organizing-your-php-projects-2010-confoo; if you attended, please rate it at http://joind.in/1289.

I was really happy about the “Organizing” talk this time around; I was able to add comments on the new PHP 5.3 namespaces, and show how The One Lesson works in practice with existing projects. Attendance was high; great audience, lots of good questions throughout, and a few people were even figuring out in advance where we were going before we got there (it’s always nice when an audience question is addressed in a later slide). There was one guy who saw this presentation the first time I gave it years ago, and he noted that it was much more polished this time around; it’s good to know that there has been visible improvement in the talk.

The second presentation was on “The Solar Framework for PHP5”. The slides are at http://www.slideshare.net/pmjones88/the-solar-framework-for-php-5-2010-confoo, and if you attended, please rate it at http://joind.in/1350.

I was happy about the “Solar” talk, too, but it ran a bit long. When I practiced it, I went for almost 90 minutes, but we’re only allotted an hour, so I had to flip past some good stuff toward the end. Even so, I still went five minutes over time. Attendance was reasonable; Nate and Joël from Lithium showed up, as did Fabien from Symfony. More good questions from the audience, and some discussion of language features available in Python and Ruby that have to be emulated in PHP (I’m looking at you, named keyword arguments).

Thanks to everyone who came to my talks; I hope you found them useful, informative, and entertaining.

Solar 1.0.0 Stable Released

Yesterday, I announced the release of the 1.0.0 stable version of the Solar Framework for PHP on our mailing list. (I tagged the release four days ago on Monday, but wanted to time the announcement to go along with my Solar presentation at ConFoo.)

You can see the change notes here. The highlights are:

  • Added automatic cross-site request forgery (CSRF) protections in various layers of the system.
  • Added support for named actions (aka "named routes") in the front-controller rewrite logic; this is the "bi-directional" routing that some have asked for.
  • Optimized queries for Model::countPages() and the native-by select strategy, so that unnecessary joins against related models are not used when counting the number of pages for the native model results.

The next major steps are to revise and extend the narrative documentation, and of course fix bugs and add features as needed.

Slashdot appears to have gotten to the mailing list announcement before I blogged the release. (The commenters there show the usual range of insight, depth, wisdom, and experience. 😉 The Solar site itself, deployed on a 512M SliceHost VPS instance, appears to be handling the load. However, my WordPress blog on a separate 512M instance is getting … a bit … … slow. Guess it’s time to add wp-super-cache.

This stable release is the culmination of about five years of development effort, with important contributions from several others in the PHP community. My many thanks to everyone who helped make this release, and all the previous releases, better than I could have made it on my own.

(Cross-posted from the Solar blog.)

Solar 1.0.0beta5 Released

This past Friday, I released verion 1.0.0beta5 of the Solar Framework for PHP. You can read the change notes here.

Overall, most of the work was related to the form helpers and making them even more flexible than they were previously. We’ve also added a new manual chapter on working with models and forms.

It is super-easy to build forms out of model records in Solar. In the controller, once you have a record object, call its newForm() method to get a Solar_Form object. In the view, pass that form object to the form view helper and add a submit-process button:

echo $this->form()
          ->auto($this->form_object)
          ->addProcess('save')
          ->fetch();

Those four lines of code will build a complete form for you based on the model record, including top-level feedback and individual element invaldation messages.

The form helper is smart enough to recognize the column types and validation filters on the model record, and will use the appropriate input types accordingly. For example, booleans get checkboxes, date fields get a series of month/day/year options, and columns using validateInList or validateInKeys become selects.

You can also further customize the form presentation using the fieldset and grouping methods on the form helper. Alternatively, you can the individual form element helpers to build forms by hand.

These features have been present in Solar for years.

Finally, and I’m not making promises, but I think this is the last or next-to-last beta release. I have some tickets about query optimization from the models that I want to complete. Once those are done, I expect to make Solar’s first official stable release.

(Cross-posted from the Solar blog at http://solarphp.com/blog/read/63-solar-100beta5-released.)