Three-tier Architecture

Three-tier is a client–server architecture in which the user interface, functional process logic (“business rules”), computer data storage and data access are developed and maintained as independent modules, most often on separate platforms.    The three-tier model is a software architecture pattern.   Apart from the usual advantages of modular software with well-defined interfaces, the ...

Thread States

Thread States
New   This is the state the thread is in after the Thread instance has been created, but the start() method has not been invoked on the thread. It is a live Thread object, but not yet a thread of execution. At this point, the thread is considered not alive.     Runnable  This is ...

The ‘Rare’ static imports

The static import declaration imports static members from classes, allowing them to be used without class reference.   for example: import static java.lang.System.*; class A { public static void main(String args[]) { out.println("project code bank"); } }   output: project code bank   Note : Try to avoid this feature, because over a period you may ...

Synchronized Methods and Synchronized Blocks

If you declare a method to be synchronized, then the entire body of the method becomes synchronized; if you use the synchronized block, however, then you can surround just the “critical section” of the method in the synchronized block, while leaving the rest of the method out of the block.   If the entire method ...

Stubs and Skeletons

Stubs and Skeletons
In the distributed computing environment, stub stands for a client side object participating in the distributed object communication and a skeleton stands for a server side object participating in distributed object communication.  Stub  Skeleton  The stub acts as a gateway for client side objects and all outgoing requests to server side objects that are routed through it. The stub wraps ...

Speed of mouse…

A mickey is a unit of measurement for the speed and movement direction of a computer mouse. The speed of the mouse is the ratio between how many pixels the cursor moves on the screen and how many centimeters you move the mouse on the mouse pad. The directional movement is called the horizontal mickey ...

Singleton pattern

The Singleton design pattern proposes   At any time there can only be one instance of a class  We should allow global point of access to that single instance. The class’s default constructor is made private, which prevents the direct instantiation of the object by others (Other Classes). A static modifier is applied to the ...

SheBANG(S)!!!!

  In computing, a shebang or Hashbang is the sequence of character sequence consisting of number sign followed by exclamation mark (#!), when it occurs as the first two characters on the first line of the textfile. In this case, the program loader in Unix-like operating systems parses the rest of the first line as an interpreter directive and invokes ...

Servlet’s Life…

Initializing… When the Web Container is started the container loads the servlet class and create the instance of  the servlet. The container calls the no-argument init() method (called only once) on the servlet instance after the servlet instance is created but before the servlet can service any request.   Servicing… 1. When a user clicks a ...

Servlet’s Life moment Listeners

Scenario  Listener interface  Event type  You want to know if an attribute in a web app context has been added, removed, or replaced. javax.servlet.ServletContextAttributeListener attributeAdded attributeRemoved attributeReplaced ServletContextAttributeEvent  You want to know how many concurrent users there are. In other words, you want to track the active sessions. (We cover sessions in detail in the ...