Archive for June, 2008

MDA- Model Driven Architecture for Software Devlopment

Posted in MDA, OMG with tags , , , on June 8, 2008 by javaforweb

In this post I will discuss about Model Driven Architecture and its potential in building big projects at rapid pace with high proficiency.

Experienced application developers often invest more time in building models than they do in actually writing code. Well-constructed models make it easier to deliver large, complex enterprise systems on time and within budget.
            MDA-OMG

MDA is a framework advanced by the Object Management Group (OMG) allows developers to build systems according to their core business logic and data—independently of any particular hardware, operating system, or middleware.

 This framework is based on UML and other industry standards for visualizing, storing, and exchanging software designs and models.This Framework emphasizes on importance of models in the software development process.

 In MDA the software development is done by evolving models of the system to be developed.

               MDA software development life cycle

             MDA Devlopment Cycle

MDA identifies same process that is present in traditional software development for developing a System.

 The following three models are at the core of the MDA.

 

 

 

 

 1) Platform Independent Model

2) Platform Specific Model

3) Code

Platform Independent Model

The first model that MDA defines is a model with a high level of abstraction that is independent of any implementation technology. This is called a Platform Independent Model (PIM).

Platform Specific Model

PIM is transformed into one or more Platform Specific Models (PSMs). A PSM is tailored to specify your system in terms of the implementation constructs that are available in one specific implementation technology. For example, an EJB PSM is a model of the system in terms of EJB structures. It typically contains EJB-specific terms like “home interface,” “entity bean,” “session bean,” and so on. A relational database PSM includes terms like “table,” “column,” “foreign key,” and so on.

Code

This is the final step in the development is the transformation of each PSM to code. Because a PSM fits its technology rather closely, this transformation is relatively straightforward.

At every step the level of Abstraction increases. PIM, PSM, and code are shown as artifacts of different steps in the development life cycle.

 

                       The three major steps in the MDA development process

             MDA Devloment Cycle

 Rational product support for MDAs

IBM Rational software has several products that support MDA and Model Driven Development (MDD) in varying capacities. These tools fall into the following basic categories:

 

 

 

 

 

 

 

 

General-purpose

 

Domain-specific

Supporting

Rational Software Architect supports both the principles of MDA as well as the standards upon which MDA is based. It adds full support for MDD, including UML Version 2.0 modeling, code generation, patterns and model transformations, and a new approach to implementing the MDA style of development.

In general purpose category for Java™-based MDA applications IBM provide

MDA toolkit for Rational XDE Java which is an Eclipse plug-in that complements existing patterns and code template features and adds some additional capabilities.

In the domain-specific category IBM Rational System Developer provides a complete UML-based design and development environment optimized for engineering and other types of technical applications developed in C or C++.

In the supporting category, IBM WebSphere Business Modeler is used to model and simulate business processes. As new business processes are developed, models can be exported from the tool and imported into Rational Software Architect or Rational Rose XDE Developer to drive an MDA development process.

MDA Faq’s Visit

http://www.omg.org/mda/faq_mda.htm

Java Tutorials by Ashutosh Sharma pls visit:

http://sharma.ashutosh84.googlepages.com

 

 

 

 

 

 

Tomcat – Is this an Application Server ?

Posted in J2EE with tags , , , on June 5, 2008 by javaforweb

In this post i’ll discuss about Apache Tomcat Web Server and look in to its extent for support in J2EE Environment.

Apache Tomcat is one of the most popular options for lightweight development scenarios,and in many cases meets the need for an application server, even though it is technically a Web server.Java EE extends Java Platform, Standard Edition (Java SE) to support Web services, an enterprise component model, management APIs, and communication protocols for designing and implementing service-oriented architectures, distributed applications, and Web applications.

A compliant Java EE application server must support features such as an Enterprise JavaBeans (EJB) server and container; JNDI capabilities; a Java Message Service (JMS) framework; a Java Transaction API (JTA) framework; and J2EE Connector Architecture. Java EE servers usually support a hierarchical classloader architecture enabling such functionality as EJB loading/reloading, WAR loading/reloading, manifest-specified utilities, and so on.

Java EE defines containers for client applications, servlets, and EJB components. These containers provide structure and functionality that facilitate the deployment, persistence, and execution of supported components. The J2EE Connector Architecture enables a provider of an enterprise system to expose the system using a standard interface known as a resource adapter.

Using a Java EE server(Application Server) gives you the convenience of hosting a system in a pre-tested environment that offers all of the Java enterprise development services. In some cases, however, the Java EE server brings unnecessary overhead to an execution environment that only requires one or two of these services.

