Wednesday, February 24, 2010

N-Tier Application Architecture

N-Tier Application Architecture provides a structure for the developers to create fixable and reusable web application. It helps to break the application into tiers. Here N-tier means any number of distinct tiers used in your architecture.
N-tiers
1. Client Tier – HTML , javascript,(Java Server Pages)JSP
2. Middle Tier – Servlet,
3. Data Access Tier - (Entity Java Bean)EJB,Database

Application server

Application server is a server design to for running specific applications.These application can divided into three parts.

They are ,
1. web-based graphical interface
2. business logic application
3. database and transaction server

Tuesday, February 23, 2010

widget

Widgets is part of GUI Interface.Widgets display information and invite the user to act in a number of ways. Typical widgets contains buttons, dialog boxes, pop-up windows, pull-down menus,scroll bars, resizable window edges, icons,progress indicators, selection boxes, windows, tear-off menus, menu bars, toggle switches and forms.

Remote Procedure Call (RPC)

Remote Procedure Call is a protocol that one program can use to request a service from a program located in another computer in a network without having to understand network details.RPC uses the client/server model. The requesting program is a client and the service-providing program is the server.

Monday, February 22, 2010

J2EE Design Patterns - Transfer Object / Value Object

If the client needs to display set of attribute on the server. The client application calls the individual getter and setter methods that require single attribute values. This will cause a huge network traffic block.

People come across new design pattern to overcome this issue. That Pattern is called as Transfer Object/Value Object Design Pattern.

Here Transfer Object encapsulates the bulk business data. A single method call is used to send and retrieve the Transfer Object / Value Objects.

This Pattern has three main components

They are,

Client - client can be GUI interface

Business Object – can be Entity Bean, Session Bean or Data Access Object .Also responsible for creating Transaction object.

Transfer Object - an arbitrary serializable Java object. The members in the Transfer Object are defined as public; Transfer Object class may provide a constructor that accepts all the required attributes.

Coupling Vs Cohesion

Coupling

coupling or dependency is the degree to which each program module relies on each one of the other modules.

Cohesion

Modules with high cohesion tend to be preferable because high cohesion is associated with several desirable traits of software including robustness, reliability, reusability, and understandability whereas low cohesion is associated with undesirable traits such as being difficult to maintain, difficult to test, difficult to reuse, and even difficult to understand.

Friday, February 19, 2010

MVC Architecture

MVC stands for “model, view, controller.”

Model

The model refers to the data of an application after it has been retrieved from a database. The model is typically made up of objects which reside in RAM memory.

View
The view refers to the presentation of the data on the screen.

Controller
The controller refers to the request and response handler for the application. The controller is usually created with servlets.

How it all fits together

To fully understand how MVC architecture works, let’s think about what happens when an HTTP request is made with a web application. When someone clicks on a link to go to a new webpage, a request is made to the server. The controller then decides what page the user needs to go to, and what data needs to be sent. The application queries the appropriate databases, and puts the resulting data into the model.

At this point, the model can be easily manipulated, sorted, and filtered, and used to create the view that the user will see when the page first loads. The HTML content can be generated with a JSP (if the application uses the Java platform) and sent back to the client machine as a response.