Tag Archives: Zend Framework

Taking PHP development to the next level

A lot of my enthusiasm for programming comes from my never ending interest in it’s evolution. I played with computers since I was 7, and already knew at age 13 that I wanted to become active one day in the ‘automating’ industry. I’ve always regarded programming as a trade or tool to automate repetitive tasks, but also to offload (error prone and inconsistent) people tasks to fool proof automated systems. I just wanted to make stuff easier and better, and found a way to do it.
I truly started my programming career in 1999 as a Java programmer in the corporate world, learning a lot about real world software problems. It made me realize a lot of things.
But even in the year 2000 internet applications were not widely recognized as “the way to go”. My employer, one of the best amongst Dutch knowledge engineering services, did not pay full attention to it yet.
So I left. I simply had to find out more about web technology, which I regarded as the future of software development.
I carefully chose to follow the ‘open source’ path (as opposed to the closed MS world), and divided the territory into “corporate vs fun and dynamic”. I ended up in PHP land.

But soon I found out about the drawbacks of PHP development. It’s a loose typed language, with a scattered user base, supporting all kinds of immature frameworks and libraries, for all the wrong reasons. Simply stated: PHP land was short on inhabitants with extensive knowledge of software development in general. After a while though, PHP was recognized for its RAD abilities, and more and more people with skills came into the game. This lead to a myriad in yet more frameworks and libraries, but now it was all about documentation, participation, and a growing user base. Because solutions were being reviewed, tested and explained, quality started to drift to the surface.

But how does one recognize quality in this field?
Since I have never studied software development on a university or such, I will always regard myself as a noob on matters that I have no experience with. I have learned everything by reading books, and from material on the internet. But because I was aways so insecure about my knowledge, and truly interested in what I was doing, I never stopped reading. That’s how I discovered that it’s most beneficial to start learning the industries’ best practices and ‘patterns’, before formulating your own suspicions and concepts regarding programming solutions. Building onwards from that premise I feel I have finally grasped an overall intuition for what matters most, and which choices should prevail others. Of course there is no holy grail of software design, but given a business goal, context and limiting factors, one surely can sketch a fruitful path for future development.
Do I bore you already?
The point is that I think that higher level principles should be considered first, when making choices in software development. Therefore I was always drawn to development platforms that obey such principles, even though some of their subsolutions are plain awful.
Steep learning curves and incomplete documentation were arguments very low on my choice break down list. As I have a brain, and a debugger, I’d rather work with beautiful flexible software than some simplifying framework caving me in and making me jump hoops to do the in-ordinary.
(Please don’t respond with PHP framework ‘showdown’ arguments, as I think Sheldmandu has a nice take on that, even though I don’t follow his simplistic view on ‘inheritance is key’.)

That’s why, about 4 years ago, I chose to go with the Zend Framework, being the most mature and offering so much of what I thought was important. It still forced me to do a lot of work by hand, and a lot of their code base seemed rather inconsistent. I think mainly because they let it grow too quickly without proper reviewing user contributed code base additions. And as a result of that, I think a lot of their solutions are simply not well thought out (like forms and data access).
But I loved their coding style, and the way they used naming conventions to get stuff rolling.

Then, about two years ago, I stumbled upon FLOW3, a new PHP framework built by the developers of TYPO3. In my opinion it will be the most advanced and productive PHP framework in the near future, but that has to be seen as it needs to become widely adopted. It has implemented a lot of the best practices from the Java scene (annotations, AOP, dependency injection). Which I think is a good thing, as that scene has been dealing with the largest chunk in complex software development for a long while.
I concluded that it needed a lot more time to come of age.

Around that same time I started using Magento for my own webstore (project was killed over a refuted business deal), and after that I worked freelance for 2 years with it’s complicated, yet powerful CMS abilities. A lot of 3rd party extensions built by novice Magento developers were indirectly compromising a lot of the projects I worked on (in the form of performance degrading or bug introducing plugins), thanks to Magento being too flexible and not understood well enough.
But Magento made me realise something:
What’s the use of a framework or library, if it doesn’t offer concrete reusable solutions to real world problems? In other words, why could I not find a development platform crafted on top of these high quality frameworks and libraries I so much admired?
Magento at least offered me out of the box configurable layouts, views, themes, multi site functionality….bla bla, etc etc.

Now that I wish to work on more versatile projects, preferably using out of the box, proven solutions, I have to check my facts again. I don’t want to go back and reinvent so many wheels. What are my options? What CMS can I use to not have to repeat myself too much for every similar project?
Let me write down some of my requirements:

  • An intelligent caching layer, like Magento’s, with it’s hole-punching capabilities.
  • An annotation-based domain persistence layer, using POPO’s (plain old php objects), decoupling data storage and making persistence trivial. (Doctrine 2 might fit these needs.)
  • An easy to setup service layer or domain API, enabling easier development of client-server architectures. Javascript, apps and flash are my main clients these days.
  • Straightforward creation of sites, templates and content, facilitating a multi disciplinary approach and separation of concerns.
  • Inheritance based themeing, allowing a stack of theme overrides, like Magento’s upcoming themeing system.
  • Plugin based architecture, preferably with a controlling mechanism warning developers about slow and impeding functionality.
  • Many great working plugins fitting my business needs!
  • Possibly some elaborate publishing mechanism, allowing for the entire application (files AND data please) to be pushed onwards in it’s development cycle: DEV / TEST / USER ACCEPTANCE / PRODUCTION
  • A large user base and developer involvement ensuring stable releases.

(Please feel free to add to this list)

Lately I found that FLOW3 is approaching it’s first stable release (possibly september 2011). But not only that, the release of TYPO3 v5 will be based upon FLOW3. So I quite hope TYPO3 to be the CMS I am looking for.

Magento rocks!

I had to find the right solution for our online Chronos Coffee store, and preferred to find a SaaS (Software as a Service) application which would be flexible enough and also affordable. I looked at all the big players and also the smaller ones offering shared solutions, but none of them were flexible enough for what I envisioned: A scalable, controllable application with a plugin architecture to custom fit our needs. So I decided I’d give Magento a try again. I had fiddled around with it a year ago, but decided it was too infantile to be used in a production environment (and a web store always is). After having done in depth research, I now think it is actually very mature. It has a very large community and is widely deployed all over the net. Whats was even more interesting to me is the fact that it is built on top of Zend Framework, which I specialize in and am an advocate of.
So I arranged for a private virtual server to get it up and running, and must say I am really impressed. Compared to other web solutions out there, I find my install of Magento to be very snappy and responsive. The backend is rather sluggish, but that’s not such a big deal.
I have put the website online already, because we want to get out of the sandbox Google has put us in, and get a search rank asap. Don’t look at the design tho, because we have used a standard template, and still have to create product images. Here’s a link:

www.chronoscoffee.com