SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 26
  1. #1
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)

    Symfony - General Thoughts

    Hello everyone,

    So, I'm starting on a new rather large project which needs to be capable of crazy fast performance (maybe not Google/Facebook crazy, but still pretty high spec).

    Normally Wordpress is my go-to CMS of choice (don't want to discuss that here =p), but it's not going to cut it for this project.

    I was thinking of building something from scratch, but in this day and age, that's a bit silly.

    I did some research and I'm thinking Symfony is going to be my best bet. I played around with some of it's stuff. It's a bit different (mainly the directory structure), but it seems like a pretty solid properly-namespaced MVC library. I think it'll fulfill the needs of my project pretty well.

    I just wanted to ask everyone that may have used Symfony for general thoughts. Are there any gotchas with it? Is it capable of really high performance (it's caching engine seems pretty solid, so I'm hoping it is)? Anything else I should know?

    Thanks.

  2. #2
    SitePoint Wizard wonshikee's Avatar
    Join Date
    Jan 2007
    Posts
    1,223
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I was under the impression Symfony was the largest framework and also the slowest.

  3. #3
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,149
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Symfony is used by Yahaoo Bookmarks, Yahoo Answers, Delicious, Dailymotion... so yeah, Symfony can definitely perform. And I believe those sites I just mentioned were built with Symfony1. Symfony2 is relatively new and even better.

    Overall, I think Symfony is extremely well architected. It's a fantastic model for good OOP and design patterns. Usually you'd think with frameworks that you're trading structure for flexibility, but Symfony never felt restrictive. It's very configurable and flexible. You can use Twig for templates, or raw PHP if you prefer, or any other template engine of your choice. You can use Doctrine ORM, or Propel, or any other ORM, or no ORM. Symfony doesn't lock you into anything.

    Since you were thinking of building your own, then you may find From Flat PHP to Symfony2 an interesting read.

  4. #4
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    I already gave that a read. =)

    I really like Twig and I haven't used Doctrine before, but I'm liking what I'm reading.

    I did a very simple test and it loaded my super simple dev page in 31ms. I'm assuming that's probably cached (which this site would be largely dynamic), but still... that means that the overall overhead (when using cached content) is only 31ms... that's pretty light-weight.

  5. #5
    ¬.¬ shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Can get even more speed by using a opcache as well.
    And for high-performance applications I always recommend using one of the many cloud services.

    I personally use Windows Azure, because well I like IIS7 but of course you are not limited to that.
    It also forces you to build your application in such a way the allows high performance and reliability.

    Thus I recommend this video if you want more information, it mainly covers Windows Azure but you can use it for others.
    http://channel9.msdn.com/events/BUIL...D2011/SAC-852F

    And yes, PHP functions perfectly with Windows Azure. As does a lot of other services. Almost anything that runs on Windows Server will work.
    Apache for example could be installed if you didn't want to use IIS7.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  6. #6
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    I actually have opcode caching installed already (APC).

    We use Rackspace Cloud for most of our hosting needs. We also have a pretty high end (though smaller) "cloud" in our colo.

    Is Windows Azure a CDN-type cloud or is it pretty much like Rackspace Cloud (one server with stuff on it somewhere)? I personally don't like IIS (or Windows as a server), but if it offered superior performance, I'd definitely be willing to look at it as an option.

  7. #7
    ¬.¬ shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by samanime View Post
    I actually have opcode caching installed already (APC).

    We use Rackspace Cloud for most of our hosting needs. We also have a pretty high end (though smaller) "cloud" in our colo.

    Is Windows Azure a CDN-type cloud or is it pretty much like Rackspace Cloud (one server with stuff on it somewhere)?...
    Windows Azure is a PaaS (Platform as a Service), it offers a bunch of services including a CDN. Basically the hardware and the OS is all taken care of for you. You just worry about making your application stateless. Stateless so it can scale as the load increases or decreases. You are also never on one server. Even Storage is on its own server. But I do very much recommend you give it a look. Windows Server 2008 R2 (Which Windows Azure uses but highly modified) and IIS7 have both been improved greatly in terms of performance compared to older version like Server 2003 and IIS6. When properly configured with all the bells and whistles with opcache, and static/dynamic caching built into IIS7, PHP just flies.

    But yeah thats from my own experience working and playing with PHP is various configurations and setups over the years.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  8. #8
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    Is the software on a CDN, or just some stuff. For example, Rackspace Cloud, the Cloud Servers are essentially a glorified VPN sitting in a data center in Texas. Their Cloud Files are on a CDN though, using Akamai.

    I'll give Windows Azure a really close look tomorrow. If the price is relatively in the same range and I think it'd suit us, I think it'd be an easy sell to our IT manager (he's a Windows fan).

    (Watching that video now, it's just a bit long and I'm multitasking, so I keep having to jump back to it XD)

  9. #9
    ¬.¬ shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by samanime View Post
    (Watching that video now, it's just a bit long and I'm multitasking, so I keep having to jump back to it XD)
    Just a bit long XD could have probably gone a little faster. Its also only the introduction there is a second video that goes deeper.

    If you are really curious on how it all works that is:
    http://channel9.msdn.com/Events/BUIL...D2011/SAC-853T
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  10. #10
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    I'll check that one out too. I actually like that they go into some pretty good details. With Rackspace Cloud I got the details out of them, but it took several conversations with them to get them all out.

  11. #11
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    Oh, something else about Windows Azure: Does it just work with a proper stateless program, or if I develop with Windows Azure, I (and everyone we may sell this product to) is stuck with Windows Azure?

    I'm rather familiar with stateless, scaleable software development so I can't think of a reason it could, but they do describe a few not-so-standard things in this (like the Queue thing).

    Thanks.

  12. #12
    SitePoint Addict Divisive Cotton's Avatar
    Join Date
    Jun 2008
    Location
    Andy lives in London, UK
    Posts
    393
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Symfony is on my "to learn" list this year

    I was initially thinking of learning Zend as my new framework but for 2012 decided to settle on Symfony

    I recently brought this book to help me: http://www.amazon.co.uk/Building-App...5&sr=8-1-spell

    I've read about 100 pages and I must say I'm really impressed so far

    It's worth noting that after much discussion amongst Drupal developers it has been decided to incorporate a number of Symfony components into version 8

    http://drupal.cocomore.com/blog/what...rward-drupal-8

    Using Symfony2 components is a big part of this effort; Symfony2 is an open-source application framework with a lot of nicely abstracted and discrete components, several of which are being integrated into Drupal to build on its strengths as a CMS. The HttpFoundation and ClassLoader elements have already been added to Drupal 8, but the latest WSCCI Sprint, attended by almost all of the Drupal core developers most of us can probably name, along with Fabien Potencier, the Symfony lead developer, determined that several other Symfony2 components would also be included. While these changes may sound daunting to many long-time Drupal developers, it should actually make the core much more approachable for developers new to Drupal, while also making Drupal inviting to experienced Symfony developers. Additional benefits include reducing a the heavy load of Drupal requests, making it more “lean and mean” and providing partial page caching for example, while also delivering a number of powerful features for Panels-like applications, better blocks, and much, much more. Some of the work related to the WSCCI project has been underway for some time now and was encapsulated in a Drupal 7 development module called “Butler”. [Update: I had linked in the Butler project, but Larry Garfield has indicated it is “vestigial” and there is no way that any of the final WSCCI changes will be back-portable or functional as a D7 module.]
    Let everyday be Christmas

  13. #13
    ¬.¬ shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by samanime View Post
    Oh, something else about Windows Azure: Does it just work with a proper stateless program, or if I develop with Windows Azure, I (and everyone we may sell this product to) is stuck with Windows Azure?
    Its not stuck with Windows Azure by any means. It may need tweaking on another platform but that would be no different on another. Probably the only thing you would have to change is the messaging between the frontend and the backend as well as storage. Other then that, it would be regualr PHP.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  14. #14
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    Great, thanks. I've brought it up with my boss (who unsurprisingly has already looked at it multiple times) and I think we'll be giving it a go with this project.

  15. #15
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,048
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    Are you talking Symfony 1 or 2?

    I have only ever used 2 so I will talk a little about that.

    The one thing you have to understand and commit to when learning Symfony is all the third party libraries that are used. When learning Symfony your not just learning Symfony but Twig, Doctrine, Unit testing, Assetic, etc. Though the documentation is excellent for most of those projects including Symfony which touches briefly on each topic.

    Quote Originally Posted by samanime
    Great, thanks. I've brought it up with my boss (who unsurprisingly has already looked at it multiple times) and I think we'll be giving it a go with this project.
    it is always nice to get away from the same tools used day in and day out. Especially WP…
    The only code I hate more than my own is everyone else's.

  16. #16
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    Lol, don't knock WP, I've been defending it in another thread (though obviously I know it can't do everything =p).

    And yes, I am referring to Symfony2. Looks like there is a pretty big following of Symfony(1) still, so maybe I should start making the distinction.

    The beauty of the third party library stuff is I was already planning on using Twig when I was building it from scratch, and I'm already familiar with unit testing (using PHPUnit... not sure if it uses the same or not, guess I'll find out =p). I didn't know about Doctrine, but now that I'm learning about it I'm starting to love it (I loved that I could automatically generate all of my models from my database last night =p).

  17. #17
    ¬.¬ shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Its fun learning new things, makes us more valuable as developers if we have skills in multiple areas. Plus it can get stale using the same thing all the time :P Gotta work that brain.

    * Find it a remarkable you blog is named Xazure and here we are talking about Windows Azure.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  18. #18
    SitePoint Guru
    Join Date
    Nov 2003
    Location
    Huntsville AL
    Posts
    664
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wonshikee View Post
    I was under the impression Symfony was the largest framework and also the slowest.
    Just out of curiosity, what gave you that impression? Especially about the speed?

  19. #19
    SitePoint Wizard wonshikee's Avatar
    Join Date
    Jan 2007
    Posts
    1,223
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ahundiak View Post
    Just out of curiosity, what gave you that impression? Especially about the speed?
    Well it's from several years ago (last time I was active here). Every other thread was about which IDE is the best or which framework to use. It's size (has a lot of features) and speed (slow) were the few comments that stuck with me. I have no personal experience with it so I have no opinion of this matter.

  20. #20
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    That could have been Symfony1 (just Symfony). I'm actually talking about Symfony2 (so I've learned =p).

    From what I can tell, they're pretty much two different beasts.

    I've been using Symfony for a few days (just mucking around, will start doing some real work with it this weekend). So far, I've loved everything I've seen (which is kind of surprising because I generally tear apart frameworks and can point out a billion things I dislike).

  21. #21
    SitePoint Wizard bronze trophy Immerse's Avatar
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    1,661
    Mentioned
    7 Post(s)
    Tagged
    1 Thread(s)
    Symfony2 is pretty awesome, although we ended up going with Lithium for our project. We ran a bunch of 'Hello World' type benchmarks, and Lithium out-performed everything save 'raw' PHP. For ORM we ended up plugging Doctrine2 into it, for templating we use Twig. I love the way all the modern frameworks allow you to swap stuff out, it saves a great deal of work

  22. #22
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,149
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Immerse View Post
    ...We ran a bunch of 'Hello World' type benchmarks...
    Fabien Potencier, the developer of Symfony, likes to make quips about Hello World benchmarks. He's the first to admit that Symfony is one of the slower frameworks when tested against a simple Hello World application, and he recommends that you don't use Symfony for your next Hello World website. :-P

    In real applications, your database queries are much more likely to be the biggest factor that affects performance. Real applications will also have all sorts caching mechanisms -- query cache, page cache, core compile cache. Some benchmarks don't even give frameworks an opportunity to use their config cache, which seems silly to me.

    I think all the major frameworks have been used in an enterprise context, and they're all fast enough. So the factor you should probably be looking at is which framework helps you develop better.

  23. #23
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    I was just going to make the same kind of comment. A Hello World benchmark only tests the most basic of the basics. However, a real application has so much loaded on to it, each of the speeds of those parts really adds up.

    The annoying thing is, the only way to get a true benchmark for any given project is to build it in both languages (which is never going to happen =p).

    Lithium looks pretty cool, but I think for now I'm going to stick with Symfony. That 38ms Hello World project I did with it left me pretty happy. =)

  24. #24
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    2 Thread(s)
    samanime

    I am currently ending development of a custom leads generation system in Symphony 2. Our team has been very happy with it; not as fast as some of our 'ground up' php apps but with no question has sped up development and given a common understanding of how the code needs to be done (conforming to the Symphony conventions).

    We support a somewhat large user base with very few performance issues. As other posters have said caches, database performance even type of RAID configuration and switched networking really play parts in the speed the database component is more likely to cause the performance bottle neck... nothing you already don't know. But from or experience Symphony 2 was a great choice.

    Good luck with this.

    Steve
    ictus==""

  25. #25
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    Thanks Steve, good to hear from someone that is using it "out in the field" =p


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •