News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
feed this:

Jani Hartikainen's Blog:
Decoupling models from the database Data Access Object pattern in PHP
January 05, 2009 @ 21:22:26

In this new post to his blog Jani Hartikainen looks at implementing the Data Access Object pattern in your PHP applications.

The advantage of this is that you can easily implement different methods to persist objects without having to rewrite parts of your code. I'm again going to use the programming language quiz game I wrote as an example. Since I initially wrote it to use Doctrine ORM directly, and both the old and new code are available, you can easily see how the code was improved.

He starts off with a look at the pattern itself (including a diagram of how an example would work with Doctrine) followed by the creation of the models for his Questions example. Add in the factory to create an instance and an exmaple of it in action and you're there.

0 comments voice your opinion now!
decouple model data access object designpattern tutorial doctrine



Symfony Blog:
New in symfony 1.2 Doctrine goodies
November 07, 2008 @ 12:33:15

The symfony blog has a new post spotlighting one of the new features of their 1.2 release - updates to its Doctrine functionality.

A lot of awesome stuff has been added recently to the next major symfony release, 1.2. Fabien has worked very hard to add without a doubt the most sophisticated features of any PHP framework that exists today. Not only are they nice features but he has implemented them in a OO way so that it is easy for me to implement the same features with another ORM, Doctrine. All this is done with very little work by me. So, give a big thanks to him if you enjoy this.

Included in the post is a real-world example showing how to use the symfony command line to build out an environment and create connections to the articles, categories and authors tables.

0 comments voice your opinion now!
doctrine symfony framework build feature example


ProDevTips.com:
PHP Doctrine - adding automatic, simple CRUD
October 28, 2008 @ 11:14:27

The ProDevTips site continues their look at using Doctrine in PHP with this latest article in the series that adds in a simple, automatic CRUD system to the application.

I just found myself wishing for automatic CRUD, for quick and simple administrative tasks, as it turned out a very easy thing to add.

They create a model for their Company table and a new controller to handle the admin requests. Throw in some fetching functions, a bit of form handling and a bit of Smarty login and you have a simple admin form that automatically creates itself based on the columns in the table.

0 comments voice your opinion now!
doctrine crud simple tutorial controller model smarty


Jani Hartikainen's Blog:
ModelForm developments
October 20, 2008 @ 11:19:45

Jani Hartikainen talks about some updates he's made to the ModelForm class for the Zend Framework and how its been reworked a bit to take advantage of Zend_Db_Table.

I've been reworking the ModelForm class for ZF a bit. Earlier this year, I discussed porting it to use Zend_Db_Table with Matthew Weier O'Phinney, for using it with Zend Framework. I initially had done some checking on Zend_Db_Table, and some small code changes to modify the class to use it instead of Doctrine, but I ran into some issues. Now, I've had some time to think about it, I've reworked the class slightly and added basic Zend_Db_Table support, too...

He talks about the two sides - the issues that came up (including relation support and differences between Zend_Db_Table and Doctrine) and how they were overcome (creating an adapter setup to accommodate for the relations issues).

0 comments voice your opinion now!
modelform zendframework development relations doctrine


Symfony Blog:
Doctrine gains symfony citizenship in 1.2
September 16, 2008 @ 09:48:56

As announced on the symfony blog today, Doctrine now has "citizenship" in the framework with the release of the sfDoctrinePlugin:

Today, Doctrine gained its citizenship in symfony 1.2. The sfDoctrinePlugin was linked via externals and is now officially bundled with symfony. If you've been around for a while, you'll know that this was highly anticipated and is a long time coming. To celebrate, I'll give a short little tutorial on how you can get started using Doctrine in symfony. Read below if you're interested.

The post gives you a brief introduction to how to load and use the Doctrine plugin, including how to build out an application automatically via the symfony binary.

0 comments voice your opinion now!
symfony framework doctrine plugin tutorial


