Which framework should I use?

Hello friends :slight_smile:

I dont know to code in any framework but I have to learn the one which is most suitable for this application:

  1. Website on shared hosting.
  2. Users can register and supply their services and determine what they are interested in so I can match between them.
  3. Each user has points, he will pay a certain amount of points for each service he gets, and the supplier will earn these points.
  4. Users have profiles and they can message each others and create appointment … after that they will confirm the appointment and rate it.
  5. In addition I need to create (Q & A) system just like Yahoo answers or Google answers.
  6. My ambition to reach 50.000+ users.

My criteria for the best framework is: security and speed, no matter how difficult to learn it is

thank you :slight_smile: :slight_smile:

On shared hosts you may want to consider Laravel or Yii framework, Codeigniter is also okay but its development is kinda slow/stopped nowadays. I dont recommend Zend, Symfony nor CakePHP for performance reason.

Take a look at this article for reference:
http://systemsarchitect.net/performance-benchmark-of-popular-php-frameworks/

Thank you friend :slight_smile:

someone told me to use a CMS, he recommended Joomla, what do you think?

I was thinking of Zend, but I have seen a lot of results about its performance, I do really care about website speed, thanks for sharing that link

Well a CMS sorta builds your site for you already, they make your work easier but also place some constraint of what kind of site you can build. If you are a coder, Id say you dont have to use CMS. But if you aint quite comfortable coding your site, CMS is the choice to go.

You do realize that Laravel is built on top of several Symfony components – right.

I installed laravel using composer; I saw the word “symfony” more than “laravel”

What do you suggest my friend Oddz? Thank you :slight_smile:

If you’re going with a framework as opposed to a CMS Laravel seems to be all the rage in the PHP circle these days. Though I can’t comment directly on anything about it considering I’ve only ever read the documentation. For the last several years I’ve been using Drupal and recently Magento. If you were to go the CMS route I would highly recommend Drupal and depending on the completion date Drupal 8 which is by far one of the best architected and powerful CMS’s in existence. So if it were my project it would be Drupal hands down – already have an admin and gigantic ecosystem of knowledge and contributed code. Performance is an iffy area with Drupal but there a mountain of things that can be done to improve it like caching and what not. Which typical with any larger system that needs to scale you’re going to need a sophisticated caching layer anyway. The biggest bottleneck when it comes to the application side code is trips to the database and unoptimized queries. A sophisticated caching layer can alleviate much of that. Though if you’re on a shared host some of those options might not be available to you like memcache. I know there are several Drupal specific hosting vendors that provide optimized servers for hosting Drupal sites though. Putting all that aside I guess I just don’t really see the point in investing thousands of hours developing something that won’t ever be as well architected as something with thousands of community members backing it. So that is why I would use a platform like Drupal rather than start from nearly the ground-up with a framework instead. Oh… did I mention Drupal 8 uses several Symfony components like Laravel does – see a pattern. Drupal 8 is also completely mobile friendly – admin and front-end. It is hard to beat something like that unless you have a year to develop something… which most of us don’t. So besides for the fact I’m very familiar with Drupal those are the reasons I would use it and some info on what can be done to improve performance. I should also add that if this is more an ecommerce deal than I would recommend looking into commerce kickstart distribution of Drupal. I’ve heard great things about it from an ecommerce perspective. Drupal commerce is essentially a collection of modules and integration code to have out of the box Drupal function more like a store with payment options, products, etc without having to build that out all your self.

Of course I know, although I dont quite understand why Laravel is much faster than Symfony.

I agree with oddz. Although I fully acknowledge that symfony2 typically is near last on benchmarks, even that “slow” speed is still fast enough. 39.22 req/sec translates to about 25 ms/req. plenty fast enough. In fact, I recall a case study not too long ago about serving a billion requests per week using symfony2 and getting 30ms response times. http://labs.octivi.com/handling-1-billion-requests-a-week-with-symfony2/

Of course I know, although I don’t quite understand why Laravel is much faster than Symfony.

I would be willing to bet each would perform similar if the same exact typical middle to enterprise level application was built on them. I would go as far and say that for any framework in PHP code. So excluding Phalcon I don’t really buy one framework is going to be faster then another when all is said and done given a typical, real-world project – not some stupid simple “Hello World” page or whatever impractical method of testing is used for numbers from people claiming one framework is faster than another. Again performance is going to degrade similarly on any of these when it comes to actually doing useful things like querying the database. I just don’t really buy it and think it is more marketing mumbo jumbo than anything considering any sophisticated platform is going to have well thought out hardware architecture behind it and especially multiple levels of caching. At which point the differences become very minute to nil depending on the hardware and several other factors. The ballgame completely changes with different technologies. That is probably where you are going to see the most drastic changes in performance depending but again that depends on how well the entire service/product ecosystem is architected from hardware to software.

Also an interesting read. http://symfony.com/blog/is-symfony-too-slow-for-real-world-usage

Some highlights.

For each choice, we carefully weighed the benefits in functionality and ease of development, and the penalty in performance. Symfony embarks a lot of features activated by default (when you compare it to other frameworks) because we think that the cost of development is more important than the cost of hosting. It is very easy to add a new server to boost the performance of a website, it is very hard to add a new developer to an existing project to make it complete faster.

It doesn’t make much more sense to compare frameworks that don’t propose the same number of features. The next time you see symfony compared with another framework on a “hello, world”, try to check if the other framework has i18n, output escaping, Ajax helpers, validation, and ORM turned on. It will probably not be the case, so it’s like comparing pears and apples.

It doesn’t make much more sense to compare frameworks that don’t propose the same number of features. The next time you see symfony compared with another framework on a “hello, world”, try to check if the other framework has i18n, output escaping, Ajax helpers, validation, and ORM turned on. It will probably not be the case, so it’s like comparing pears and apples.

To that point comparing a framework to a CMS is even more drastic.