5

Actually, I am working on a project with Laravel5 (laravel.com)

someone who is working on another project with SailsJS (sailsjs.org) asked me why I am still using PHP. I should work with nodejs (sails), because PHP would be a language would be going to die.

Well, what's better to use for the future.

  • Both are MVC frameworks
  • on both you can code views with Jade (see jade-lang.org)
  • on both you can use any database.
  • on both you can easily install modules (composer / npm for the backend), bower for the frontend

What's better - and an important aspect - which framework creates responds faster?

4
  • 1
    This is a very subjective thing. My general feeling is - each of those languages is good for different things. nodejs is the hot thing today so people say things like that. PHP is very popular language, so it's probably not going to die (especially with PHP7 coming up). I personally don't thing javascript is a very good language for more complex calculations and operations... but, to each their own. Commented Oct 25, 2015 at 5:21
  • Two addional questions: 1) Does sailsjs have a shell like tinker, where you can play with your code or test your classes? (see youtube.com/watch?v=-IYhS7QRNjI). 2) Will PHP7 support persistent classes and data? Actually, on PHP5.6, all code and data and session data needs to be loaded from the file system and database, for each request Commented Oct 25, 2015 at 6:12
  • one more question :) Does sailsjs have a debugbar comparable with laravel-debugbar? See github.com/barryvdh/laravel-debugbar and laravel-news.com/2015/02/laravel-debugbar or youtube.com/watch?v=wGPosbMmkxw&t=3m55s Commented Oct 25, 2015 at 6:34
  • A helpful link for comparings: vschart.de/vergleich/laravel-5-1/vs/sails-js (the data maybe have to be updated/translated) Commented Oct 25, 2015 at 6:48

2 Answers 2

7

As a technical guy, i would suggest you to use sails over laravel. Its not because PHP is going to die(and it will not happen).

As far as i know, anything built on javascript would be faster.

There are lot of advantages in sails like sockets are very easy to implement so on.

When it comes to disadvantage, its only with DOCUMENTATION. For a beginner, it would become little difficult to grasp all the things.

From PHP (Synchronous) to sails(Assynchronous), it will take some time to get familiar with sails.

Make sure you understand the basics of node.js very well before you start with sails.

For more references, see this , this and this

Sign up to request clarification or add additional context in comments.

2 Comments

Hi thanks for the detailed explaination. What are your views on this kev.inburke.com/kevin/dont-use-sails-or-waterline ?
Dnt say PHP gonna die. 70% of the site you are using in day to day life was build on PHP.
5

PHP is never going to die, Choosing a technology stack all depends on application & available resource, If you have expertise in php then you will obviously take longer time building app in nodejs/sails.

I have worked on both frameworks (sailsjs & larave 5.2) and for my new project i will go with laravel because:

  • Laravel is pretty mature framework (was founded in 2011 and has 9K contributors)
  • It got builtin support for most of things like migraters, seeders, queuing system and templates.
  • Documentation is very good.
  • lots of 3rd party integration, you can integrate it with s3-buckets, dropbox any email service provider and backup services in few minutes. complete list of integrations

Disadvantage of laravel:

  • Socket support is poor, but you can do socket part in nodejs, and can bridge that using REST APIS.
  • Mongodb support is not good.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.