-
Dynamically Manage Models with Zend_CodeGenerator
Posted on January 19th, 2010 2 commentsThe holidays have passed and at last I’ve gotten enough of my obligations out of the way to begin to innovate on some new code as well as play with some of the new offerings in the latest versions of the Zend Framework. I’ve been most interested in particular with Zend_CodeGenerator since I have spent a lot of time in the last year writing boilerplate code for various projects. I find that the bulk of my time is spent prototyping models so I figured it would not be hard to build a model scaffolding script not unlike the ‘rake’ command in ruby on rails and similar commandline tools offered by the many application platforms out there. Rather than killing my wrists pounding out models, their various attributes and associated mutators/accessors, I decided that my time would be more efficiently spent describing my models using a short hand format (preferably xml) and then having a script translate that into actual classes and files. The Doctrine ORM allows you do this very thing translating YAML into Doctrine Models. This was very interesting to me but I chose to take it a step further and have it build all of my Domain Model infrastructure while it was at it (This includes the models, the gateway classes, and the DAO classes).
Read Entire Article
Development, Doctrine, PHP, Zend Framework Doctrine, models, php, scaffolding, scripts, xml, Zend FrameworkRelated Topics
-
Domain Model ORM Adapters
Posted on November 24th, 2009 1 commento I’ve had a series of articles that focus on domain model programming methodologies and most of my examples have demonstrated implementations using the Doctrine ORM (Object Relational Mapper). Given the nature of domain model programming I’ve held to the assertion that models built using this method are truly ORM agnostic and it should be effortless to swap out Doctrine for the ORM of your choice. Well I like to put my money where my mouth is by showing how easily this has been done by showing off adapters that I have written, one for Doctrine, and the other for Zend_Db. The beauty of this system is that both support the same ORM agnostic query syntax demonstrated in my recent post about creating complex sql queries using associative arrays. This means that no modifications are necessary in the models, controllers or views when switching ORMs. Developer’s utopia.
Read Entire Article
Development, Doctrine, PHP, Zend Framework Design Patterns, Doctrine, Domain Model Programming, ORM, SQL, Zend FrameworkRelated Topics
-
Queued, Concatenated, and Gzipped Assets with the Zend Framework
Posted on November 18th, 2009 1 commentLinking assets to your templates and layouts is always a mine field. Every person has a different way of doing it and if it is done poorly, it can adversely affect the load time of your website, particularly if you have lots of websites. It’s helpful to understand how the http protocol fetches things like stylesheets and javascript files while it’s loading your page. In order to alleviate traffic for any individual server, a browser is limited to only so many concurrent requests to the same host. I do not recall what that limit is on each browser but I’m sure google does but in any case, if your site is of significant scope, chances are, you are going to need more assets than your browser can pull in at once. If you don’t believe me, install the yslow extension for firefox and run it on a page with many assets and you will see what i’m talking about.
Read Entire Article
-
Doctrine, Complex SQL Queries, and Paginators
Posted on October 7th, 2009 No comments
Read Entire Article
In my efforts to build web applications using domain model programming I’ve encountered some interesting technical hurdles for keeping my implementation details away from my models. The most problematic issue that has come up time and time again has been that of using paginators. It’s very difficult to keep your paginator class in the dark about database implementation details and have it be able to handle complex use cases. Over the last few months I have slowly evolved a sophisticated way to describe a complex sql query using nothing more than an associative array which can be passed to a clueless paginator which talks to the database through a predefined interface to a model gateway. Yeah the mad scientist is me because that’s how I felt when I looked back on the pure genius of this method.
Development, Doctrine, PHP, Zend Framework Doctrine, Domain Model, DRY, Pagination, php, SQL, Zend FrameworkRelated Topics
-
eROI releases Moonit into the wild
Posted on September 14th, 2009 2 commentsAfter months of development, and over a year of brainstorming, Moonit LLC unveiled moonit.com at TechCrunch50 2009 today. As the primary back end developer for this site I felt compelled to be a huge cheerleader for this site as it is the latest example of the incredible talent of the developers, designers and managers at eroi. In [...]
Read Entire Article
-
Implement a Rest API with the Zend Framework
Posted on May 6th, 2009 20 commentsEdit: Recent developments in the 1.9 version of the Zend Framework has caused much of this information to become obsolete. Please consider Zend_Rest_Server deprecated and use Zend_Rest_Controller instead. I will write an updated article once I have experimented with it. Thanks to the other developers who brought this to my attention.
Read Entire Article
As a developer and I [...]
Applications, Development, PHP, Silk CMS, Site-Related, Uncategorized, Web Browsers, Zend Framework php, rest, web service, Zend FrameworkRelated Topics
-
Modular Zend Framework Skeleton 2009
Posted on April 8th, 2009 9 commentsSo the application skeleton series proved to be more popular than I was expecting. Unfortunately after a couple of server migrations, the source code examples that were linked to those articles did not survive the trip. I’ve gotten a lot of comments to restore those examples so I decided to write a new article to [...]
Read Entire Article
Development, PHP, Tech, Zend Framework application, examples, framework, modules, MVC, php, skeleton, zendRelated Topics
-
Domain Model Programming With the Zend Framework
Posted on April 3rd, 2009 10 commentsEach application I write tends to be an evolutionary successor to the previous and I suspect this is the case for most developers. With long term projects one tends to find things that work better than others, and methods that end up being a real pain in the ass and not as scalable as hoped [...]
Read Entire Article
Development, PHP, Tech, Uncategorized, Zend Framework Doctrine, Domain Model, MVC, php, Zend FrameworkRelated Topics
-
Multi-Lingual Support with Zend_Translate and PHPTAL
Posted on March 23rd, 2009 4 commentsI recently had to implement multi lingual support in a Zend Framework application to accomodate 4 languages in a social networking site: English, Spanish, Porteguese, and French Canadian. The site was fairly large comprising of a large number of heavily dynamic templates with a lot of user generated content. At first it seemed daunting and [...]
Read Entire Article
-
Zend Application Skeleton
Posted on August 29th, 2008 No commentsI am aware there are plenty of people eagerly anticipating the release of Silk CMS into the wild. I apologize for procrastinating on this but I am releasing a doggy bone to satiate the impatient. I’ve added the SilkCMS page where I will be hosting information about the project. In the meantime i’ve provided a [...]
Read Entire Article


