So I have been using
git for a while now, and I really like it.
I really appreciate being able to check in code without having to have a server available and for some reason it just feels a lot more solid than
Subversion. Case in point, today I was merging a big branch back into trunk and it was throwing a ton of conflicts on tabbed versus spaced lines... Easy enough to fix but still annoying in the first place. I don't seem to get those kinds of issues with git. *shrug*
So I am just doing a quick post to say that I have put my toy framework up on
GitHub so that I can keep track of it, share it with some other people and because I want to be like all of the other cool kids and have some open source junk on GitHub. I feel cooler already!
The framework itself has some interesting features, but as I said, it's mostly just there to experiment on. Check out what's working now:
* MVC stack - Duh, isn't every framework now?
* Highly modular - Everything for a module lives in the module. Configuration, Routes, etc can all be dropped in place as one folder.
* Uses namespaces - The initial reason I started writing this framework was to get namespace experience. Love them.
* Annotations - Allows you to specify stuff in a method/property doc block. @Inject for example.
*
Dependency Injection - Uses type hinting and annotations to inject using constructor and/or setter injection. Can use lambdas/closures as object factories. It's sick, trust me.
* ORM - Has a very
Django-like object manager. Want to get all BMWs with a model of 750i newer than 2007? It's easy: $cars = Bmw::objects()->filter('model_eq=750i')->filter('year_gt=2007'); Working on implementing single table inheritance right now where all classes for a hierarchy map onto on database table. Uses lots of late static binding.
* Unit of Work - Basically handles persisting Domain Models transparently using the ORM. If you load an object, change it and then delete it. Only the delete is persisted and the changes are ignored. You can read more about it on
Martin Fowler's site. It's pretty awesome too.
* Templating - Another port from django. Basically allows for non-php template syntax. I like it, you might not.
Here's what is on the road map to completion:
* Forms - You guessed it. Django port again. Basically each property in a model is a field with validation and all of that junk built in. The forms handle wrangling them to and from the browser.
* Signals - Very similar to how plugins work in the Zend Framework. Instead of being rigidly contained however, you can emit any old signal to the signal bus and it can be ignored or handled by various listeners
* Automatic auditing - The unit of work knows what changes have happened, by adding an @auditable annotation to a class the Unit of Work will track the changes to the object in an auditing table.
* Automatic Sphynx updating - Again the unit of work knows when an object has been updated so if it has the @searchable annotation it will automatically update the sphynx indexes.
* Creation tools. The point is that this framework pretty much wires up everything for you so you just get down to business. Need something similar to Zend_Tool to help peeps out.
* Who knows. After all of that junk is in place... Well, I'll probably have started all over again ... *sigh* A great way to learn a lot about the new PHP 5.3+ features though!