One thing that always annoys me in the curren ZenMagick is the number of globals. In particular the pre-instantiated service classes are a nightmare and use up resources whether they are used or not.
To remedy this situation it is worth to question why they are acutally created?
- Early on I created this convention/contract that all services are ready to use – no need to create objects, etc
- All services are singletons
- I didn’t know any better
A recent project involving CakePHP allowed me the time to investigate the CakePHP sources (to a degree) and see some quite impressive code. Compared to that my code looks a bit old fashioned :O
So, I will take some of what I have seen, some PHP5 features (static methods, for example) and hopefully get rid of them!
Template changes will be very simple and I hope to have some sort of migration tool, but that is still open (right now I am not even 100% sure what the actual implementation will look like
Just a quick note that today I checked in the first changes that definitely will make ZenMagick not run on PHP4 any more.
Even though announced, it still felt weird to actually *break* ZenMagick for PHP4. On the other hand, now the way is free to get rid of the ugly PHP4 hacks, all the ‘&’ to handle references and a lot more! yey, go PHP5!
.. if there is anything like that.
I found a rather annoying little bug in the Catalog Manger: in once case I used ‘<?‘ rather than ‘<?php‘. So, if the Catalog Manger does not look what you would expect, try to fix that first.
Other than it’s pretty quit – maybe too quit! Well, I will take that as a good sign rather than lack of interest.
I just realized that there are two admin plugins in the new release that actually should not have gone out yet. The quick edit plugin does work, however I was planning on making the fields configurable before releasing…
The other one is the product association plugin. That one is definitely not finished and doesn’t do a lot yet. Oh, well, at least now you all know what I am up to
… 0.9.0. Phheewww! I am so glad it is finally out, even though I have this faint suspicion that I might have missed testing something. So, test thoroughly before putting this into production.
There are some release notes up on the ZenMagick website – make sure to read the additional information.
There are also a few things in and around this release that are worth mentioning, but that are not in the release notes:
- As mentioned before, the new packages on sourceforge are now 0.9.x for both core and plugins. That should make it easier to find newer versions, in particular plugins.
- I haven’t had time to update the demo site, please bear with me…
- I have, for the first time added an incremental update archive that contains all added/modified files. I’d be really keen to get feedback on that. Using this requires some more care with removing obsolete files than removing core and replacing with a new version. However, the file size is a lot nicer.
- The new demo theme got updated to match the new homepage theme – I hope that is an improvement. The changes were really marginal CSS (mostly colours) and two new images!
As always, feedback is mandatory!
Just a friendly reminder that time has come to move forward and that as of now ZenMagick will officially no longer support PHP4.
I am not going out of my way to make things as incompatible as possible, but eventually this will come. This means if you are planning on using ZenMagick (and keeping up with updates) or are already using it that now is the time to upgrade to PHP5, too.
Things on my list are:
- adding private to pretty much all class variables (this might take a while since a lot of classes are still missing setter methods)
- Converting some (empty) classes to interfaces
- removing PHP4 style constructors
- getting rid of all use of ‘&’where references are used
- Fix/remove code that was added to make references work in PHP4 (there are a few places where using ‘&’ was just not enough and I really couldn’t be bothered to find out why)
- Making some methods static
Most likely there is more, but starting with this will really make me feel
So, finally it’s online. After my last musings about a theme I had another go at finding a suitable design and – voila!
I ma sure it is an improvement over the old homepage and the next version of ZenMagick will include an updated demo theme that corresponds (pretty much) with the new design.
One major change is that the site now is driven by a small number of custom PHP scripts that will make it easier to add stuff. In fact, it’s a mini-MVC application of sorts. Also, adding news is as easy as dropping a HTML file in a folder which is a lot easier than what I had before.
New pages are also just simple PHP views added to a folder and then linked. I might spend a bit more work on that once the next website is demanding similar functionality – it should be very easy to make it generic enough to reuse. I might actually write a separate post about that if I find the time.
Speaking of the next release: this is now definitely scheduled for the coming weekend (unless my daughter has different plans). I am still pondering the version number, though. So far I referred to it as 0.8.7, but sheer number of changes plus the fact that there are some new and exciting changes to the admin pages I am tempted to make it 0.9.0.
I realize that according to some old roadmap it’s too early for 0.9.0, but things change and there are more reasons that might make this a good thing.
- I think it will indicate that ZenMagick is slowly growing up
- The plugin architecture is nearing maturity; just looking at the number of plugins and the fact that most new features are plugins should already be enough to justify the version number jump.
- I plan to move away from creating new releases for each new version. Rather there will be releases for 0.9.x, 1.0.x, etc. This should make it easier to find things; in particular tracking down plugins seems unnecessary difficult