Posts

Functional Interface in Java

Image
  Functional Interface                Java 8 was released in 2014 and it was one of the major release. Among all other exciting features of Java 8, Lambda Expression is one of the most talked feature. But to use the Lambda Expression we need to know Functional Interface which is another feature introduced in Java 8. As per Java documentation Lambda expressions let you express instances of single-method classes more compactly Functional Interface has been introduced in Java to support lambda expression. So before start diving deeper into lambda expression, it is crucial to understand Functional Interface.  No doubt that interface has gone through a lot of changes in Java 8. Before Java 8, all methods declared in interfaces= are public and abstract by default. But to address the backward compatibility issue, post Java 8 interface can have default methods and static methods. But then what is special ab...

Azure Functions

Image
Azure Functions            Serverless computing is rightfully gaining more and more attention now a days with cloud ecosystem be it AWS, Azure, GCP, IBM name any of the cloud provider. But the most important discussion over the internet space is whether serverless is actually Server-less in literal meaning! What is serverless?                                To answer the question, serverless is not literally server less. There are Servers. You still need server to run your application. Serverless computing is a way of abstracting the hassle of the underlying infrastructure from developers so that they can concentrate on the logical implementation. It is a cloud computing execution model where cloud provider handles all the responsibility for common infrastr...

Virtual Machines Scale Set

Image
Virtual Machines Scale Set - Orchestrator for pool of VMs                         One of the major benefits of cloud computing is elasticity and scalability to adapt varying workloads by dynamic resource allocation or deallocation. Now consider a situation where we have to host an N tier application in Azure Virtual Machines. For simplicity let’s consider a 3 tier web application having web tier, business tier and database. Now we have a specific set of virtual machines for web tier and business tier hosted behind an Azure load balancer or Application gateway. Now everything works fine till application receives more requests than it can withstand during certain peak business hours or specific days. To cope with such scenario application should scale horizontally or vertically. Either of the ways we have to either manually provision more virtual machines of identical configuration and set up or scal...

JSF Composite Component

Image
JSF Composite Component Since JSF 2.0 , JSF provides a powerful concept of creating custom component using composite component along with JSF facelet tags . A composite component is a special type of component which acts as a reusable component . It helps developer to define a customized component having a particular high level behavior as well as structure along with Labels , attributes , validators , converters and Listeners . User can use that predefined structure and inject their own set of functionality like any other standard reusable components. As per java specification , most commonly used composite tags are listed below : For simplicity, you can think composite:interface as java interface which is used to define a high level abstraction of the entire reusable component . Those configurable values are used in composite:implementation #{cc.attrs.attribute-name} expression to implement those values with reusable standard components . Let’s discuss this tags...

Java Server Faces Lifecycle

Image
Java Server Faces Lifecycle Java Server Faces is a server side MVC based java framework for Web application development. It includes a set of APIs which represent different UI components and helps in managing their states . It helps developers to concentrate on business logic rather than concentrating on common life cycles of Web Applications : Handling requests , Decoding parameters , Validations , conversions , Modification and saving states and rendering responses to the clients . JSF request processing lifecycle starts as soon as new HTTP request is submitted by the client to JSF controller servlet . This life cycle consists of six phases . JSF framework manages life cycle phases automatically . Following are the life cycle phases given in the order of execution  : Restore view Phase Apply request values Phase Process validations phase Update model values phase Invoke application phase Render response phase Generally JSF request processin...