Search This Blog

Q21-Q25

Q21. Difference between Azure Functions and Azure Logical apps?
Q22. What is WebApp, API App and Mobile App in Azure? are they different from App services?
Q23. 
Q24. Difference between Azure Functions and Azure app service WebJobs as both are code first approach?
Q25. How you call azure functions from your angular code?
=======================================================================
Q21. Difference between Azure Functions and Azure Logical apps?

Answer:
Both are PAAS.

Azure Functions:
1. Azure functions are serverless compute service design to run small piece of code. It's ideal for building microservices, APIs. They are good in event handling tasks. 
2. Azure functions are code first approach. 
3. Azure functions can run in various environments like self-managed servers, locally, azure, containers. 
4. Automatically scales based on demand.
5. Ideal for real time processing, background tasks and lightweights APIs. 
6. You have two options qua pricing. You can opt for a fixed cost of an App Service Plan. In that option you reserve compute power on which you can run Azure Functions, but also Web, Mobile and API Apps. The second option is completely serverless, with a consumption plan based on resource consumption (memory/s) and number of executions


Azure Logical Apps:
1. Azure LA are workflow automation service helps to integrate different apps, data, systems and services.  It is designed to do orchestrating difficult workflows with minimal code. 
2. L Apps are design first approach. u can do in Visual studio with designer plugin. 
3. L Apps can be run only in Azure. 
4. Autoscales 
5. Best for business process automation, integrating disparate systems, and orchestrating complex workflows.

=======================================================================
Q22. What is WebApp, API App and Mobile App in Azure? Are they different from App Services?

Answer:

App Services now replaces all Mobile, Api and Web Apps flavors as a single app framework with all the functionality rolled over to make things more accessible across application types. Currently all of Web, Mobile and Api Apps are collectively called App Services under Azure App Service Plan. We still offer customer to be able to create a Mobile App and a Web App in the gallery but that is basically resolve into an App Service App.

Microsoft Azure App Services are a platform as a service (PaaS) offering

various App services available
  1. Web App - ideal for web applications, CMS, e commerce websites. 
  2. API App - Ideal for hosting APIs that can be consumed by Web Apps.
  3. Mobile App - Ideal for work like Authentication, data sync and push notifications.
  4. Logic App - Workflows.
  5. Functions - Code first.
  6. Web jobs - backend Jobs hosted within same server where WebApp is hosted. It can be found with in settings section of newly created WebApp. 
=======================================================================
Q23. 

Answer:

=======================================================================
Q24. Difference between Azure Functions and Azure app service webjobs as both are code first approach?

Answer:
Both are built on Azure app service.
Both supports Code first approach. 
Both can integrate with application insight. 
Both Supports multiple languages like C#, JavaScript, Python, Java

Azure Functions
  • Two plans 1) Consumption plan/ Pay-per-use plan and 2) App Service plan
  • In-browser development is supported. 
  • Integration with Logical Apps

Azure app service WebJobs
  • Can be paid only as a part of App service plan. 
  • In-browser development is Not supported. 
  • No Integration with Logical Apps

=======================================================================
Q25. How you call azure functions from your angular code?

Answer:
It would be Http trigger function and from angular service layer you have to make simple httppost request where functionURI is the URI to the azure function.
this.http.post(functionURI, input, { headers: headers } ).subscribe(data => { console.log(data); });
Here is my simple HTTP trigger function using Javascript:

module.exports = function (context, req) {
    context.log('JavaScript HTTP trigger function processed a request.');

    if (req.query.name || (req.body && req.body.name)) {
        context.res = {
            // status: 200, /* Defaults to 200 */
            body: "Hello " + (req.query.name || req.body.name)
        };

    } else {
        context.res = {
            status: 400,
            body: "Please pass a name on the query string or in the request body"
        };
    }
    context.done();
};

=======================================================================

No comments:

Post a Comment