Posts Tagged framework

How to force symfony colors on windows with PuttyCyg?

Those of you who’re developing with symfony under windows will have noticed that, when running tasks in the command prompt, no colors are used. This is because the windows command prompt isn’t compatible with the color notation.
Most of you also have cygwin installed (shame on you if you didn’t :p). But even if you run the tasks through “PuttyCyg”, which is fully compatible with the color notation, you will not benefit from the colors.

Why?

Read the rest of this entry »

Tags: , , ,

Symfony Forms Framework: Merge 2 forms

Recently I had to create a form to create/update users in our system. Some time ago we decided to save are users in 2 tables. The first table would contain all login information and the second his personal information. This is a simple example of the DB design:

User db design

User db design

I would not recommend doing this for so little fields. But in our system we have a lot more fields, and it helps us to optimize our queries.

Wouldn’t it be better if we could merge the 2 forms? The answer is yes. And it’s pretty easy to do so in Symfony … too bad that it’s not documented on the Symfony website.

Read the rest of this entry »

Tags: , , ,

symfony 1.3

symfony announced a new release in November 2009 and will be going from 1.2 to 1.3.

It’s wonderful that these guys are thinking ahead and keeping us up to date. Why is this important, you ask? Well would you invest in software that isn’t trying to evolve to a better version, to a more reliable version? I don’t think so. Like in our case: We started developing software in October 2007 and needed a part of the project to be PHP-based. The choice of framework wasn’t that easy but the great documentation and the future developments convinced us to use symphony. And we didn’t regret our choice for one minute. Fabien Potencier and his crew keep their promises to the developers and users.

I can quote him as they give good reasons why they should keep us up to date:

  • the users will have time to learn all the great symfony 1.2 features compared to symfony 1.0
  • the core team will have plenty of time to make symfony 1.3 rock solid
  • the documentation team will have time to write even more tutorials and blog posts
  • the plugin developers will have plenty of time to upgrade their plugins to 1.2 with confidence that their work will still be relevant for 1.3.

Great work guys, keep us up to date, in the mean time we’ll do just fine with the 1.2 version.

Tags: ,

Symfony: How to refactor

Last year, my team and I, needed to create a new web application. We decided to make use of a well known PHP framework called Symfony. Not because some say this is the best framework, but because …

  • It is Enterprise Ready
  • Has many plug-ins available
  • It is Actively developed
  • (most important) A great community and documentation
  • Integrated Unit Testing

Although symfony has a good implemented MVC architecture with a lot of helpful functions, it is still very easy to make some design mistakes, like the DRY (Do not Repeat Yourself) principle. Fabien Potencier, lead developer of symfony, recently refactored an existing web project which he wrote down in the symfony blog.

If you work with symfony, you really should read this refactoring session because I’m pretty sure somewhere in your code you made the same mistake(s).

Call the expert: A refactoring story (Part 1, Part 2, Part 3, Part 4, Part 5)

Tags: , , , , ,