Framework for new application: zend or symfony

Hi,

I know this has been done many times before (some posts are really old so would be nice to get feedback based on current state of play), but I would like people’s advice on which framework to use for a new application that we are about to start developing and I am confused between ZF and Symfony.

I guess the correct answer is ‘depends on what you’re application and you’re own requirements/preferences’ so here is a brief description of the application and some of our own requirements:

The Application:

A financial transaction system. There are 3 parts to the system:

  1. A large 3rd party financial institution that actually processed the transactions. They have a SOAP API that will be used by our ‘server’.

  2. The ‘server’: acts as the middle-man between the ‘client’ app and the SOAP API and also stores data on the transactions in a database. Needs to provide a web service API for client apps to use. Web app for admin type users to manage/configure the system and provide reporting.

  3. The ‘client’: lightweight web app that uses the server web service, runs on agents devices which will primarily be a web-enabled Point-of-sale terminal. Screen size is quite small and Internet speeds may be slow too. The basic uses are login/create transactions/payout transactions/logout/basic daily reports. Will probably need to be quite ‘desktop’-like to provide a fast and easy user experience so probably fair amount of AJAX.

Our Requirements:

  • good and easy testing features
  • good support for jQuery
  • allow easy output of different types of output (HTML, XML, JSON, CSV)
  • good security features
  • fairly fast development (as always, schedule is tight)
  • nice clean business logic layer with freedom to architect the solution as we like
  • a framework that helps you to get stuff done quickly but doesn’t restrict you too much
  • a good platform for doing other projects

Any feedback from people who have used these frameworks (specially those who have used both) would be much appreciated.

Thanks
Ziad

Hi PHPycho,

I take your point but I’m not sure if everyone would agree that its a valid point, specially Symfony fans. I’m sure you could develop a very good eCommerce platform using Symfony but its just that no one has done so.

Have you used Symfony? It would be good to know your thoughts on the pros and cons of each framework if you’ve used both of them.

Thanks

Zend Framework Vs Symphony ?
Simple Ans: In which Framework Magento is made of?

As far as I understand from my limited reading of ZF, they have never intended to provide a model layer following the philosophy that the model layer is the business logic layer of the application and should be independent of the framework and I’m fully behind this philosophy.

I think ZF does have something that gives you Active Record like functionality but again I’m not too big a fan of the pattern, I prefer data mapper.

Hmm so it seems I’m quite biased towards ZF :slight_smile: the only problem is the productivity. I guess that’s life, you can’t have it all!

Well if your requirement is fast development ZF is not really an option… ok they have a Zend Tool now… but as far as i Know still no Model and Active Record implementation… but if you dont’t mind spending some time writing those on your own ZF is very flexible :slight_smile: So Symfony would be the better choice as they have a standard setup and many plugins that you can use.

but ZF it’s definitly not as RAD as Yii, Cake, Lithium… but have to say that my experience with it has been limited :wink:

I’m not sure that’s much of an endorsement. Magento runs like an old dog on anything but the best servers… :rolleyes:

Hello Guys, me too planning to develop my app using Zend Framwork. Could u tell me is there number of webhosting service availialbe for Zend framwork specially for php 5.3. i’m afarid if develop my app in zend and don’t find a shared, vps or dedicated server for app.

NOOOO! Thats the last thing I need: another framework thrown into the mix! :slight_smile:

Mmm after trying out cakephp, symfony, zf, i have chosen for yii :slight_smile: it’s fast and easy to work with.

Thanks for all the responses. I still haven’t made the final decision yet.

If all the conditions were right I’d choose ZF, I think I like the whole freedom thing in ZF appeals to me. The only problem is the productivity. If you can get things done faster in Symfony then thats gona be quite a strong argument for Symfony.

From what I understand they are both good frameworks to work with. Anyway when I’ve made my final decision I’ll try and make a post here.

It comes down to what you want. Do you want to to have build something from scratch using a standardized tool-set or have some common user interface things already built for you? The obvious trade-off is that one will offer much more flexibility because you pretty much build everything from scratch. In the other your sacrificing a higher level of flexibility for out of the box functionality. With every open source solution there is some type of sacrifice. If your going that route the best choice to choose the one that best fits your criteria. For example, if the project budget is smaller it may be more practical to go with something that already has some functionality. Like wise if the project budget is large and time isn’t that big of the issue it might make more sense to go with something that offers more flexibility and customization options regardless of the time reduced by having those items boxed in a generic fashion. No one can really tell you what to use. Anyone who tells you exactly what to use without the knowing the extent of of brief, time-line, environment, host, audience, etc is providing an opinion based on peronal bias and/or comfort.

I’ve been looking into the two frameworks and although I was pretty much convinced to go with ZF now I’m in two minds again. From what I’ve researched it seems that Symfony will give you a lot more than ZF will so with ZF you’ll have to do a lot more to get the same job done. Is this an accurate conclusion?

I read this and it worried me!

http://www.robertspeer.com/blog/symfony-refactor-of-the-zend-quick-start-tutorial/

Have things changed much since then? Does ZF now have generators and make it easy to do stuff like the admin backend?

Both replies on this post have suggested to go with ZF. Can you guys tell me what ZF gives that Symfony doesn’t. With ZF I’d certainly get more flexibility but it seems that Symfony would allow flexibility as well, just maybe not as much as ZF. Would it be right to say that as long as you have total flexibility in the model layer, the other layers or parts of the system is not too much of a concern from a flexibility perspective. From what I’ve found out, symfony would allow me to design the model layer as I liked without getting in the way.

Symfony uses Zend, not all of it but many Zend classes are in Symfony. Symfony looks good to me, I have not used it though, only looked at documentation and source code.

Hi,

Thanks for your comments. I was starting to lean towards ZF and now with your comments I’m pretty much sold, unless someone else comes with some blazing meteors for why symfony should be used :slight_smile:

Does ZF have good support for functional testing? I know symfony has this feature.

@kyberfabrikken: your suggestion to develop the middleware and the client completely separately, by this you mean that these should be two different ZF apps independent of each other right? This is what I was planning.

Hi, I would recommend Zend. Symfony works good with SOAP APIs but support for jQuery can be easily used with ZendX, a Zend library, and the flexibility of the Zend Framework will allow you to make your architecture the way you want. I have used both Symfony and the Zend Framework, and I believe the ideal choice in this situation is Zend Framework.

You can certainly use both, but from your description, I would probably recommend Zend over Symfony. I perceive Symfony as a framework, which is strong on tying the presentation layer together with the rest of the application. ZF is more loosely coupled.

I would also suggest that you develop the middleware and the client completely separately. Perhaps even assign different people to work on each, just to keep them separated. Make sure that you test the middleware in isolation of the client. You might be able to use a high level javascript framework, such as Ext JS for the client, which would allow you to develop a desktop-like application with little effort.

Not really. ZF is more low level than Symfony. It’s like a box of tools, that you can pick and chose amongst. Because of its loose coupling, it doesn’t really dictate the user interface much, which means that there is no single way to do functional testing. This doesn’t mean that you can’t do proper functional testing of ZF apps. You just have to do it your self. Look at either Simpletest or PhpUnit for that.

Yes. Although I suspect that you can develop the client entirely as a javascript application, so that would mean a single ZF app (the middleware) and a rich javascript app (the client). Of course, this depends on the complexity of the client, and also on your teams skill set.

I suppose PHPycho didn’t say in which way it is the answer to the question. :wink:

ziadmannan, if you’re still following this thread… what framework did you choose? Any further thoughts between the frameworks, now perhaps with some product development behind you?