For instance, many Java-based Web applications are deployed to environments that only support the technologies found in a Web server/container, such as servlets, JSPs, and JDBC. In these scenarios you might choose to construct a system piecemeal, using sundry frameworks and providers.

Some developers would choose to use Tomcat in place of the Java EE application server given these environmental constraints.

Web applications vs. enterprise applications

For some, the confusion over Tomcat’s definition points to the deeper question of what differentiates an enterprise application from a Web application. Traditionally, a Java enterprise application is defined as a combination of the following components and technologies:

  • EAR files
  • Java Servlets
  • JavaServer Pages or JavaServer Faces
  • Enterprise JavaBeans (EJB)
  • Java Authentication and Authorization Service (JAAS)
  • J2EE Connector Architecture
  • JavaBeans Activation Framework (JAF)
  • JavaMail
  • Java Message Service (JMS)
  • Java Persistence API (JPA)
  • Java Transaction API (JTA)
  • The Java Management Extensions (JMX) API
  • Java API for XML Processing (JAXP)
  • The Java API for XML-based RPC (JAX-RPC)
  • The Java Architecture for XML Binding (JAXB)
  • The SOAP with Attachments API for Java (SAAJ)
  • Java Database Connectivity (JDBC) framework

A Java Web application, meanwhile, is said to combine a subset of Java enterprise application components and technologies, namely:

  • WAR files
  • Java Servlets
  • JavaServer Faces or JavaServer Pages
  • Java Database Connectivity (JDBC) framework

In a typical Java EE Web application, an HTML client posts a request to a server where the request is handled by the Web container of the application server. The Web container invokes the servlet that is configured to handle the specific context of the request.

Once the servlet has received the initial request, some form of request dispatching ensues in order to perform the necessary business logic for completing the request. One or more business services or components are then invoked to perform business logic.

Most business services or components require access to some form of data storage or information system. Oftentimes an abstraction layer between the business service and the data store is provided in order to protect against future changes in the data store. DAOs (data access objects) are often employed as data abstraction components in this situation.

When the DAO invocation step is complete, the response data is passed back up the chain of command, usually as one or more Java beans. The Java beans are then passed to some type of state machine and/or view manager in order to organize and format the markup response. When processing is complete for a given request, a formatted response is passed back to the HTML client.

Now, suppose we add a requirement to the application for asynchronous messaging between business service components. In a Java-based system, this would typically be handled using the Java Message Service (JMS) as shown in figure :

JMS in J2EE Architecture

Most Web servers do not offer JMS as a standard feature, but it is simple enough to add a JMS implementation to a Web server environment.

The application scenario depicted in Figure above could be handled quite easily with just a Web server providing a servlet engine and JSP engine.

Now we add the requirement for connectivity between business services and disparate enterprise information systems. Java EE offers the Java Connector Architecture as a common standard to meet this challenge.

EIS in J2EE Architecture

The architecture is now approaching a complexity that is arguably better suited for a Java EE application server.

A Web server such as Tomcat could possibly be used in combination with other frameworks to meet the requirements, but system management and monitoring complications might make the server/framework mix impractical.

Figure presents a moderately complex, Java-based, service-oriented architecture employing all of the technologies along with communication between multiple WAR deployments, EJBs, and Web services.

Webservices, EJBs, Multiple WAR in J2EE Architecture

The architecture in Figure above has entered the realm of complexity that requires a tested, scalable, manageable Java EE enterprise application server. Once again, a development team with the proper skill level could use Tomcat for the Web tier and piece together technologies and frameworks to support the business and data tiers.

What i personally feel is to support this type of architecture using web server is Impractical. But Most of the tasks that are involved in J2EE environment can be supported by Apache Tomcat Web Server !!

Java Tutorials by Ashutosh Sharma, please visit :

http://sharma.ashutosh84.googlepages.com

Funny Animated JavaScript

Posted in Javascript with tags , , on June 3, 2008 by javaforweb

Copy the following text:  

javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI= document.images; DIL=DI.length; function A(){for(i=0; i<DIL; i++){DIS=DI[ i ].style; DIS.position=’absolute‘; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval(‘A()’,5); void(0)
 

Then paste this in any address bar of any browser, (prefer sites like picasa or flickr with many pictures in them)

Then press enter and enjoy the show!

Java Tutorials by Ashutosh Sharma :–

Visit   http://sharma.ashutosh84.googlepages.com