Laravel

A few days back I wrote about Python-based web application framework called Django. Let’s talk about another framework for web app development framework which is built in PHP. It is called as Laravel and has become popular in PHP community for various reasons.

What is Laravel?

Laravel is a PHP based framework which is build using Symphony2 components. Being a framework it provides services and libraries to handle web requests, database etc. This implements MVC architecture (Model-View-Controller) and has 3 different components meant for MVC.

Eloquent provides Object Relational Mapping (ORM) component, which interacts with an underlying database such as MySQL, PostgreSQL or MSSQL.

Blade is a component that provides the view in this framework. It is the templating engine that Laravel uses, supports inheritance and support extensible control structures

Controllers provide a way to group request handling logic and is used in conjunction with Routes to handle the HTTP requests.

Laravel - MVC
Laravel – MVC architecture

Why is Laravel becoming popular?

  • Routing system
  • Intuitive Templating Engine – Blade
  • Open source
  • Built-in support for authentication
  • Uses Inversion of Control (IoC) design pattern to remove dependencies on third-party components, yet maintaining the functionality and flexibility for the developers
  • Built-in support for unit testing.
  • Built-in command line tool – Artisan
  • Security
  • Support database migration to facilitate incremental development.
  • Interface to various Queues such as Amazon SQS, IronMQ, Redis Queues
  • Abstraction layer for filesystem – supports Amazon S3, FTP/SFTP, Local or Dropbox!

Laravel has shown consistent releases at regular intervals. It has great community support and hence has gained a lot of traction and attention from PHP community in last 2-3 years. You can see complete timeline on Wikipedia page

Related Links

Related Keywords

Web app Framework, PHP, MVC, Software Architecture, CodeIgnitor, Symfony, Yii

Django

Django is a web app framework built using Python language. It is free and open-source (BSD license) framework used by many leading and well-known websites.

Django
Django Developer at work

What are the features of Django?

It uses Model-View-Controller architecture. The framework consists of:

  • Object-relational-mapper (ORM) which connects the data model with backend database (Model).
  • Web templating system to process HTTP requests (View)
  • URL dispatcher (Controller)

Being a framework, it also includes several components to ease the creation of complex web apps such as authentication module, web server, form component, cache module, support for XML and JSON representations and many more. As an addon, the distribution also contains tools to generate RSS/Atom feeds, Google Sitemaps, built-in mitigation for several vulnerabilities and also administrative interface.

Django framework implicitly enforces a certain way of developing your application, which might be construed as a limitation. However, this in itself maintains the sanctity of the code that is getting developed and keeps the code readable/maintainable even for your teammates.

Which websites are using Django framework?

The list is impressive. Disqus, Bitbucket, Instagram, Mozilla Firefox. Even Pinterest was built using Django, which later was migrated to Flask, another web app framework.

Alternatives for Django:

  • Flask
  • Falcon
  • Ruby On Rails
  • Laravel
  • Spring MVC
  • ASP .NET MVC

Why would you choose Django?

This framework is written in Python, which is easy to learn and also is one of the most popular languages. Built-in components and supporting modules make the development of the web app very fast. The add-ons provide the modules required for security. However, one of the important features of Django is template inheritance! You can define a base template and extend it for your further use.

Trivia

  • It is pronounced as Jango (D is silent with emphasis on J)
  • It was created in 2003 by two developers working at a newspaper.
  • It was made open source and Django Software Foundation was formed to maintain the software.
  • Framework as has been named after a guitarist  Django Reinhardt.

Related Links

Related Keywords

Web App Frameworks, Python, MVC, Software Architecture, Flask, Falcon

Bootstrap

One of the meanings of word “Bootstrap” means starting up with minimal resources. In technology, term “Bootstrap” refers to a front-end web framework, which needs minimal work to get your website ready. It provides basic structure in the form of HTML and CSS based design templates, forms, buttons, and other web components. With the use of provided libraries, one can set up her website pretty quickly.

Bootstrap - Build responsive websites quickly
Bootstrap – Build responsive websites quickly

What does Bootstrap provide?

Default configuration provides a grid system made of 12 columns. A developer can choose how does she want to arrange the data amongst these 12 columns. She can choose to have only 2 column structure each column spanning 6 cells or she can also choose to have the first column as 4 cells and second as 8 cells. Each row could have a different structure as per the need of the design.

Bootstrap provides easy-to-use classes to support grid structure mentioned above. It also provides easy-to-use classes for standard HTML components such as buttons, lists, tables etc. Standard look-n-feel for messages (alert, error, warning, notice etc) is also added to the framework.

Additionally, it also provides jQuery which is used by the framework for standard validations, event handling, and other several things.

What are the advantages of Bootstrap?

Following are few of the several advantages of using Bootstrap framework for your website:

  • Responsive – websites built using this framework can adapt to the device size and can easily rearrange the components (hide, resize) as per the form factor of the device. In fact, the latest version of Bootstrap has been built with “mobile-first” philosophy. It helps a lot in the design of modern web and mobile-web applications.
  • Faster Speed Of Development – Given the availability of ready-made classes and components, one can quickly develop the website using this framework.
  • Customizability – You can also customize certain sections of the website by overriding the CSS classes.
  • Community Support – This is one of the frameworks which has huge community support – active GitHub project, several forks and several contributors. This is in addition to thousands of articles explaining how to use this framework.

The only disadvantage I came across about Bootstrap was – all the websites that use only basic Bootstrap, look alike! But this is something easy to overcome by customizing the website to a certain extent.

Any alternatives to Bootstrap?

Ample of them. Foundation, Skeleton, Pure.CSS, HTML5 Boilerplate and many more.

Related Links

Related Words

Web Framework, Responsive Web Design, Javascript, CSS, jQuery,