What is ZenMagick?
About two years ago I wrote a post Is ZenMagick for you? This post is an updated version which is supposed to put things into perspectice, in particular the current status and future plans. (more…)

What is ZenMagick?About two years ago I wrote a post Is ZenMagick for you? This post is an updated version which is supposed to put things into perspectice, in particular the current status and future plans. (more…)
I realized only yesterday that I completely missed last weeks update. So, I guess I should have twice as much to write this week
However, things have slowed down a bit, so there isn’t really that much to report this time.
Having just read the (very) last post on Joel on Software I decided to follow Joels advice to talk about more than just my *product*. I do that occasionally anyway and every time I am surprised how many hits posts unrelated to ZenMagick (but related to programming) actually get.
But today to something completely different: Chess. If you’ve browsed this site you might have found to Greasemonkey scripts that I’ve written that implement some sort of a practice board for online correspondence chess. I do play Correspondence Chess on two sites: chessworld.net and atlanticgames.net.
When I started, both sites where about even with features, perhaps with a slight advantage to chessworld.net. Now things have evolved a bit and chessworld.net is clearly richer in both game quality (ie. stronger opponents) and features. [Not that I need particularly strong opponents!]
One of my favourite thing, though, is to watch KingsCrusher, the guy running chessworld.net, play and comment! 5 minute chess.
If you don’t know what 5 minute Chess is, it’s Chess with a clock where each player has 5 minutes for all his moves. Together with his mostly insightful comments, watching KingsCrusher play International and even Grand Masters is a lot of fun, so if you want to improve your blitz and bullet chess, you should really try this.
With my current investigation of using the ZenMagick MVC framework for admin pages I’ve finally hit the point where sharing all code (and configuration) hits a wall.
For example, url and sacs mappings have to be different, so there is no point loading the storefront mappings in admin (and vice versa).
Also, there is reason to have separate implementations of some classes. For example the current ZMController class uses $request->getAccount() to validate access. However, for admin requests this doesn’t make sense as there will never be an account instance, but an admin user reference.
The consequence is that a few more things need to be refactored to make the MVC code even more generic. It also means that it is now time to reorganize everything under the lib directory into shared and individual code for storefront and admin.
All this, or course, implies that storefront and admin stay within a single application – more to think about…
One feature requested for integration with ZenMagick is the admin profiles mod.
I think it is a really useful thing to have, in particular if the project is going to target not just one-man shops.
Since the admin UI will be based on the ZenMagick MVC code, I would suggest that access control is integrated there. Of the top of my head this is the list of requirements to get this implemented:
So, I think the requirements are pretty much the same as for the existing mod. There would be one improvement, though: It will be possible to set up roles. Roles are a group of predefined permissions. Then a user can be assigned to one (or more) roles and automatically have the permissions of those roles. Permissions would be or’ed, so if one role gives permission to a particular page while the other doesn’t, then permission is granted.
Additional suggestions/improvements welcome…
I’ve been slowly preparing things for a new admin UI for all ZenMagick admin pages. The biggest step has been to remove all individual admin pages (zmInstallation.php, etc) in favour of a single point of entry zmIndex.php.
Within that file, the main_page parameter is used to dispatch the request. Right now this is done manually and the layout is included in zmIndex.php. Views itself are already working the same as in storefront, so there is a content/views subdirectory containing views for all ZenMagick admin pages.
Now, to get to state where zmIndex.php becomes the sibling of zenmagick/store.php, only two things need to happen:
ZMDispatcher::dispatch($request);Right now this does work with one major exception: the included zencart header.php relies on globals (as does the whole init process).
I do hope that for the new admin UI the header will not have to contain a lot of code. All the stuff currently displayed above the navigation should move into the dashboard to make things more consistent. It would also be nice to have a dynamic dashboad where things can be moved around and enabled/disabled.
For example, the update check should be just another option in the dashboard. That would also mean that automatic checks will only happen on the index page and not on other pages. Furthermore, that should be doe via ajax to avoid delays loading one of the central pages.
Once we are that point, I’d really like to get the login process upgraded. Not only would that avoid some of the current code mess, but it would also allow to redirect after the login, just like the storefront does.
We’ll see…
Since I started using git (and github), i’ve struggled with the fact there wasn’t a single client that could matchexisting svn or hg clients.
I tried TortoiseGit – hoping that it would be up to par with TortoiseSVN, but that was not the case (I thingk that would have been somewhere around version 1.2.??).
So, I ended up using mysysgit like most of the other windows users, looking at the number of posts about that particular topic.
Then, recently I thought it might be interesting to see how TortoiseGit has improved. And I was impressed. Pretty much everything (at least the stuff I use) seems to be working. However, there still was the issue with using ssh. I didn’t really have the patience to get to the bottom right away, so ended up using TortoiseGit locally and mysysgit (bash) to push and pull.
Today I did some more research and while there is lots of stuff about how to download putty et al, there isn’t really a lot about TortoiseGit. Then, there is also the issue that the default is plink instead of openssl, which means different keystore structure etc.
Eventually, I figured I should perhaps look at the help – and lo and behold – there it was. All I needed was:
And now there isn’t a single reason to use anything else! After using TortoiseSVN for so long I feels instantly at home. Beside the push and pull I can use it pretty much the same like SVN. It’s perhaps not that simple, but it makes migrating from SVN to git a lot less painful.
I’ve started looking at resurrecting the product_music_info plugin. Not only is it defunct as far as the recent changes to plugin conventions are concerned, it is also the last remaining piece of code that still uses zencart’s $db.
Apart from that I think the plugin should contain a lot more than it does right now. For example:
There might be more, but that is already more than I can handle right now…
I’ve got some ZenMagick money to spend on Google Adwords. It’s a voucher that expires March 31, so there still a bit of time. Perhaps I’ll get 0.9.9 ready until then and we could try to do ’some’ adverts in combination with the release. Any suggestions welcome…
During the last week I’ve been switching between a number of different things. Beside the (now) usual traffic on the forum there have been numerous changes to a wide area of code.
I’ve started working on the locale code again, in particular i18n. Also, I’ll have a serious go at adding support for gettext via pomo (also used in Wordpress). It’s a bit tricky and will probably require changing everything at the same time, so this might not make it into the very next release.
Also, since the date handling in ZenMagick is currently somewhat esoteric, to say the least, I’ll be looking into using the newish (>=PHP5.2.0) datetime features. Should there be any know issues, obviously I’d love to hear about those…
For gettext I also ponder renaming the current zm_l10n functions to something like _zm and __zm – some people really dig short function names (and some are just lazy).
Comments welcome.