Abstract Factory Design Pattern in Java

Introduction Abstract Factory pattern is one of the most used design pattern in Java. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object. Abstract Factory patterns works around a parent-factory which creates other factories. This factory is also called as Factory of factories. In Abstract Factory pattern…

Factory Design Pattern in Java

Introduction Factory pattern is one of the most used design pattern in Java. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object. In Factory pattern, we create object without exposing the creation logic to the client and refer to newly created object using a common interface. Factory…

Life cycle of JavaServer Faces (JSF)

In Java Server Faces (JSF) the client makes an HTTP request for the page, and the server responds with the page translated to HTML. However, the Java Server Faces life cycle is split up into multiple phases in order to support the sophisticated UI (User Interface) component model. This model requires that component data be converted and validated, component events…

MySQL Event Scheduler

This tutorial will show you how we can use MySQL Event Scheduler to schedule or automate some tasks periodically at a particular interval. MySQL Events are tasks that run according to a schedule. Therefore, it is sometimes referred to as scheduled events. When we create an event, we are creating a named database object containing one or more SQL statements…

Abstract Class design pattern and its use in Java

This tutorial will show you what is Abstract Class Pattern and when we consider to use this Abstract Class Design Pattern in our application design. The abstract class design pattern is useful for designing a framework for the consistent implementation of the functionality common to a set of related classes. An abstract class consists of one or more abstract methods…

Interface design pattern and its use in Java

In this tutorial we will show you what is Interface Pattern and when we consider this Interface Pattern to use in our application design. The interface pattern can be used to design a set of service provider classes that offer the same service so that a client object can use different classes of service provider objects in a seamless manner…

Precached images using JavaScript

Images often take several extra time to download from a Web server. If images change in response to user actions then you may want the same fast response that users are accustomed to. It may be an irritating situation while users are waiting for image(s) to be downloaded for a page and the page is loading slowly due to such…

What Is Dependency Injection Pattern

Dependency Injection Dependency injection pattern is a software design pattern in which one or more dependencies (or services) are injected, or passed by reference, into a dependent object (or client) and are made part of the client’s state. The dependency injection pattern separates the creation of a client’s dependencies from its own behavior, which allows program designs to be loosely…

Convert Lowercase To Uppercase In JavaScript

Lowercase To Uppercase Letters This tutorial will show you how to convert letters from lowercase to uppercase using JavaScript’s onkeyup event. There is an input box where you will type and onkeyup JavaScript event will call a custom function which will convert the lowercase letters to uppercase letters. onkeyup means as you type the function will be called and the…

REST Service with MultivaluedMap using Jersey

Introduction Here I am going to give an example on how MultivaluedMap in REST web service works. A MultivaluedMap<K, V> is a map of key-values pairs. Each key can have zero or more values, where K – the type of keys maintained by this map and V – the type of mapped values. The most important concept in REST is…