February 12, 2007

API changes

Filed under: ZenMagick — admin @ 10:42 pm

I mentioned in the roadmap update that there will be more API changes. They are more likely extensions rather than actual changes. I expect that virtually all changes will be backwards compatible.

So what is planned?

As a few people have noticed, the ZenMagick request handling does include code to actually handle updates as well. So far, all that ZenMagick provides is a way to pull data out of the database and present it in a comfortable manner. Sticking to this is ok, but there are always a few that want more :)

Before we can do that, though, I would like to modify the DAO classes to remove existing dependencies like:

  • $zm_request: Currently, the languageId and in cases the accountId are grabbed from the request. This is convenient,
    but not very consistent. DAO classes should only act on parameters passed into methods not assuming things
  • settings: Some method, in particular ZMCategories, make use of settings to limit results, sort results, etc. Again, this is convenient but not very transparent for the caller.

One plan is to add optional parameters to the existing methods and default to the current bahaviour.

Another option might be to make all parameter mandatory and have convenience methods that call the changes methods with the current defaults. However, this would mean to find new methods names…

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.