The State Of Propel2

A week ago, we held the second Propel2 IRC Meeting to talk about Propel2. It was really interesting, and constructive.

First, we talked about the roadmap. We asked people to delay the Twig/Builders refactoring. Some concepts we use today are not easily doable using Twig (filters for instance). In other words, we have to think a bit more on this part, and to build a proof of concept with Twig. Last thing on this point, we tagged all blocking issues for a pre release.

The second main topic was the documentation with a call for a leader, and contributors. We also decided to write a tutorial to introduce Propel2 in real life.

The third point was Propel 1.6, and Propel2 in the [s|S]ymfony world. The consensus is that symfony 1.x won't officially support Propel2. By the way, Propel 1.6 is still bug/security fixes only, and no plan to stop it. For Symfony2, the PropelBundle follows a new branching model to prepare the Propel2's integration.

One more thing, we will have Behat tests in the first Propel2 release thanks to @everzet!

Please, find the transcript below:

Read the rest of this post »

Filed under  //  2.0   meeting  
Comments (2)
Posted by William DURAND 

Put Your Behaviors On Steroids

Propel is bundled with a lot of great behaviors. All of them are real behaviors, not just extensions, that's why it's really powerful. You can customize every generated class without any effort thanks to hooks, and filters.

To write a behavior is easy, you just have to read the dedicated documentation page, and you'll be ready to write awesome behaviors. Don't forget to look at user contributed behaviors before to start, maybe someone already wrote what you need.

A behavior adds logic to your model layer so it must be unit tested. Most of the time, you will have to rely on the PropelQuickBuilder to setup your test suite. This builder will build classes for a given XML schema. The code below shows an example of a test class:

Read the rest of this post »

Filed under  //  1.6   behavior  
Comments (0)
Posted by William DURAND 

Propel2 IRC Meeting next Monday

Six months ago, I wrote a blog post titled Propel2 has begun!, now it's time to speak about its release. Yes, no mistake there, Propel2 is almost ready, and we would love to talk with you.

That's why we will organize an IRC meeting on Monday, April 23 at 21:00 CEST (+02:00 - that's Paris/Zurich time) focused on Propel2.

The IRC meeting will be on the #propel channel on the Freenode IRC server.

See you on Monday!

 

 

Filed under  //  2.0   meeting  
Comments (7)
Posted by William DURAND 

Propel 1.6.5 is Released

Propel 1.6.5 is now available, it's the second bug fixes release but it also contains a gift. Thanks to Denis Dalmais, and Cedric Lombardot, two awesome contributors, Propel now has an EXPLAIN feature, and sfPropelORMPlugin, and PropelBundle already use it.

Read the rest of this post »

Filed under  //  1.6   release  
Comments (7)
Posted by William DURAND 

Don't Do This At Home #5: Use where() Instead Of filterBy()

Can you spot the problem in the following snippet?

Read the rest of this post »

Filed under  //  query   tutorial  
Comments (4)
Posted by Francois Zaninotto 

Don't Do This At Home #4: Add Indices On Foreign Key Columns

Can you spot the problem in the following schema?

Read the rest of this post »

Filed under  //  tutorial  
Comments (2)
Posted by Francois Zaninotto 

Don't Do This At Home #3: Terminated Query Methods

Can you spot the problem in the following snippet?

Read the rest of this post »

Filed under  //  1.6   query   tutorial  
Comments (13)
Posted by Francois Zaninotto 

Propel meets Silex

Do you know Silex, the awesome PHP micro-framework? It's based on the Symfony2 components, and provides all you need to write applications.

Thanks to Cristiano Cinotti, we now have an official Propel Service Provider for Silex that eases the integration of Propel in a Silex based application. You'll find this project on our GitHub organization, so don't hesitate to contribute.

One more thing, to show how the provider works, I wrote Propilex, a simple application to manage documents, with a generic RESTful controller, and Backbone.

Filed under  //  symfony  
Comments (0)
Posted by William DURAND 

Don't Do This At Home #2: Count After Hydration

Can you spot the problem in the following snippet?

The problem is that, if all you need is the number of books, you just wasted a lot of memory.

Read the rest of this post »

Filed under  //  tutorial  
Comments (3)
Posted by Francois Zaninotto 

Design Your Queries Like A Boss

As I often repeat the same advice on questions like "What to put in Propel Queries?", or "How to name things?", I decided to share it here.

When you design a software, it's important to use appropriate names for each part, each class, and even each method. In Propel, the ActiveQuery API is probably the most powerful part of your Model, that's why you should take care of it.

Read the rest of this post »

Filed under  //  tutorial  
Comments (2)
Posted by William DURAND