Solar 1.0.0 alpha1 Released

By | November 13, 2007

After more months of breaks, changes, additions, and refactoring, I’m (finallly) at the point where I’m ready to call the Solar framework for PHP 5 feature-complete. The first of this feature-complete series is the new Solar-1.0.0alpha1 release as of Sunday, 11 Nov, 2007. We now have at least 80% of everything you would need to build web-based and cli-based applications. This is a big milestone for the project.

The change notes, of course, are gigantically long, so they’re on a separate page.

Read on for more highlights, especially about the new ORM system replacing the previous Solar_Sql_Table series.

Highlights

  • The new Solar_Controller_Console and Solar_Controller_Command classes are analagous to front and page controllers, respectively, for the command line. This means you can build CLI commands in Solar much the same as you build web apps.

  • The new Solar_Filter class combines validating and sanitizing. It uses a helper structure identical to Solar_View so you can add your own filter helper classes. It also comes with a filter-chain system for applying filters to arrays or structs of user input.

  • We’ve moved a lot of the core functions of the Solar arch-class to their own static classes: Solar_File, Solar_Dir, and Solar_Registry.

  • Lots of changes in the Solar_Sql package related to database portability. There are two removals here: we don’t ship with Oracle or MS-SQL any more, only MySQL, PostgreSQL, and SQLite. These are not permanent removals; as soon as I can get systems to test on, I’ll put Oracle and MS-SQL back in place with all the new SQL portability goodness.

New ORM System

The biggest set of changes, though, are that the venerable Solar_Sql_Table and its companions have been removed in favor of some new hotness: Solar_Sql_Model. The new model class is still table-based, but it now recognizes related tables using has-one, belongs-to, and has-many relationships. (Strictly speaking, we don’t have "has-and-belongs-to-many"; we use "has-many-through" instead.) It features single-table inheritance, built-in filtering, automatic table creation, automatic form-processor generation, and lots of other goodies.

Along with the table-based model class, we also have Solar_Sql_Model_Record and Solar_Sql_Model_Collection classes to represent, respectively, individual records and collections of records. The record class allows you to add business logic on the individual rows and related rows returned by the model, so technically the record class is an ActiveRecord pattern implementation. (Note that this is not a Rails ActiveRecord.) Similarly, the collection class allows you to add logic on a set of records.

Oscar Merida has added a getting-started page about Solar_Sql_Model on the community wiki here: http://solarphp.org/wiki/tutorials/SettingUpModels.

Next Steps

The Model class is almost where I want it to be for a full stable release, but it still needs a bit of tweaking. Other than that, the only things left for Solar are building a more-complete suite of unit tests, and writing more narrative documentation. As the tests fill out and we get more user feedback, I’ll be able to move to a beta, then quickly to an official stable release.

Many thanks to all the people who have helped with this release in one way or another (and in no particular order): Clay Loveless, Rodrigo Moraes, Antti Holvikari, Chris Cornutt, Jeff Surgeson, Robert Gonzalez, and all the others on the mailing lists and the IRC channel and who are noted in the change logs but whose names escape me now. Thanks guys!

10 thoughts on “Solar 1.0.0 alpha1 Released

  1. Pingback: PHPDeveloper.org

  2. Matthew Weier O'Phinney

    Congrats, Paul! This has been a long time in coming, and I know you’ve poured a ton of blood, sweat and tears into the project. Setting the version to 1.0.0 is the right move, and well done!

    Reply
  3. Pingback: blog.phpdeveloper.org » Solar Makes Its Move - The Path to 1.0

  4. Pingback: developercast.com » Paul Jones’ Blog: Solar 1.0.0 alpha1 Released

  5. René Leonhardt

    Congratulations, we all are waiting for the big 1.0 release!

    Only 8 KB difference (between Solar-1.0.0alpha1.tgz to Solar-0.28.0.tgz) mean many months of work ;)

    Reply
  6. Harley

    Solar continues to be one of the cleanest and best designed frameworks around and the new ORM system looks great.
    Thanks for sharing your efforts

    Reply
  7. Pingback: PHP5-Framework Solar steuert in Richtung Version 1.0 - Developer's Guide

Leave a Reply

Your email address will not be published. Required fields are marked *