Home > PHP > Zend Framework

Zend Framework

Well, I’m continuing to look at Zend Framework. It has a lot of nice features, and a not insignificant learning curve to get what I would need out of it. Add to this that I don’t have time in my current work schedule to play with it, so I’m doing it in my “free” time. I’d like it to be quicker to figure out. Not that any particular piece of it is hard, there’s just lots of it and each part has to be unraveled and then plugged into what I’ve learned of the whole. I am currently working with 1.5, which is actually a Release Candidate at the moment, but earlier versions don’t include everything I need. Since I’m not going to be ready to use this in anything like a production app for a little while at least (assuming I end up with this approach), hopefully it will be a stable release by then.

Since I’m exploring ZF, I want to get as much out of it using ZF as I can, rather than combining it with other approaches. It might turn out that using a combination of resources is the best approach (as Wil Sinclair suggested in response to my last post on this), but I don’t want to use that as a crutch not to figure out what I can get out of ZF.

Some of the things I want to be able to do include:

  • Modular controller layout – I want to separate the controller code for various types of things. ZF allows for this pretty well. It took me a little fiddling to figure this part out, but most of that was me trying to get it to do variations. There are some pretty good articles about how to do this in addition to the documentation.
  • Modular model layout – I need to support different data sources, often of very different types. For example, the same application might need to interact with Postgres, MySQL, and a SOAP service. For Drupal I wrote a dataconnector module, and then a library for each different data source that belongs to this module. Much of what I had to do to get Drupal to do this sort of thing already exists in ZF. This is going to take more investigation to do in a way that is maintainable and easy to manage, but I haven’t had a chance to spend much time on it. Its possible that the directory layout of putting the model files in a shared directory is ok. Just don’t know yet.
  • Form and input validation – I’m probably going to write a post about this issue by itself soon. Its what I’m looking at now, and I’m not sure I’ve figured out the way that I think this would work best in the ZF context. Zend_Form has the server side validation nicely packaged. Actually, I’d like to do three levels of validation/filtering: at the client (for usability), at the controller for business logic and the first level of security filtering (this is what Zend_Form does), and at the model (for data integrity and injection avoidance). I need to investigate how I want to do model level filtering. That’s actually the easiest, I just haven’t looked at it yet in the ZF context. The database interaction layer isn’t sufficient for filtering by itself because at that level we don’t know all the uses we might be making of the fields. Just doing it at the controller layer isn’t sufficient because we don’t know that all data interactions will pass through any given controller, and we don’t want to miss anything. The next piece I’m going to investigate, though, is tying something like the jQuery validation plugin into Zend_Form.
  • I still haven’t gotten to XML_RPC and SOAP. There actually isn’t a stand-alone SOAP component yet, but the StrikeIron service component has a fairly basic SOAP base class.
  • Some core issues like logging and error (exception) handling. These are fairly boring, so I’ll put them off as long as I can.
  • Zend_Translate and Zend_Locale. I haven’t looked at these at all, but I need to. Like the previous bullet, this isn’t my favorite piece. I’m putting it here in part to remind myself not to skip it.
  • PDF creation. At FH (my day job) we have some stuff using PDFlib’s PPS libraries. I haven’t even thought about this yet.
  • I haven’t tackled AJAX for forms yet, although I don’t expect this to be a big issue from what I’ve seen of Zend_Form so far. In forms that are an integrated part of business process, I like forms that save each field in the background as it is filled out. I’ve used Dojo to do this in the past, but I think I’ll move it all to jQuery (largely because of Drupal’s influence). Not that there’s anything wrong with Dojo. Its a great tool kit. Its great to have such good choices.

There’s lots more to put on this list, but that will do for now. Tune in next week, same bat time, same bat channel. Or some time, some where, maybe.

Categories: PHP Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: