Azure API Service Architecture

The Azure App Service platform brings the best of what the Azure Cloud has to offer into one cohesive and flexible architecture. Azure App Service makes it easy to build enterprise systems leveraging both your own and third-party APIs.

Azure App Service brings together Web Applications, Mobile Applications, and powerful new Logic Apps, all of which communicate with Azure API Apps. There are many options to build these systems, to consume RESTful Web APIs and to automate client code generation which can significantly reduce the amount of manually written code. 

The new App Service supports the following application categories:

  • Web Apps – Azure Websites service is rechristened as Web Apps. This service provides a polyglot environment to host websites developed in .NET, Java, PHP, Node.js and Python. Web Apps gallery offers developers a one-click capability to install packages like WordPress, Joomla and Drupal. Web Apps can be configured for auto-scaling to dynamically scale-up or scale-out. Developers can configure continuous integration and deployment workflows with VSO, GitHub, TeamCity, Hudson or BitBucket. The service makes it easy to perform A/B testing to verify new code by selectively routing a fraction of live traffic.
  • Mobile Apps – Azure Mobile Services feature has become Mobile Apps within App Service. Mobile developers can take advantage of App Service to build native iOS, Android, and Windows apps or cross-platform Xamarin or Cordova (Phonegap) apps. The service supports hybrid capability to connect mobile applications with enterprise on-premises data. With the new SaaS API connectors, mobile developers can easily integrate their apps with popular 3rd party services such as Twitter, Salesforce and Twilio. Offline Sync and Push notifications are other key features of this service.
  • Logic Apps – Logic Apps allow developers to design workflows based on a series of steps that are triggered by an event. Developers can stitch multiple APIs and services as a part of the workflow without writing complex code. Existing templates provide a good starting point for developers to quickly design workflows. The connector marketplace acts as an exchange to publish and consume custom API Apps that can be used in Logic Apps. BizTalk Services are tightly integrated with Logic Apps to provide advanced integration scenarios.
  • API Apps – API Apps make it easy to develop, publish, manage, and monetize APIs. Developers can publish APIs written in ASP.NET, Java, PHP, Node.js or Python. Through simple access control, authentication can be built into APIs. Developers can share APIs with other teams within an organization, by using their own private organizational gallery of APIs or they can also be shared publicly for consumption by third party developers. Azure App Service can automatically build SDKs for a variety of languages including C#, Java, and Javascript, making APIs available to many platforms.

This consolidation turns Azure PaaS into a rich application platform. According to Microsoft, App Service delivers a fully managed and secure infrastructure for developers to build cloud-first and mobile-first applications.

AngularJS vs Vue.js vs Reacttjs

Let us first declare that Angular is a mammoth and Vue.js is the tiger hungry enough to become big soon. 

Vue.js is less opinionated solution than Angular. That allows you to structure your app the way you want it to be, instead of being forced to do everything the Angular way. It’s only an interface layer so you can use it as a light feature in pages instead of a full blown SPA. There are many tools in Angularjs and so many complex syntax that it can confuse you sometimes. 

React and Vue.js has some similar features . They both:

1) Utilize a virtual DOM
2) Provide reactive & composable view components.
3) Keep focus in the core library, with concerns like routing and global state management handled by companion libraries.

OData Pros and Cons

OData is the Open Data Protocol. It is an open web protocol started by Microsoft to expose data using existing web technologies. This is based on Representational State Transfer (REST) full architecture. HTTP, AtomPub (similar to RSS, but specifically introduced special XML format for OData), JSON are all supported.
Here, the URL is the primary operator on the data query.

WCF OData Service

In Visual Studio 2013, there is a template to create a WCF OData service. So, we can easily create an OData Service using Visual Studio 2010.

Example of OData Service has been used

  1. Last (2010) football world cup (S.A), the scoring website was done using an OData Service.

Why should we use an OData Service? 

  1. OData is based on the REST architecture, so we can retrieve data based on an URL.
  2. It also supports HTTP, Atom Pub as well as JSON format.
  3. It has support for any type of data source. Even you can use a custom class as a data source.
  4. No need to create a proxy service object. So, it is lightweight to use.
  5. You can create your own custom methods and expose it.
  6. Since it is lightweight, the interaction between server and client is fast. Thus, performance is good.
  7. It offers full CRUD support by using the different HTTP methods:
    • GET: Gets one or many entries.
    • POST: Create a new entry.
    • PUT: Update an existing entry.
    • DELETE: Remove an entry.
  1. A WCF Data service can expose an entity model via an URI.
  2. A WCF Data service could be consumed by any type of client like Windows, SilverLight, Web, AJAX and console.

Limitations

  1. Since it is purely URL based, it is less secure.
  2. Not every query operator in LINQ is available in OData like Filter, Skip, Take etc.

Working of a WCF Data Service

There are five components.

  1. DataBase.
  2. Data Access layer using ADO.Net Entity model or LINQ.
  3. Entity Model Implementing Iqueryable and Iupdatable Interface.
  4. WCF Data Service exposing CRUD Operations on entity model as REST Service.
  5. Consuming it on various types of clients.

Supported Message Format

  1. JSON
  2. XML (ATOM)

React or AngularJS?

WHEN SHOULD YOU — — USE REACT?

React shines when you have lots of dynamic content changing within the view. Most client-side solutions on the web today struggle with rendering large lists of items within a single view. This “struggle” may be on the order of milliseconds, but in this increasingly digital world, a half a second delay is all it takes to kill your user experience. It’s why sites that have a lot of dynamic, constantly changing, data-intensive content like Instagram or Facebook choose to power their applications with React.

As a library, you can also use React as the view component of AngularJS or other frameworks, because it does not tie you to a specific technology stack. That said, there’s a quickly growing community and a number of existing libraries and add-ons that can help you build an app from scratch. 

WHEN SHOULD YOU — — USE ANGULARJS?

Development time is at a premium, and you need a full, comprehensive framework that will get you running quickly out of the box. As we mentioned earlier, comparing a library to a framework isn’t really a valid question, as you can always use one with the other.

The real question to ask is when shouldn’t you use React? React is not backwards compatible with browsers older than IE8. Also, the community is young, so it’s possible you’ll have to do a lot of “reinventing of the wheel” in order to get the specific features you’re looking for. It’s also up for debate whether or not installing React is worth the trouble if your project is either a simple webpage or if AngularJS is already more than capable of rendering your view.

With the recent releases of Angular, Angular devotees have another reason to stick with their framework of choice. Angular shipped with a huge performance boost, including support for server-side rendering and a similar approach to using one-way data binding to only manipulate the parts of the DOM that need to be changed. However, Angular also involved a major rewrite of the framework, so whether you choose to install React or upgrade to the next generation of Angular, there’s still going to be a learning curve to overcome.

Copyright © All Rights Reserved - C# Learners