Skip to content

Introduction

Angular is an open source MVC/MVVM framework for JavaScript for building web applications (mainly SPA, or Single Page Apps). It was presented in 2016 by Google engineers. It is also one of the most popular JavaScript frameworks in the world.

In this resource, you will be guided step by step through the most important aspects of Angular, building a simple student management application with CRUD functionality. You can see the source code [here] (code/8-zapis-danych.zip). First, however, let's get acquainted with the definition of the framework itself and answer the question what it actually is.

What is framework?

The framework can be defined as a tool that enables software and systems development.

The framework is an abstract that provides general functionality and can be altered by additional user-written code, thus providing code specific to the application being built.

The framework in short is something that abstracts some low-level concepts of computer science, so you can focus on details at a high level. The great thing about computer science (and mathematics, of course) is that once you solve a problem, you don't have to solve it again. This means that every time you start a development project you don't need to write code to communicate with your database, for example - you can let the framework do the work for you.

The difference between a library and a framework

A library is a collection of reusable code that you can include in your program and use it as needed. The flow of an application is defined by the developer to invoke code when necessary. This allows you to quickly access useful library functions.

Framework reverses control of the application. This framework tells the developer what he needs and where. The library doesn't do this, and this makes a big difference between the library and the framework. The framework indicates where to add your own code for execution.

Why do I need a framework?

Software development is a complex process that requires many tasks. Using the framework allows you to focus on functionality at a high level. This is because every low-level functionality is handled by the framework.

Instead of repeating the same task over and over again for the same type of application, you use a framework that has all these amenities in one nice package, thus providing an abstraction for your application and, more importantly, multiple applications.

Here are some of the many benefits of using frameworks:

  • Faster software development.
  • Use of design patterns.
  • More secure code.
  • Helps you avoid code duplication.
  • Has partially ready functionality.

Why Angular?

Although Angular is a fairly large and complex framework with its own design philosophy, which can be a challenge for novices to understand its assumptions, it is worth getting to know. Here are a few features that make it worth getting interested in:

  • High popularity and therefore large community.
  • CLI (Command Line Interface) and great documentation.
  • It is not only a tool, but also a design pattern that allows you to build a project that is easy to maintain.
  • Designed for both mobile devices and desktop computers.
  • Written with TypeScript which is closer to Java/C#.
  • Modular and organized structure.

Note: Sometimes using Angular for a simple application can be overkill. If you have a small project with no complicated user interfaces or interactions, sticking to JavaScript alone may be a much better idea.