as you are more and more to use Pluf in production, I would like to
inform you about the planned work on Pluf for the next weeks.
1. URLs definition
2. Applications
3. Multi Auth
4. Auto Admin
1. URLs definition
The sort order will be dropped, instead the order in which the URLs are
declared will be used. It will save some computing cycles to do some
more interesting things.
It will be possible to easily plug an application at a given point in
the URL space. Like Django, you will be able to say, everything starting
with '/admin/' is going to be handled by the admin application. This
will allow to easily reuse other applications.
Cache of the URLs forward and reverse. Let say, you have 10 applications
declared in your config file, this means that the urls.php will include
the urls of 10 apps, 10 includes... bad... this will be cached as one
PHP file on disk in production. For the reverse, when using the url for
view helpers a model/method and named view indexed cache will be
available. This will also speed up things.
2. Applications
Any directory in the PHP include path will be able to store an
application. For example 'Pluf/Admin' could be the name of an
application. The loading of the relations.php files will also be cached
in production.
The goal together with point 1. is to break Pluf in smaller apps and
make everything more reusable. For example the small search engine will
become an application with ready to use views and templates.
This is needed to nicely support multi authentication backends etc.
3. Multi Auth
The authentication backend will be refactored to allow OpenId, LDAP, etc.
4. Auto Admin
Long overdue, but this will come at least before end of May.
Basically, I want to refactor to provide ease of use and reuse and even
more performance.
Note that I am still a bit slow with the dvorak keyboard, this means
that my email answers and IRC answers may be very short. This is not
because I do not care or am in a bad mood...
loïc
> I will try to make no backward-incompatible changes. Or at least
> minimize them. One is the priority in the urls.php, so just sort
> manually your urls. Then, there will be the need to update your config
> file to add the new applications. The migration script will take care to
> put everything in order (Pluf will need to be the first application in
> the appnlication list).
>
> I have a very large old application, so I will create a "legacy" branch
> for the ones not wanting/being able to upgrade.
Great.
> $m = Pluf_Model::getOne($sql->gen());
>
> Exception or null result if not found?
I'd say :
- Exception if the result contains more than one object,
- Null if the object does not exist.
Something like Pluf_Model::getOr404 could raise an exception... That's
how Django works and I like it :-)
> you can also write about your findings here I can then
> integrate them in the website. I will create a "pluf website" project to
> collaborate on it.
No problem :-)
Regards,
Bruno