Using Frameworks to Build Websites and Web Applications

Even if you only build websites using CMSs, you’ve probably heard the word “framework” before. You’ve probably also heard of a few famous web frameworks, including Ruby on Rails, Django and Bootstrap. Many experienced web developers build websites using frameworks and often find them easier and enjoyable to use.

In this article, we’re going to explain what a framework is, and when you might use a framework.

If you are currently doing one of the  Coding Training classes, this information will prove especially useful to you. If you are just using a CMS, this post will still contain some valuable insights, as many CMS systems can and are built using frameworks. For example, Drupal 8 is currently being built on Symfony and Joomla 3 is using the CSS framework Bootstrap.

What is Framework?

The goal of a framework is to allow designers and developers to focus on building the unique features for their project, rather than re-inventing the wheel by coding common, familiar features found across many websites and web applications.

A framework can be considered a pre-built that handles most of the repetitive or common features. As a result, unlike a CMS, a framework will probably not have a template/structure user interface (although this is not always the case, as Django provides an administration interface). Most of the activity will be done by writing code and interacting with different parts of the framework itself through code.

Often frameworks take a while to learn, but once you’re familiar with them, they should speed up your development time.

5 advantages to using a framework:

  1. Open-source: Most of the popular frameworks in many languages are open-source (or available to use for free). They also come with licensing that isn’t restrictive and allows you to build commercial products using such frameworks
  2. Documentation and support: Although this can vary (if the language being used is popular and the framework has a lot of developers using it), you can expect that the framework will either have good documentation, good support or both at the same time. It is worth mentioning that “good support” is a subjective issue at times. Typically, paid support will almost always be faster and more concise, but this also depends on the level of activity within the framework – as a framework like Ruby on Rails demonstrates with a massive community, which is renowned for its welcoming nature and good support too.
  3. Efficiency: This could be considered the most vital reason why frameworks exist. They eliminate the need to write a lot of repetitive code that you will find being used in many different applications. These include, for example, user-authentication and commenting systems. On average (if you have sufficient knowledge using a certain framework) you can expect to build a project in much less time than would be achieved writing code without a framework
  4. Security: Typically, a framework is developed and tested by many different developers. It is extremely likely that many security risks are addressed and tested when the framework is being built. New security risks can also be addressed and fixed quickly. However, security can also be considered a con, as will be mentioned in that section
  5. Integration: If you are building almost any type of application (including a website) and you want to store some data, you will typically use a database. Just like a database, there also exists many other tools that link to web development. Many frameworks will thus make it easier to link to these tools and also communicate with them (for example, when “talking to” a database is abstracted away in a certain framework, making communication with the database much easier)

5 disadvantages to using a framework:

  1. Limitations: Generally, you will not be able to do almost anything with a single framework. They are all restricted in some way, from coding paradigms to database designs and everything in between. A good way to work around this is to see what the framework is being used for by other developers in the community, as this will give you an idea of what you can achieve
  2. Performance: With the popularity of client-side JavaScript MVC frameworks like AngularJS, EmberJS and BackboneJS growing since 2012, performance can also be considered a factor. Although performance issues did exist before, they weren’t as relevant as today, where an entire application is loaded through JavaScript, using a framework as the tool for building that application. Whereas you might not feel the impact of loading a 75kb compressed-framework .js file on your PC (with high speeds), this .js file will definitely impact mobile users (who may have slower speeds on their smartphones or tablets)
  3. Learning bias: If you decide to learn how to use any framework from some programming language you are familiar with, chances are that what you learn will be somewhat different to the language itself. This is due to the fact that a lot of those repetitive tasks have been created in custom functions and other parts, which is why you will learn such things that may not have existed in the language lessons itself. Apart from that, you may also learn a lot of things that may be irrelevant to you whilst using the framework in real-life, but are necessary to grasp how the framework works
  4. Steep learning curve: Although this isn’t always the case, most frameworks can be difficult to learn and even more difficult to master. After some simple research into this matter, a university professor said that it will take about 2 years (with no programming background) to become familiar and comfortable using a language (Ruby) combined with a framework (Rails). This may not be the case when being self-taught or having years of programming experience, but I would say that even with experience, at least 3-6 months will be needed to become confident using any framework (based on continuous learning and practice)
  5. Cost: Frameworks require more development expertise and experience than most CMSs. As a result, it can be more costly to hire reliable framework developers than reliable CMS developers. As the experience shows, the average project built with a framework is more expensive than a similar project built with a CMS.

Examples of popular frameworks

Below are some popular web frameworks (in no particular order) for different web languages. This is not an extensive list, as there exists many more options out there.

PHP: 1.Yii; 2.CodeIgniter; 3.CakePHP; 4.Zend; 5.Symfony; 6. Laravel

Ruby: 1.Rails; 2.Sinatra; 3.Padrino;

Python: 1.Django; 2.Web2py; 3.TurboGears; 4.Flask

JavaScript: 1.AngularJS; 2.EmberJS; 3.BackboneJS;4.KnockoutJS

Design/CSS frameworks: 1.Bootstrap; 2.Foundation

Over to you?

Have you built any websites using a framework instead of a CMS?

What were the advantages and disadvantages of going with a framework?

Share your feedback or any other experiences below.

Polina Mikhan

Business Development Manager

%d bloggers like this: