15
8/8/2019 J2EE Dotnet http://slidepdf.com/reader/full/j2ee-dotnet 1/15 J2EE vs .NET  The Java 2 Platform, Enterprise Edition (J2EE) defines the standard for developing mult-itier enterprise applications. J2EE simplifies enterprise applications by basing them on standardized, modular components, by providing a complete set of services to those components, and by handling many details of application behavior automatically, without complex programming. http://java.sun.com/j2ee/overview.html  The Microsoft .NET Framework is a platform for building, deploying, and running Web Services and applications. It provides a highly productive, standards-based, multi- language environment for integrating existing investments with next- generation applications and services as well as the agility to solve the challenges of deployment and operation of Internet-scale applications. The .NET Framework consists of three main parts: the common language runtime, a hierarchical set of unified class libraries, and a componentized version of Active Server Pages called  ASP.NET. http://msdn.microsoft.com/netframework/

J2EE Dotnet

Embed Size (px)

Citation preview

Page 1: J2EE Dotnet

8/8/2019 J2EE Dotnet

http://slidepdf.com/reader/full/j2ee-dotnet 1/15

J2EE vs .NET

 The Java 2 Platform, EnterpriseEdition (J2EE) defines the standard fordeveloping mult-itier enterpriseapplications. J2EE simplifies enterprise

applications by basing them onstandardized, modular components,by providing a complete set of services to those components, and byhandling many details of applicationbehavior automatically, without complex programming.

http://java.sun.com/j2ee/overview.html

 The Microsoft .NET Framework is aplatform for building, deploying, andrunning Web Services andapplications. It provides a highly

productive, standards-based, multi-language environment for integratingexisting investments with next-generation applications and servicesas well as the agility to solve thechallenges of deployment andoperation of Internet-scale

applications. The .NET Frameworkconsists of three main parts: thecommon language runtime, ahierarchical set of unified classlibraries, and a componentized versionof Active Server Pages called ASP.NET.

http://msdn.microsoft.com/netframework/

Page 2: J2EE Dotnet

8/8/2019 J2EE Dotnet

http://slidepdf.com/reader/full/j2ee-dotnet 2/15

Multi-teir 

a multi-tier architecture is used to describe one in which a degree of separation is attainedby one or many software agents between discrete components in order to facilitate processing insome manner. May also be referred to as an n-tier architecture.

The most widespread use of this term refers to the three-tier architecture. www.wikipedia.com

Page 3: J2EE Dotnet

8/8/2019 J2EE Dotnet

http://slidepdf.com/reader/full/j2ee-dotnet 3/15

Components & States

Component Architecture

o  A notion in object-orientedprogramming where "components" of 

a program are completely generic.Instead of having a specialised set of methods and fields they have genericmethods through which thecomponent can advertise thefunctionality it supports to the systeminto which it is loaded.

Stateful or Stateless?o Stateful, typical client server

application. Maintains life for thewhole session.

o Stateless Having no information about what occurred previously, a statelessapplication treats each request as anindependent transaction, unrelated toany previous request. The internet isinherently stateless.

Page 4: J2EE Dotnet

8/8/2019 J2EE Dotnet

http://slidepdf.com/reader/full/j2ee-dotnet 4/15

Web Ser vices

Web services is a technology that allows applications to communicate with eachother in a platform- and programming language-independent manner.

 A Web service is a software interface that describes a collection of operations that can be accessed over the network through standardized XML messaging. It uses

protocols based on the XML language to describe an operation to execute or datato exchange with another Web service.

4 Key Technologies

1. XML Extensible Mark-up Language

2. UDDI Universal Discovery Description Integration

3. WSDL Web Services Description Language

4. SOAP Simple Object Access ProtocolLinks

http://www-136.ibm.com/developerworks/webservices

http://msdn.microsoft.com/webservices/

http://www.w3.org/2002/ws/

http://searchwebservices.techtarget.com/sDefinition/0,,sid26_gci934542,00.html

Page 5: J2EE Dotnet

8/8/2019 J2EE Dotnet

http://slidepdf.com/reader/full/j2ee-dotnet 5/15

A Web ser vice is a sof tware system identif ied by a URI, whose public inter f aces and 

bindings are def ined and described using XML. Its def inition can be discovered by other  

sof tware systems. These systems may then interact with the Web ser vice in a manner  

prescribed by its def inition, using XML based messages conveyed by inter net pr otocols.http://www.w3.or g/2002/Talks/1007-ws-er f urt/slide6-0.html

Page 6: J2EE Dotnet

8/8/2019 J2EE Dotnet

http://slidepdf.com/reader/full/j2ee-dotnet 6/15

J2EE & .NET What's the 

diff erence?

J2EE is a standard defined by Sun but with many implementations e.g;

BEA WebLogic Server

IBM WebSphere Studio Application Server

Oracle 9i Application Server

JBoss (jboss.org)

One Language - Java

Many IDEs e.g.;

IBM WebSphere Studio Application Developer (IBM)

Forte for Java/NetBeans (Sun Microsystems)

Oracle 9i JDeveloper (Oracle)

JBuilder (Borland)

J2EE is principally about deployingapplications over the web to be accessedvia a browser.

.NET is propriety, owned by MS. Oneimplementation.

Many languages via CLR; C, C#, VB,even COBOL! But not SAL.

Main IDE is Visual Studio.Net thoughthough there are others e.g.PrimalCode from www.sapien.com/

.NET Framwork supports both webbased deployment (ASP.NET) andwindows GUI deployments.

Page 7: J2EE Dotnet

8/8/2019 J2EE Dotnet

http://slidepdf.com/reader/full/j2ee-dotnet 7/15

Integrated Development Envir onment 

(IDE)

JDeveloper http://otn.oracle.com/products/jdev/viewlets/viewl

et-archive0903.html

 Visual Studio .NET http://msdn.microsoft.com/vstudio/productinfo/def 

ault.aspx

Page 8: J2EE Dotnet

8/8/2019 J2EE Dotnet

http://slidepdf.com/reader/full/j2ee-dotnet 8/15

Java Jar gon

Enterprise Java Beans (EJB) an

enterprise bean is a server-side component that encapsulates the business logic of anapplication. By invoking these methods,remote clients can access the inventoryservices provided by the application.

2 types of EJB2 types of EJB

Session Beans; A session bean represents a

single client inside the J2EE server. To access anapplication that is deployed on the server, theclient invokes the session beans methods. Thesession bean performs work for its client, shielding

the client from complexity by executing businesstasks inside the server. a session bean is similar toan interactive session. A session bean is not sharedit can have just one client, can be statefulor stateless

Entity Beans: An entity bean represents a

business object in a persistent storage mechanism.Some examples of business objects are customers,orders, and products. In the J2EE ApplicationServer, the persistent storage mechanism is arelational data-base. Entity beans may be sharedby multiple clients. Because the clients might want to change the same data, its important that entitybeans work within transactions. Typically, the EJBcontainer provides transaction management.

Java Server Pages (JSP); A JSP page is a

text document that contains two types of text:static template data, which can be expressed in anytext-based format, such as HTML, SVG, WML, and

XML, and JSP elements, which construct dynamiccontent. The JSP elements in a JSP page can beexpressed in two syntaxesstandard and XML. AJSP page in XML syntax is an XML document.

Page 9: J2EE Dotnet

8/8/2019 J2EE Dotnet

http://slidepdf.com/reader/full/j2ee-dotnet 9/15

.NET Details

Common language runtime (CLR);is the execution engine for .NET Frameworkapplications. I.e. the runtime environment 

Microsoft Intermediate Language

(MSIL); the CPU-independent instruction set into which .NET Framework programs arecompiled. It contains instructions for loading,storing, initializing, and calling methods on objects.Combined with metadata and the common typesystem, MSIL allows for true cross-languageintegration. Prior to execution, MSIL is converted

to machine code.

managed code; code that is written to

target the services of the common languageruntime. In order to target these services, the codemust provide a minimum level of information(metadata) to the runtime. All C#, Visual Basic.NET, and JScript .NET code is managed by default 

 Assembly; An assembly is the primary

building block of a .NET Framework application. It is a collection of functionality that is built,versioned, and deployed as a single implementationunit (as one or more files).

Page 10: J2EE Dotnet

8/8/2019 J2EE Dotnet

http://slidepdf.com/reader/full/j2ee-dotnet 10/15

What does it look like?

Javapackage com.sun.j2ee.blueprints.petstore.controller.ejb;

import java.util.Collection;

import java.rmi.RemoteException;

import javax.ejb.EJBLocalObject;

import javax.ejb.FinderException;

import javax.ejb.CreateException;

import

com.sun.j2ee.blueprints.cart.ejb.ShoppingCartLocal;

import

com.sun.j2ee.blueprints.customer.ejb.CustomerLocal;

/**

*

*/

public interface ShoppingClientFacadeLocal extends

EJBLocalObject {

public ShoppingCartLocal getShoppingCart();

public void setUserId(String userId);

public String getUserId();

public CustomerLocal getCustomer() throws

FinderException;

public CustomerLocal createCustomer(String userId);

C#class EmailTest

{

[STAThread]

static void Main(string[] args)

{

Console.Write("Email Address to validate: ");

string email = Console.ReadLine();

EmailAddress emailAddr = new EmailAddress(email);

if (emailAddr.IsValid)

{

Console.WriteLine("Mailbox: {0}",

emailAddr.Mailbox);

Console.WriteLine("Quoted Name: {0}",

emailAddr.QuotedString);

Console.WriteLine("Local Part: {0}",

emailAddr.LocalPart);

Console.WriteLine("Domain: {0}",

emailAddr.Domain);

}

else

{

Console.WriteLine("Email Address is invalid");

}

Console.WriteLine("Press <enter> to exit");

Console.ReadLine();

}

}

Page 11: J2EE Dotnet

8/8/2019 J2EE Dotnet

http://slidepdf.com/reader/full/j2ee-dotnet 11/15

Per for mance?

J2EE is fastest  Tests run buy Oracle

.NET is Fastest  http://www.middleware-company.com

Page 12: J2EE Dotnet

8/8/2019 J2EE Dotnet

http://slidepdf.com/reader/full/j2ee-dotnet 12/15

Choose J2EE

Its mature: its been around since 2000.

Oracle support it: if we a sticking with Oracle and want to go to n-

tier deployment J2EE is the natural choice

Its free! We are licensed for some of Oracles Java products already, there

are free application servers & IDEs available,

Its vendor neutral  dont have to choose Oracles toolset 

Page 13: J2EE Dotnet

8/8/2019 J2EE Dotnet

http://slidepdf.com/reader/full/j2ee-dotnet 13/15

Choose .NET

Its new: more up to date better on latest technologies e.g. Web Services,

XML

Its Microsoft : better integration with Windows environment 

Its Microsoft : better integration with MS Office,

Page 14: J2EE Dotnet

8/8/2019 J2EE Dotnet

http://slidepdf.com/reader/full/j2ee-dotnet 14/15

Who is using them?

J2EE Boeing DCS a distributed computing system designed to

collect data from stationary or portable devices and deliverthe data to application-host systems

CERN the world's leading particle physics research lab (andthe birthplace of the Web)

Election Systems & Software InciReport election

automation software product that helps county and stategovernments improve efficiency and accuracy of reportingelection results via web technology.

http://www.oracle.com/ip/deploy/ias/gs/index.html?j2ee.html

British Airways online ticketing

http://www.bea.com/framework.jsp?CNT=british_airways.ht m&FP=/content/customers/profiles

.NET London Stock Exchange value-added information

systemhttp://www.microsoft.com/resources/casestudies/CaseStudy.asp?CaseStudyID=13911

SocialTech, Incorporated TRAK (Technology toRecover Abducted Kids), a computer software system that helps law enforcement agencies locate and recover abductedchildren.http://www.microsoft.com/resources/casestudies/CaseStudy.asp?CaseStudyID=13901

Match.com Halves Server Farm, Doubles Speed with

 ASP.NET and Windows Serverhttp://www.microsoft.com/resources/casestudies/CaseStudy.asp?CaseStudyID=15011

Page 15: J2EE Dotnet

8/8/2019 J2EE Dotnet

http://slidepdf.com/reader/full/j2ee-dotnet 15/15

Questions

Do we want to continue to use Citrix overthe Web or switch to a more web native 

solution? Are we committed to continuing to use

Oracle?

 Are we too small to use both J2EE (IMS)& .NET (IRS)? Oracle & SQL Server?