Archive for the ‘Around the web’ Category

Matthew Turland: Models in Zend Framework

Matthew Turland has written an article on models in Zend Framework.

A question that frequently comes up in my interactions with other developers about Zend Framework is how to approach designing models. There’s a small collection of resources and advice that I generally give on the subject, so I thought I’d write up a blog post to give people an easy place to access it all.

He then goes on to provide links to articles that cover Data Mappers, Table/Row Data Gateway and Active Record with Doctrine approaches to designing a model, before covering the approach he himself uses.

Posted by Rob on 27th March 2010 under Around the web | Comments Off

Chris Morell: Zend Framework Bash Completion Script

Chris Morell has created a bash completion script for Zend Framework.

If you use the Zend Framework CLI interface much you probably find yourself expecting tab-completion to work. Well, with this bash completion script it will.

Once installed, typing “zf cr” followed by a tab will automatically fill in “create” for you. Very handy.

Posted by Rob on 21st March 2010 under Around the web | Comments Off

Robert Gonzalez: Building the PHP MS SQL Server extension from source on Ubuntu 8.10

MSSQL on Linux seems like a bit of a black art at times. Today though, Robert Gonzalez has posted an article on how to build the SQL Server extension for PHP from source on Ubuntu which could make life easier:

the fact remained for me that I had to be able to integrate database communication from LAMP to a SQL Server on Windows [...] the only way to make this happen is to build the SQL Server extension from source.

He then goes on to detail the steps required, starting with building the FreeTDS library, building the PHP extension and configuring it all so that it works.

Posted by Rob on 16th March 2010 under Around the web | 2 Comments »

Juozas Kaziukenas: ZF is not bloated

Juozas Kaziukenas has posted a new article looking at why people seem to believe that Zend Framework is bloated. In Zend Framework is NOT bloated, he says:

Zend Framework is always considered as being the slow/bloated one. I don’t think this is right, so I decided to prove that it’s not correct and in fact ZF is as good as other frameworks are. This post doesn’t cover any benchmarks though; this is more like a architecture review and some misconceptions disproof.

He then goes on to discuss various areas that perceived to be bloated, such as the installation footprint, amount of features and system resource use, looking at why the perception exists and what the reality is.

Posted by Rob on 12th March 2010 under Around the web | Comments Off

Matthew Weier O’Phinney’s Blog Module Bootstraps in Zend Framework

Matthew Weier O’Phinney has posted a new article on bootstrapping modules:

When it comes to modules, we have three typical problems or requirements:
  • Ensuring that module resources — models, view helpers, etcc. — are available elsewhere in the application
  • Initializing module-specific resources, such as routes, navigation elements, etc.
  • Running code specific to this module (selecting a specific layout, selecting a specific database adapter, etc)
Zend_Application answers the first two questions. By default, it sets up a resource autoloader with targets for all the common resources (models, forms, view helpers and filters, DbTable objects, etc.), and also allows you to specify resources to load at bootstrap time.

He then goes on to explain what module bootstraps are used for and how to use front controller plugins to handle initialisation tasks if the module is the one being executed.

Posted by Rob on 11th March 2010 under Around the web | Comments Off

Steve Hollis’ Blog: Practical Nested Transactions with Zend_Db and MySQL

Steve Hollis has written an interesting article about how to handle nested transactions with Zend_Db and MySQL.

He starts by covering what transactions are and why they are useful for data integrity, showing how to use them with Zend_Db. He then goes on to talk about the problem of mapping a single transaction across many model objects:

Although transactions are a useful tool, sadly they don’t always fit well into an object oriented application. It’s common to delegate the actual persistence (inserting and updating) of models to a save method which, in turn, goes on to save child objects.
Without ugly hacks which tie the models directly to the database operations, it becomes difficult to establish which object started the transaction and when it should be committed.

In order to help solve these issues, Steve introduces an extended Mysqli adapter for Zend_Db that allows for nesting, along with some notes on its usage. Life Steve, I also heartily recommend using Zend_Db_Profiler for monitoring your database queries during development.

Go have a read!

Posted by Rob on 5th March 2010 under Around the web | 1 Comment »

Writing command line scripts for your ZF application

David Caunt has posted an article on how to access your Zend_Application resources from a command line application:

As PHP developers, it is convenient to be able to write command line scripts in PHP. In doing so, you will almost certainly want access to Zend Framework components and their configurations as if you are writing a normal MVC app, but without invoking the MVC stack and without loading unnecessary resources. I’ve seen solutions where actions are exposed as controller actions and called by wget – these are counter-intuitive, inefficient, and will suffer from max execution timeouts and other problems.

He then shows how to write a bootstrap file that only loads the resources required, so you are ready to write a command line script that interacts with you ZF application.

Posted by Rob on 25th February 2010 under Around the web | Comments Off

Zend Framework 1.10.1 Released

Over on DevZone, Matthew has announced the release of ZF 1.10.1.

On behalf of the Zend Framework’s many contributors, I’m pleased to announce the immediate availability of Zend Framework 1.10.1, the first maintenance release in our 1.10 series. You can download it from our downloads page: http://framework.zend.com/download/latest

Also, the Zend Framework manual now supports user comments!

Posted by Rob on 10th February 2010 under Around the web | Comments Off

Bradley Holt on Zend Framework

Bradley Holt recently gave a presentation to his local user group on Zend Framework. He has now posted the slides on his blog along with a sample application, called Postr on github.

He has is now following up with a series of blog posts on aspects of Zend Framework. The first one, Bootstrapping Zend Framework Applications is up and well worth reading.

Posted by Rob on 31st January 2010 under Around the web | Comments Off

Zend Framework tips and tricks

Juozas has posted a great article about tips and tricks to consider when developing Zend Framework applications.

He divides his tips into five main areas:

  • Separate logic
  • Globals
  • Use form values, not request
  • Do not rely or use exit()/die()
  • Use a framework, not PHP

Everyone should read it!

Posted by Rob on 29th January 2010 under Around the web | Comments Off

« Prev - Next »