There are many popular frameworks for online Web application development at the moment. There are also many different types of frameworks, such as those with a large number of plug-ins that can make you faster iterations (such as Rails), or other very simple and low-level (like flask).
Two relatively more popular frameworks in Web application development are Ruby on Rails and Laravel. All two of them are very mature projects that have been available for quite some time. Ruby on Rails was introduced in December 2005, while Laravel was February 2012.
As shown in the first release of the time, laravel younger, but rails does not look too old, because the community has been innovative, continuous through the introduction of newer, more intelligent and better tools to iterate the project. The same laravel grow very fast.
Developers care about a very small, and very simple indicator, is the number of stars on the GitHub project. Ruby on Rails has accumulated 22,000 in more than 8 years, and Laravel has been around 11,000 in two years ' time. However, since PHP is a more common language than Ruby on Rails, this is a good result.
We'll take a quick look at the various components that are important when designing and developing Web applications, as well as the frameworks that are not recommended or recommended for use in these components. The criteria we make for our choices are based on our own focus as a developer. In this article, we discuss how easy it is to get started with Ruby on Rails and Laravel.
Entry
One of the criteria we choose is how easy it is to get started with a framework. In this case, it's basically a look at how quickly you can start writing your Web application code.
Rails
with Rails, you have to install Ruby on the machine, and all you have to do is run the following command:
With this simple command, it will get all the dependencies on the Ruby on Rails and install it on your machine. As most OS X has been pre-installed with Ruby, Linux is already a ruby command installed on your machine, making it easier to install.
If you want to have an Ubuntu 14.04 LTS service on our cloud service with Ruby on Rails, all you have to do is open a new server, log in, install Ruby, and then install rails. That's easy.
$ nova Boot--flavor nb.2g--image "Ubuntu 14.04 LTS"--key-name MacBook rails-dev
$ nova ssh rails-dev
Welcome to Ubuntu 14.04 LTS (gnu/linux 3.13.0-29-generic x86_64)
* documentation:https://help.ubuntu.com/
root@rails-dev:~# apt-get update
root@rails-dev:~# apt-get install-y Ruby Ruby-dev make
root@rails-dev:~# gem Install--no-ri--no-rdoc Rails
That's all you need to do to install rails. Once it's installed, you just need to create a new application and start playing with it. This is probably the easiest part of the operation.
To start the built-in Ruby on Rails server, you can open a built-in server by switching to the project path and using the command line.
Now you are ready to process the service request and write your Web application code. This process, including Ruby installation, is no more than 5 minutes. How you've installed everything, it's likely to start in a minute.
Laravel
PHP is probably the easiest language for Web developers to understand. One big reason is that PHP can be used as a service-processing language on the server side. However, limited to the scope of this article, we assume that users can run it on their machines or on a server. And it has a strong introductory advantage that it can be used on most typical hosting platforms.
PHP is installed on OS X by default, and it can easily be installed on any machine, and Laravel has an extremely simple and easy-to-use installer.
If you want to get a laravel Ubuntu 14.04 LTS Environment in our cloud service, you just need to create a server, install PHP on it, and simply run the command below.
$ nova Boot--flavor nb.1g--image "Ubuntu 14.04 LTS"--key-name MacBook laravel-dev
$ nova ssh laravel-dev
welcom E to Ubuntu 14.04 LTS (gnu/linux 3.13.0-29-generic x86_64)
* documentation:https://help.ubuntu.com/
root@laravel-dev:~# apt-get install-y php5-cli php5-curl
php5-mcrypt root@laravel-dev:~# php5enmod mcrypt root@laravel-dev:~# wget-o/usr/local/bin/laravel http://laravel.com/laravel.phar
root@laravel-dev:~# chmod +x/ Usr/local/bin/laravel
This is what the installation Laravel needs to do. The next step is to create an application that is as simple as installing rails.
If you want to use the built-in PHP development server, all you have to do is run the following command under your application path:
That's it. Now you can go to the URL provided and start writing your application. The entire process takes approximately five minutes to install, and a new project can be started in a minute.
Summarize
Open up to two applications are extremely easy to get started, from scratch only need 5 minutes of setup, if you have already installed, then spend less time. This means spending less time on getting a development environment and taking more time to solve real-world problems.