ProDevTips.com:
Pagination with PHP Doctrine
September 04, 2008 @ 09:30:06

The ProDevTips blog continues their series on using Doctrine in a sample application in this new part, a look at paginating the results from your database query.

Things are starting to become more and more feature complete. Let's look at how to implement general search and pagination.

They define the search to perform ($searchConf) and the pagination parameters ($pageConf) and apply them to their current Doctrine setup applying a simple layout to make the numbered links for switching between pages. They also define the search() method that pulls the results from the table to push into the pagination component.

0 comments voice your opinion now!
pagination doctrine configure search template tutorial


Jani Hartikainen's Blog:
Understanding Doctrine's NestedSet feature
September 02, 2008 @ 10:29:56

On his CodeUtopia blog Jani Hartikainen gives an inside look at a feature of Doctrine, nested sets.

The Doctrine library comes with a feature called nested set, which makes saving trees in a database easy. However, it's quite easy to accidentally cause a lot of extra unneeded queries if not being careful. Here are some pointers to keep in mind while working with the nested set, and some example queries to make understanding it easier.

He gives an example, showing how to get rows from the database - parent and child - and some optimization tips to keep things light. There's also some pros and cons included for doing it either way (the standard fetching or using the more optimized versions).

0 comments voice your opinion now!
doctrine nestedset feature fetch database row parent child


ProDevTips.com:
File Uploads with PHP Doctrine
September 01, 2008 @ 10:37:50

The ProDevTips blog has posted the fifth part of their look at using Doctrine with PHP. This time they focus on file uploads.

It's time to take a look at how file uploads can be integrated into the Doctrine validation and CRUD process. We will have a product in the form of a digital download as an example, it will have a screenshot image that can be maximum 250 pixels wide and high. The download itself will be a zipped file.

They set up their table definitions first and set up a few validation functions (update, insert and for the file data) to work on top of that. Custom upload/uploadImage and save methods handle the user's submission while a simple delete method makes removing images easy.

0 comments voice your opinion now!
file upload doctrine tutorial database table insert image


ProDevTips.com:
CRUD with PHP Doctrine
August 25, 2008 @ 11:19:37

In a fourth part of their series looking at using Doctrine in PHP, the ProDevTips blog moves on to implementing it in a typical CRUD interface.

They create the links between the tables (two hasOne relationships), a search() method to find the destinations for a user, a sorting method to multisort based on the subkeys of the value passed in and the methods for updating the information already in the database.

That's it for now, feel free to download this tiny Smarty and Doctrine framework. Note that for this to work you have to put Smarty and Doctrine in the lib folder. There is a login interface involved, just click submit there without entering anything. There is also an SQL file in the trip_selector folder if you want to try this out with some test data (same as in the picture above).
0 comments voice your opinion now!
doctrine crud relationship update create retrieve delete


Symfony Blog:
Propel 1.3, Doctrine 1.0, and symfony 1.2
August 21, 2008 @ 11:18:52

In this new post to the symfony blog, there's an update on the framework's latest version, Propel integration and the addition of the sfDoctrinePlugin.

After more that two years of development, the Propel team has released Propel 1.3 yesterday. This is a great achievement as Propel 1.3 sports a lot a new exciting features.

These features include PDO integration, object instance pooling, improvements to the date handling features and the addition of more default values for database schemas. There's also the updates with Doctrine:

As announced in the symfony 1.2 roadmap, Doctrine 1.0 will be officially supported and the sfDoctrinePlugin will be bundled with symfony 1.2. Doctrine 1.0 beta1 has been released two weeks ago and the Doctrine team will release Doctrine 1.0 final on September 1st.
0 comments voice your opinion now!
doctrine symfony propel integration release features beta



Community Events









Don't see your event here?
Let us know!


developer framework zend mysql conference job book code releases ajax security cakephp zendframework example application PHP5 PEAR database package release

All content copyright, 2009 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework