[Solar-talk] Solar compared to Zend Framework
Paul M Jones
pmjones at ciaweb.net
Fri Mar 10 06:19:42 PST 2006
I've had a couple of private emails asking me, now that the Zend
Framework preview release is public, if I will discontinue Solar, or
rewrite Solar on top of the Zend Framework. The short answer to both
of these, at least for now, is "No -- Solar is not going away."
The long answer is, "Even though Solar and Zend Framework share a
similar underlying architecture, Solar has implementation goals that
are quite different than Zend Framework; these differences make it
reasonable to continue Solar as a separate project."
Here are some of the main similarities between the two projects:
* An overarching "main" class of static methods to provide common
functionality for the remaining library classes, with things like a
registry, a class loader, a file-finder on the include path, etc.
* A PEAR-like class naming convention and directory structure,
where
the class "Example_Class_Name" maps to "Example/Class/Name.php".
* Classes for common web application needs: input validation and
filtering; database API abstraction and query generation; URI
manipulation; model, view, and controller classes; and so on. Some
of these even have similar names, owing to their common
adherence to
Design Patterns.
But there are some significant technical differences between the two
projects. Here are some examples just from the overarching "main"
Solar class:
* Solar uses a unified constructor mechanism. All Solar classes
are
constructed in exactly the same way, using an array of config
options as the only constructor parameter. This makes is possible
to provide ...
* A unified configuration mechanism. Basically, you have a single
config file that returns a PHP array keyed on class names. Classes
can look up their own configuration automatically when constructed,
becuase the __construct() signature is always the same. This also
means that Solar can have ...
* A universal factory method. A call to Solar::factory
('Class_Name'),
optionally with a factory-time config to override the defaults,
will
get you a new instance of any Solar-compatible class. This factory
mechanism is used for the Solar::registry() (originally called
Solar::shared()), and is also used for ...
* A unified dependency-injector method. In short, you can call
Solar::dependency() and it will retrieve a dependency object for
you, either from the registry, from a passed object, or by
constructing a new object for you on-the-fly. All you need to do
is provide the class name and a specification for the dependency.
Solar currently provides other features not yet present in the Zend
Framework:
* built-in localization
* read-once flashes
* automated exception generation with localized messages
* form processing
* automated form output generation
* user authentication and role classes
And of course, Solar is licensed under the LGPL (which is FSF/OSI
approved).
So what does Zend Framework have that Solar does not?
* A whole lot of specialty classes. The Zend Feed, Service, and
XMLRPC libraries are fantastic, as well as the PDF generator and
the
Lucene-based search engine in the incubator. These are all
excellent work. Solar has nothing to compare with these; I would
call them the real gems of the Zend Framework.
* About a dozen regular individual and corporate contributors
(including some components originally developed by me). IBM and
Oracle have developers working on it as well. Solar does not have
that kind of external involvement, since it has not captured the
community's attention in the way Zend Framework has.
* The backing of Zend, a real business, to support and drive its
development. Solar only has one guy (me) doing regular
development,
and the good will of a few regular contributors and users (Clay,
Matthew, Jeff, Jean-Eric, Stuardo, and others).
* A great marketing machine. Solar, by contrast, has only
word-of-mouth and a few blog entries.
* More and better documentation. This is the one thing I really
desperately need to work on for Solar; in fact, that's the only
thing I've been working on for the past two days (more on that
in another post).
So that's it for now. Let me know if you have any questions or
comments.
--
Paul M. Jones <http://paul-m-jones.com>
Solar: Simple Object Library and Application Repository
for PHP5. <http://solarphp.com>
Savant: The simple, elegant, and powerful alternative to
Smarty for templates in PHP. <http://phpsavant.com>
More information about the solar-talk
mailing list