Technologies | June 13, 2018

Why Would a Back-End Programmer Love Angular?

Angular is a framework which has been on the IT market for some time now. New versions have continued to appear, as it is commonly used in projects. But programmers new to Angular mostly think of it only as a Front-End framework, which is not quite the case in reality.

Why Would a Back-End Programmer Love Angular?

I still remember when I started working on my first Angular project, which also included Web Api 2.0 for .NET framework. At the very beginning, of course as a strictly .NET programmer, I was skeptical about it, but I changed my mind really quickly. Below you will find out why.

At the end of this post you will find a simple example of an application built using Angular framework.

What is Angular?

In short, Angular is the framework which allows you to create scalable and very efficient web applications. Angular is based on JavaScript and HTML.

How is Angular built?

And here’s where we get closer to answering the question which is the title of this article. Version 1.0 of Angular, also known as AngularJS (created for Single Page Applications but also multipage applications), is very similar to MVC (Model-View-Controller). MVC supports best practices in architecture and writing clean business code and is well-known throughout the IT industry as the ancestor of the architectonic patterns.

Similarly to MVC, the architectonic version of Angular which I mentioned above consists of controllers, models and views. Of course, just as with MVC, we can build web applications in a more complex way, which is also advisable, for example by delegation app logic to the routes, managers and other files – but this is not necessary for understanding similarities to the MVC pattern, which is the aim of this post, after all.


The JavaScript controller in Angular, developed within the module, which corresponds to MVC’s controller. The module includes controllers, services and other app files, and is not often declared within the package of functionalities. Personally, when I had to create a functionalities package concerning one domain model, let’s say a package of functionalities concerning displaying data, editing it, a couple of views and communication with APIs, then I would have declared one module.

Better and easier management of the abovementioned modules can be achieved with so-called bundling, which is a mechanism available in JavaScript for managing modules, packages, resources and import/export.


In AngularJS MVC models have their equivalents, which are also responsible for delivering application logic. In some cases I would say that if Angular is applied for multipage applications purposes, the role of an equivalent of the MVC’s model is played by services, so-called recipes, but for some programmers it can be controversial. Recipes have various types and classes, but in my entire career I’ve never used any of them directly, like so-called value recipes or factory recipes. Instead I use more common service recipes, which can replace the two previously mentioned recipes; most importantly they follow the Constructor Injection design pattern, instead of Singleton. (I hope to write a blog post or series of posts concerning design patterns).


Similarly to the MVC pattern or any other pattern concerning web applications, we use views responsible for delivering the user interface within our application. In the case of MVC, we mostly use model-type views, which leads to the use of the Razor engine. For those who have not worked with it, the Razor engine, which can be found in ASP.NET MVC from version 3.0, allows users to introduce native objects of a particular language, its syntax and particular model objects into HTML syntax. In the case of Angular, views are mostly created with pure HTML syntax, and the equivalent of the Razor engine’s logic are directives in Angular. Directives are a kind of instructions and procedures – they are “injected” directly into HTML elements.

The most important directives used in Angular are ng-model (passing objects and its values) and ng-repeat (possibility of iterating objects within arrays or lists). One could build plenty of user interfaces using only these two directives.

Below I have given an example of an application based on Angular (not using the service). You can import the code snippets below into particular code templates available within Web template options in Visual Studio. In the 2017 version, the following may be found:

  • For Module -> AngularJs Module
  • For controller -> AngularJs Controller or AngularJs Controller using $scope
  • For View -> standard HTML Page file template


angular.module(‘angularModule’, []);


angular.module(‘angularModule’).controller(“angularController”, function ($scope) {

   $scope.angularTestObject = “test”;


<!DOCTYPE html>



   <div ng-app=”angularModule” ng-controller=”angularController”>

       <p>angularTestObject’s value equals:</p>{{ angularTestObject }}




.NET Developer, he has been working in the profession for 2 years. His areas of specialization are .NET, Web Services and both Back-End and Front-End solutions for web applications. Offstage he is passionate about British English language, books and travelling. Author of the blog:

Exclusive Content Awaits!

Dive deep into our special resources and insights. Subscribe to our newsletter now and stay ahead of the curve.

Information on the processing of personal data

Exclusive Content Awaits!

Dive deep into our special resources and insights. Subscribe to our newsletter now and stay ahead of the curve.

Information on the processing of personal data

Subscribe to our newsletter to unlock this file

Dive deep into our special resources and insights. Subscribe now and stay ahead of the curve – Exclusive Content Awaits

Information on the processing of personal data

Almost There!

We’ve sent a verification email to your address. Please click on the confirmation link inside to enjoy our latest updates.

If there is no message in your inbox within 5 minutes then also check your *spam* folder.

Already Part of the Crew!

Looks like you’re already subscribed to our newsletter. Stay tuned for the latest updates!

Oops, Something Went Wrong!

We encountered an unexpected error while processing your request. Please try again later or contact our support team for assistance.

    Get notified about new articles

    Be a part of something more than just newsletter

    I hereby agree that Inetum Polska Sp. z o.o. shall process my personal data (hereinafter ‘personal data’), such as: my full name, e-mail address, telephone number and Skype ID/name for commercial purposes.

    I hereby agree that Inetum Polska Sp. z o.o. shall process my personal data (hereinafter ‘personal data’), such as: my full name, e-mail address and telephone number for marketing purposes.

    Read more

    Just one click away!

    We've sent you an email containing a confirmation link. Please open your inbox and finalize your subscription there to receive your e-book copy.

    Note: If you don't see that email in your inbox shortly, check your spam folder.