Tom Hempel’s Blog

I'm entrepreneur, author and investor living in Silcon valley. You can also find me at:
Read my book:
leadingmanagingsiliconvalley.com
Twitter

 

February 2012
M T W T F S S
« Aug    
 12345
6789101112
13141516171819
20212223242526
272829  

Version splitting in Symfony

So I’m building this website for Art In Action, and it’s all done in symfony. I really love symfony, because it makes everything so clean and structured, and one can be so productive. The admin generator is a lovely thing – I discovered how to make an entire authoring system out of it, and I’ve a got a whole team of high school interns using it to add content, it’s great. But today my topic is plugins. Plugins are a wonderful thing in symfony because they allow you to reuse so much of other peoples’ code in your own application.

There’s only one small fly in the ointment. The symfony guys keep releasing new versions, which is good. But when they do, they force code changes in the plugins. Since not everyone upgrades, the plugin now needs to maintain multiple versions. So we have symfony 1.0, 1.1 and 1.2, and we have Propel and Doctrine on the database side. Figuring that 1.1 never went anywhere, you really need 1.0 Propel, 1.2 Propel and 1.2 Doctrine versions. Unfortunately most plugins are the result of people sharing their own work. They have no great interest in general in maintaining this in all possible versions, other than the ones they use personally. As a result, the plugins aren’t always useful, because you can’t always find one that matches your own configuration. In particular, the propel versus doctrine thing is annoying. Doctrine seems better, and I would use it myself, but more of the plugins I need are in propel format, so I’m staying with Propel. As a result I’m having to change Doctrine plugins over to Propel. I already did sfApplyPlugin that does email authentication and profile management of user registrations. I’m now working on sfLucenePlugin which is only released for 1.0, but exists in beta form for 1.2 doctrine. So this is a two way conversion from 1.0 to 1.2 and from doctrine back to propel.

Well I’m doing it, but it’s kind of a hassle. And Symfony 1.3 is around the corner! I hope this doesn’t mean yet another set of incompatibilities. In that respect the WordPress folks are doing a nice job keeping all the plugins alive. I just today upgraded this blog to WP 2.8 from 2.7 and it all worked great. I love it when upgrades work perfectly. I think everything should automagically upgrade.

Share it:
  • TwitThis
  • Ping.fm
  • StumbleUpon
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Technorati
  • Yahoo! Buzz
  • LinkedIn

2 comments to Version splitting in Symfony

  • Any chance of sharing the sfApplyPlugin that works with 1.2 and Propel?? Also, just curious why you wouldn’t convert Propel plugins to Doctrine. Is it much harder than the other way around? I am in the same boat where I would switch to Doctrine because it seems more popular, but there is a csv import plugin that I use in one of my projects that works only with Propel. I am new enough to Symfony that I haven’t had the time to learn about converting from Propel to Doctrine. It seems messy.

  • I just posted a new blog entry on this general topic. My version of sfApplyPlugin is not very reusable. I wound up drastically modifying it to deal with Propel, the customizations I made, and various bugs in it. I like what it does, but it needs a lot more work to be completely reusable in this context. While I’ve had to fix a bug here or there in a couple of the plugins, this one has been relatively painful. I thought about using their customization mechanisms, but I realized I was following up a head transplant with a body transplant, so I decided to simply hack it into whatever shape I needed. If in the future there’s a real propel version, I could rethink this.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>