DEV212 Comparing .NET and Java: The View from 2006 David Chappell Chappell & Associates www.davidchappell.com
Application Platforms Today Data Access  Containing and Connecting Logic Defining Logic Logic to Logic Logic to Web Browser Accessing Data Web Services  Binary Communication Distributed Transactions, etc. Queued Messaging Using Logic Web Browser Standalone Client Objects Remote Logic
.NET Framework 2.0 Defining Logic Containing and Connecting Logic Accessing Data Using Logic ADO.NET  ASP.NET ASMX/ WSE .NET Remoting Enterprise Services System. Messaging C#/Visual Basic/etc. Browser Windows Forms Remote Logic
J2EE 1.4 Defining Logic Containing and Connecting Logic Accessing Data JDBC  Using Logic Servlets/Java Server Pages (JSP) JAX-RPC Remote Method Invocation (RMI) Enterprise JavaBeans (EJB) Java Message Service (JMS) Java Browser Remote Logic Standalone Client
How We Got Here The Last Ten Years Java Microsoft 1996 Java, Java VM Windows DNA -  ASP, ADO, MTS Key 1999 J2EE 1.0 -  JSP, JDBC, EJB 2002 .NET Framework 1.0 C#/VB.NET, CLR ASP.NET, ADO.NET, Enterprise Services ASMX J2EE 1.4 -  JAX-RPC 2003 2005 .NET Framework 2.0 Application server technologies Languages Web services
What’s Next .NET Framework 2.0 Java EE 5, including: - Enterprise JavaBeans 3.0 - JAX-WS - More . . . Java Community Process (JCP) The open source world, including: Eclipse Spring Framework Hibernate Much more . . . Various processes Open SOA (OSOA), including: - Service Component Architecture (SCA) - Service Data Objects (SDO) Open SOA Collaboration .NET Framework 3.0, including: - Windows Workflow Foundation (WF)  - Windows Communication Foundation (WCF) - More . . . J2EE 1.4
Application Platforms in 2008 Defining Logic Containing and Connecting Logic Logic to Web Browser Accessing Data Data Access  Using Logic Web Browser Standalone Client Remote Logic Logic to Logic Objects Workflows If … Then … Rules If … Then … If … Then …
.NET Framework 3.0 Defining Logic Containing and Connecting Logic ASP.NET Accessing Data Using Logic Browser/AJAX/ XBAPs Windows Presentation Foundation (WPF) Remote Logic ADO.NET  C#, VB, etc. Workflows Windows Workflow Foundation (WF) Rules WF Rules Engine Windows Communication Foundation (WCF)
Java EE 5 Defining Logic Containing and Connecting Logic Accessing Data Using Logic Remote Logic Servlets/Java Server Pages (JSP) Browser/AJAX Standalone Client Java JDBC  Java Persistence API (JPA) JAX-WS Remote Method Invocation (RMI) Enterprise JavaBeans 3.0  Java Message Service (JMS) Workflows Rules
Open SOA Defining Logic Containing and Connecting Logic Accessing Data Using Logic Remote Logic Service Data Objects (SDO)  Servlets/ Java Server  Pages (JSP) Browser/AJAX Standalone Client Java, C++, etc. Workflows BPEL Service Component Architecture (SCA) Rules
What Will Succeed J2EE 1.4? Divining the Future Major J2EE vendors (e.g., IBM and BEA) have announced plans to support both Java EE 5 and Open SOA But they’re unhappy with Sun’s stewardship of Java Some observations: “We’re moving away from slavish devotion to J2EE to a blended source model” – Bill Roth, Vice President, BEA “Organizations should look elsewhere when considering new enterprise development and should plan for the eventual sunset of Java EE as an enterprise solution.” –Burton Group, July 2006 Going forward, a combination of Java EE 5 and Open SOA is likely to dominate
A Plausible Successor to J2EE 1.4 Defining Logic Containing and Connecting Logic Accessing Data Using Logic Remote Logic Servlets/ Java Server  Pages (JSP) Browser/AJAX Swing/Eclipse Client Java Workflows Rules BPEL Various Service Component Architecture (SCA) Service Data Objects (SDO)  Java Persistence API (JPA)
Defining Logic: A Closer Look Defining Logic Containing and Connecting Logic Accessing Data Using Logic Objects Workflows If … Then … Rules If … Then … If … Then …
Defining Logic: Objects The main .NET languages (C#/VB) and Java are advancing along similar paths, e.g., Both now have generics Java has added annotations (analogous to .NET’s attributes) Both worlds are adding support for dynamic languages .NET: CLR-based IronPython Java: JVM-based Jython, Groovy, etc.
Defining Logic: Workflows Workflow Engine 1) Execute first step 2) Execute second step 3) Execute next step . . .
Creating Workflow Logic Two Approaches A workflow language: Business Process Execution Language (BPEL) An XML-based language for defining process logic Originally created by Microsoft and IBM Now owned by OASIS Generalized activities: Windows Workflow Foundation Each activity is defined as a class Can also support BPEL with appropriate activities
BPEL Example Activities sequence : executes one or more activities sequentially flow : executes one or more activities in parallel switch : executes one of several paths based on the value of a condition while : executes a specified activity as long as a condition is true invoke : calls a web service receive : receives an incoming web service call compensationHandler:  defines a compensation handler wait:  delays the process for a period of time
BPEL A Simplified Example (1) <process> ... <partnerLink name=“customer” ... /> ... <variables> <variable name = incomingRequest … /> <variable name = customerInfo … /> </variables> <sequence>  <receive partnerLink=&quot;customer&quot; variable=“incomingRequest“ /> Wraps operations into an executable process Identifies a communication partner Declares variables Receives a message
BPEL A Simplified Example (2) <assign> <copy> <from variable=“incomingRequest&quot;  property=&quot;props:customerNumber&quot;/> <to variable=“customerInfo&quot;  property=&quot;props:customerID&quot;/> </copy> </assign> ... </sequence> </process>  Performs an assignment
Defining a Graphical Process Notation An Aside The Business Process Modeling Notation (BPMN) aims at defining a standard graphical notation for defining process logic It’s owned by the Object Management Group (OMG) For graphically defined processes, BPMN could allow skills portability Receive Invoice PO Found? Process PO Send Payment Yes OK? Yes No No
BPEL Illustrating a Typical Implementation BPEL Execution Engine Workflow Graphical Process Design Tool Runtime Services
WF Illustrating Its Components Workflow Other Activities BPEL 1.1 Library Host Process Base Activity Library (BAL) Runtime Engine Runtime Services Visual Studio 2005 WF Workflow Designer
WF Example BAL Activities Sequence : executes one or more activities sequentially Parallel : executes one or more activities in parallel IfElse : executes one of several paths based on the value of a condition While : executes a specified activity as long as a condition is true InvokeWebService : calls a web service Compensate:  defines a compensation handler Delay:  delays the process for a period of time
Perspective BPEL and WF BPEL  Pros: The OASIS standard provides some portability Although vendors typically add proprietary extensions to the language, e.g., for human workflow Cons: It’s a rigid approach Most developers don’t like XML-based languages WF Pros: It’s a more general, extensible approach Cons: It’s a Windows-only technology Learning to write effective WF workflows takes time
Defining Logic: Rules A  business rules engine (BRE)  lets developers express rules in a standard way, then have them executed by a common engine A  business rules management system (BRMS)  typically includes: A BRE Developer tools Business analyst tools Rules management tools
Rules in the .NET Framework 3.0 WF includes a basic rules engine The engine can be used with a WF workflow or separately The WF rules engine targets developers It’s not a full BRMS The goal is to help developers more easily create rule-based applications Microsoft also provides a separate BRE with BizTalk Server
Rules in Java EE/Open SOA Vendors use a range of diverse rules engines Including integration with third parties such as ILOG The Object Management Group is working on some standards for rules
Perspective Rules Rules are becoming part of the standard development platform Although business rules engines aren’t yet a mainstream technology for developers Expect changes here Even Microsoft’s plans aren’t completely clear
Containing Logic: A Closer Look Defining Logic Containing and Connecting Logic Logic to Logic Logic to Web Browser Accessing Data Using Logic
Containing and Connecting Logic Logic to Web Browsers .NET Framework 3.0 ASP.NET 2.0 Java EE 5 and Open SOA: Both use Servlets/JSPs Java EE 5 also includes Java Server Faces (JSF) A JSP tag library implementing a model/view/controller (MVC) architecture for HTML interfaces Various open source options are also used, e.g., Struts
Containing and Connecting Logic Logic to Logic Java EE 5 tries to improve the existing containers and communication mechanisms With JAX-WS and EJB 3.0 .NET Framework 3.0 and Open SOA instead provide a new unified foundation .NET Framework: WCF Open SOA: SCA
Microsoft vs. EJB The Last Ten Years Java Microsoft 1996 MTS 1998 EJB 1.0 Session beans Entity beans 2000 COM+ EJB 2.0 Session beans Entity beans Message-driven beans 2001 Stateless session beans are analogous to MTS objects New version of entity beans Allowed communication via JMS Enterprise Services 2002 2006 EJB 3.0 Session beans Message-driven beans (Supplanted by WCF) Provided a .NET wrapper around COM+ Entity beans replaced by JPA
Unifying Communication WCF Windows Communication Foundation API ASMX & WSE .NET Remoting Enterprise Services System. Messaging API Applications .NET Framework 2.0 MSMQ SOAP & WS-*  Remoting binary protocol DCOM Protocol Others SOAP & WS-*  WCF binary protocol MSMQ Protocol Applications .NET Framework 3.0
Unifying Communication SCA Service Component Architecture API JAX-RPC Java RMI JMS API EJB Applications J2EE 1.4 Applications Open SOA Others SOAP & WS-*  RMI binary protocol Queued messaging protocols Protocol Queued messaging protocols SOAP & WS-*  RMI binary protocols Protocol Various protocols
An Example Service WCF using System.ServiceModel; [ServiceContract] interface IAdder { [OperationContract] int Add(int a, int b); } class Adder : IAdder { public int Add(int a, int b)  {  return a + b;  } }   Indicates that this interface should be exposed as a service Indicates that this method should be exposed as an operation in this service
An Example Service SCA import org.osoa.sca.annotations.* @Remotable public interface IAdder { int Add(int a, int b); } public class Adder implements IAdder { public int Add(int a, int b)  {  return a + b;  } }   Indicates that this interface should be exposed as a remotely accessible service
Describing an Exposed Service  WCF ... <service type=“Adder,CalcApp&quot;> <endpoint  contract=“IAdder,CalcApp&quot; binding=”basicHttpBinding”  address= &quot;http://www.qwickbank.com/calc/adder.svc&quot;/> </service> ... Operations exposed by the service How to communicate with the service Where to find the service
Describing an Exposed Service SCA ... <service name=“IAdder&quot;> <interface.java interface=“services.calc.IAdder” /> <binding.ws port= “ http://www.qwickbank.com/calc# wsdl.endpoint(IAdder/IAdderSOAP)” />  </service> ... Operations exposed by the service How to communicate with the service Where to find the service
More WCF/SCA Similarities Both allow a service to maintain state between calls: WCF:  [ServiceContract(Session=true)]   SCA (Java):  @Scope(“session”) Both allow one-way methods: WCF:  [OperationContract(IsOneWay=true)]   SCA (Java):  @OneWay Both allow bidirectional communication via callbacks
Illustrating Assembly: A Composite SCA Composite Component Component Component Service X Y Z Wire Y Reference Z Property Client X
Describing a Composite SCA A <composite> XML element can specify: The  components  in a composite The  services  each component exposes The  references  each component makes to other services The  wires  that connect references to services Expressed as a pair of URIs Any  properties  that can be set on this composite Some things this allows: Dependency injection , where SCA locates the matching service for a component’s reference Although how this is done isn’t specified Graphical tools for assembling an application’s components
Perspective WCF and SCA Problems addressed: WCF: Implementing services and remote clients SCA: Implementing services and remote/local clients; defining composite assembly Language support: WCF: Any .NET language SCA: Java, BPEL, C++, others Availability: WCF: Implementation available now SCA: Specs in progress Security, transactions, reliable communication not yet fully defined Various implementations, e.g., open source Tuscany, also in progress
Accessing Data: A Closer Look Defining Logic Containing and Connecting Logic Accessing Data Data Access  Using Logic
Data Access Technology The Last Ten Years Java EE Open SOA Microsoft Key 1996 ADO JDBC EJB 1.0 Entity Beans 1998 EJB 2.0 Entity beans 2001 Java Persistence API (JPA) 2006 JAXB Service Data Objects (SDO) ObjectSpaces  (cancelled) 2003 Java Data Objects (JDO) System.XML ADO.NET 2002 Relational access O/R mapping XML mapping Relational access and XML mapping Supplants EJB Entity beans and JDO
Illustrating ADO.NET .NET Framework Data Provider .NET Framework Data Provider Application DBMS XML Document XML Document DataSet Serialized DataSet <XML  …  /> Tables
Illustrating SDO .NET Framework Data Provider XML Document XML Document Application DBMS Data Access Service Data Access Service XML Document Other Data Source Data Access Service Serialized DataObjects <XML  …  /> Data Graph DataObjects
Perspective Data Access Data access is a hard problem Both camps have gone through many iterations The Java world has placed more emphasis on O/R mapping technology Microsoft’s forthcoming Language Integrated Query (LINQ) introduces a new perspective LINQ for SQL addresses O/R mapping LINQ for XML allows access to XML documents More . . .
A Projection for 2008 A Mainstream .NET Framework Application WCF Service WF Workflow ASP.NET AJAX WCF Service LINQ ADO.NET
A Projection for 2008 A Mainstream Java EE/Open SOA Application Java SCA Component JSP/ AJAX Java SCA Component BPEL SCA Component SDO JPA
Summary Both camps tend to move in similar directions The platforms will remain functionally similar The approaches sometimes differ in significant ways, however There are pros and cons Competition benefits everybody
About the Speaker David Chappell is Principal of Chappell & Associates in San Francisco, California. Through his speaking, writing, and consulting, he helps IT professionals understand, use, and make better decisions about enterprise software. David has been the keynote speaker for dozens of conferences and events in the U.S., Europe, Asia, and Latin America. His popular seminars have been attended by tens of thousands of developers, architects, and decision makers in forty countries.  David’s books have been published in ten languages and used in courses at MIT, ETH Zurich, and many other universities. He is Series Editor for Addison-Wesley’s award-winning  Independent Technology Guides , and he has been a regular columnist for several publications. In his consulting practice, David has helped clients such as Hewlett-Packard, IBM, Microsoft, Stanford University, and Target Corporation adopt new technologies, market new products, train their sales staffs, and create business plans. David’s comments have appeared in The New York Times, CNN.com, and various other publications. Earlier in his career, he wrote software for supercomputers, chaired a U.S. national standardization working group, and played keyboards with the Peabody-award-winning Children’s Radio Theater. David holds a B.S. in Economics and an M.S. in Computer Science, both from the University of Wisconsin-Madison.
Ask The Experts Get Your Questions Answered You can find me at the Microsoft Ask the Experts area, located in the Exhibition Hall: Friday 10 November Lunch
 
 
© 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.

Dev212 Comparing Net And Java The View From 2006

  • 1.
    DEV212 Comparing .NETand Java: The View from 2006 David Chappell Chappell & Associates www.davidchappell.com
  • 2.
    Application Platforms TodayData Access Containing and Connecting Logic Defining Logic Logic to Logic Logic to Web Browser Accessing Data Web Services Binary Communication Distributed Transactions, etc. Queued Messaging Using Logic Web Browser Standalone Client Objects Remote Logic
  • 3.
    .NET Framework 2.0Defining Logic Containing and Connecting Logic Accessing Data Using Logic ADO.NET ASP.NET ASMX/ WSE .NET Remoting Enterprise Services System. Messaging C#/Visual Basic/etc. Browser Windows Forms Remote Logic
  • 4.
    J2EE 1.4 DefiningLogic Containing and Connecting Logic Accessing Data JDBC Using Logic Servlets/Java Server Pages (JSP) JAX-RPC Remote Method Invocation (RMI) Enterprise JavaBeans (EJB) Java Message Service (JMS) Java Browser Remote Logic Standalone Client
  • 5.
    How We GotHere The Last Ten Years Java Microsoft 1996 Java, Java VM Windows DNA - ASP, ADO, MTS Key 1999 J2EE 1.0 - JSP, JDBC, EJB 2002 .NET Framework 1.0 C#/VB.NET, CLR ASP.NET, ADO.NET, Enterprise Services ASMX J2EE 1.4 - JAX-RPC 2003 2005 .NET Framework 2.0 Application server technologies Languages Web services
  • 6.
    What’s Next .NETFramework 2.0 Java EE 5, including: - Enterprise JavaBeans 3.0 - JAX-WS - More . . . Java Community Process (JCP) The open source world, including: Eclipse Spring Framework Hibernate Much more . . . Various processes Open SOA (OSOA), including: - Service Component Architecture (SCA) - Service Data Objects (SDO) Open SOA Collaboration .NET Framework 3.0, including: - Windows Workflow Foundation (WF) - Windows Communication Foundation (WCF) - More . . . J2EE 1.4
  • 7.
    Application Platforms in2008 Defining Logic Containing and Connecting Logic Logic to Web Browser Accessing Data Data Access Using Logic Web Browser Standalone Client Remote Logic Logic to Logic Objects Workflows If … Then … Rules If … Then … If … Then …
  • 8.
    .NET Framework 3.0Defining Logic Containing and Connecting Logic ASP.NET Accessing Data Using Logic Browser/AJAX/ XBAPs Windows Presentation Foundation (WPF) Remote Logic ADO.NET C#, VB, etc. Workflows Windows Workflow Foundation (WF) Rules WF Rules Engine Windows Communication Foundation (WCF)
  • 9.
    Java EE 5Defining Logic Containing and Connecting Logic Accessing Data Using Logic Remote Logic Servlets/Java Server Pages (JSP) Browser/AJAX Standalone Client Java JDBC Java Persistence API (JPA) JAX-WS Remote Method Invocation (RMI) Enterprise JavaBeans 3.0 Java Message Service (JMS) Workflows Rules
  • 10.
    Open SOA DefiningLogic Containing and Connecting Logic Accessing Data Using Logic Remote Logic Service Data Objects (SDO) Servlets/ Java Server Pages (JSP) Browser/AJAX Standalone Client Java, C++, etc. Workflows BPEL Service Component Architecture (SCA) Rules
  • 11.
    What Will SucceedJ2EE 1.4? Divining the Future Major J2EE vendors (e.g., IBM and BEA) have announced plans to support both Java EE 5 and Open SOA But they’re unhappy with Sun’s stewardship of Java Some observations: “We’re moving away from slavish devotion to J2EE to a blended source model” – Bill Roth, Vice President, BEA “Organizations should look elsewhere when considering new enterprise development and should plan for the eventual sunset of Java EE as an enterprise solution.” –Burton Group, July 2006 Going forward, a combination of Java EE 5 and Open SOA is likely to dominate
  • 12.
    A Plausible Successorto J2EE 1.4 Defining Logic Containing and Connecting Logic Accessing Data Using Logic Remote Logic Servlets/ Java Server Pages (JSP) Browser/AJAX Swing/Eclipse Client Java Workflows Rules BPEL Various Service Component Architecture (SCA) Service Data Objects (SDO) Java Persistence API (JPA)
  • 13.
    Defining Logic: ACloser Look Defining Logic Containing and Connecting Logic Accessing Data Using Logic Objects Workflows If … Then … Rules If … Then … If … Then …
  • 14.
    Defining Logic: ObjectsThe main .NET languages (C#/VB) and Java are advancing along similar paths, e.g., Both now have generics Java has added annotations (analogous to .NET’s attributes) Both worlds are adding support for dynamic languages .NET: CLR-based IronPython Java: JVM-based Jython, Groovy, etc.
  • 15.
    Defining Logic: WorkflowsWorkflow Engine 1) Execute first step 2) Execute second step 3) Execute next step . . .
  • 16.
    Creating Workflow LogicTwo Approaches A workflow language: Business Process Execution Language (BPEL) An XML-based language for defining process logic Originally created by Microsoft and IBM Now owned by OASIS Generalized activities: Windows Workflow Foundation Each activity is defined as a class Can also support BPEL with appropriate activities
  • 17.
    BPEL Example Activitiessequence : executes one or more activities sequentially flow : executes one or more activities in parallel switch : executes one of several paths based on the value of a condition while : executes a specified activity as long as a condition is true invoke : calls a web service receive : receives an incoming web service call compensationHandler: defines a compensation handler wait: delays the process for a period of time
  • 18.
    BPEL A SimplifiedExample (1) <process> ... <partnerLink name=“customer” ... /> ... <variables> <variable name = incomingRequest … /> <variable name = customerInfo … /> </variables> <sequence> <receive partnerLink=&quot;customer&quot; variable=“incomingRequest“ /> Wraps operations into an executable process Identifies a communication partner Declares variables Receives a message
  • 19.
    BPEL A SimplifiedExample (2) <assign> <copy> <from variable=“incomingRequest&quot; property=&quot;props:customerNumber&quot;/> <to variable=“customerInfo&quot; property=&quot;props:customerID&quot;/> </copy> </assign> ... </sequence> </process> Performs an assignment
  • 20.
    Defining a GraphicalProcess Notation An Aside The Business Process Modeling Notation (BPMN) aims at defining a standard graphical notation for defining process logic It’s owned by the Object Management Group (OMG) For graphically defined processes, BPMN could allow skills portability Receive Invoice PO Found? Process PO Send Payment Yes OK? Yes No No
  • 21.
    BPEL Illustrating aTypical Implementation BPEL Execution Engine Workflow Graphical Process Design Tool Runtime Services
  • 22.
    WF Illustrating ItsComponents Workflow Other Activities BPEL 1.1 Library Host Process Base Activity Library (BAL) Runtime Engine Runtime Services Visual Studio 2005 WF Workflow Designer
  • 23.
    WF Example BALActivities Sequence : executes one or more activities sequentially Parallel : executes one or more activities in parallel IfElse : executes one of several paths based on the value of a condition While : executes a specified activity as long as a condition is true InvokeWebService : calls a web service Compensate: defines a compensation handler Delay: delays the process for a period of time
  • 24.
    Perspective BPEL andWF BPEL Pros: The OASIS standard provides some portability Although vendors typically add proprietary extensions to the language, e.g., for human workflow Cons: It’s a rigid approach Most developers don’t like XML-based languages WF Pros: It’s a more general, extensible approach Cons: It’s a Windows-only technology Learning to write effective WF workflows takes time
  • 25.
    Defining Logic: RulesA business rules engine (BRE) lets developers express rules in a standard way, then have them executed by a common engine A business rules management system (BRMS) typically includes: A BRE Developer tools Business analyst tools Rules management tools
  • 26.
    Rules in the.NET Framework 3.0 WF includes a basic rules engine The engine can be used with a WF workflow or separately The WF rules engine targets developers It’s not a full BRMS The goal is to help developers more easily create rule-based applications Microsoft also provides a separate BRE with BizTalk Server
  • 27.
    Rules in JavaEE/Open SOA Vendors use a range of diverse rules engines Including integration with third parties such as ILOG The Object Management Group is working on some standards for rules
  • 28.
    Perspective Rules Rulesare becoming part of the standard development platform Although business rules engines aren’t yet a mainstream technology for developers Expect changes here Even Microsoft’s plans aren’t completely clear
  • 29.
    Containing Logic: ACloser Look Defining Logic Containing and Connecting Logic Logic to Logic Logic to Web Browser Accessing Data Using Logic
  • 30.
    Containing and ConnectingLogic Logic to Web Browsers .NET Framework 3.0 ASP.NET 2.0 Java EE 5 and Open SOA: Both use Servlets/JSPs Java EE 5 also includes Java Server Faces (JSF) A JSP tag library implementing a model/view/controller (MVC) architecture for HTML interfaces Various open source options are also used, e.g., Struts
  • 31.
    Containing and ConnectingLogic Logic to Logic Java EE 5 tries to improve the existing containers and communication mechanisms With JAX-WS and EJB 3.0 .NET Framework 3.0 and Open SOA instead provide a new unified foundation .NET Framework: WCF Open SOA: SCA
  • 32.
    Microsoft vs. EJBThe Last Ten Years Java Microsoft 1996 MTS 1998 EJB 1.0 Session beans Entity beans 2000 COM+ EJB 2.0 Session beans Entity beans Message-driven beans 2001 Stateless session beans are analogous to MTS objects New version of entity beans Allowed communication via JMS Enterprise Services 2002 2006 EJB 3.0 Session beans Message-driven beans (Supplanted by WCF) Provided a .NET wrapper around COM+ Entity beans replaced by JPA
  • 33.
    Unifying Communication WCFWindows Communication Foundation API ASMX & WSE .NET Remoting Enterprise Services System. Messaging API Applications .NET Framework 2.0 MSMQ SOAP & WS-* Remoting binary protocol DCOM Protocol Others SOAP & WS-* WCF binary protocol MSMQ Protocol Applications .NET Framework 3.0
  • 34.
    Unifying Communication SCAService Component Architecture API JAX-RPC Java RMI JMS API EJB Applications J2EE 1.4 Applications Open SOA Others SOAP & WS-* RMI binary protocol Queued messaging protocols Protocol Queued messaging protocols SOAP & WS-* RMI binary protocols Protocol Various protocols
  • 35.
    An Example ServiceWCF using System.ServiceModel; [ServiceContract] interface IAdder { [OperationContract] int Add(int a, int b); } class Adder : IAdder { public int Add(int a, int b) { return a + b; } } Indicates that this interface should be exposed as a service Indicates that this method should be exposed as an operation in this service
  • 36.
    An Example ServiceSCA import org.osoa.sca.annotations.* @Remotable public interface IAdder { int Add(int a, int b); } public class Adder implements IAdder { public int Add(int a, int b) { return a + b; } } Indicates that this interface should be exposed as a remotely accessible service
  • 37.
    Describing an ExposedService WCF ... <service type=“Adder,CalcApp&quot;> <endpoint contract=“IAdder,CalcApp&quot; binding=”basicHttpBinding” address= &quot;http://www.qwickbank.com/calc/adder.svc&quot;/> </service> ... Operations exposed by the service How to communicate with the service Where to find the service
  • 38.
    Describing an ExposedService SCA ... <service name=“IAdder&quot;> <interface.java interface=“services.calc.IAdder” /> <binding.ws port= “ http://www.qwickbank.com/calc# wsdl.endpoint(IAdder/IAdderSOAP)” /> </service> ... Operations exposed by the service How to communicate with the service Where to find the service
  • 39.
    More WCF/SCA SimilaritiesBoth allow a service to maintain state between calls: WCF: [ServiceContract(Session=true)] SCA (Java): @Scope(“session”) Both allow one-way methods: WCF: [OperationContract(IsOneWay=true)] SCA (Java): @OneWay Both allow bidirectional communication via callbacks
  • 40.
    Illustrating Assembly: AComposite SCA Composite Component Component Component Service X Y Z Wire Y Reference Z Property Client X
  • 41.
    Describing a CompositeSCA A <composite> XML element can specify: The components in a composite The services each component exposes The references each component makes to other services The wires that connect references to services Expressed as a pair of URIs Any properties that can be set on this composite Some things this allows: Dependency injection , where SCA locates the matching service for a component’s reference Although how this is done isn’t specified Graphical tools for assembling an application’s components
  • 42.
    Perspective WCF andSCA Problems addressed: WCF: Implementing services and remote clients SCA: Implementing services and remote/local clients; defining composite assembly Language support: WCF: Any .NET language SCA: Java, BPEL, C++, others Availability: WCF: Implementation available now SCA: Specs in progress Security, transactions, reliable communication not yet fully defined Various implementations, e.g., open source Tuscany, also in progress
  • 43.
    Accessing Data: ACloser Look Defining Logic Containing and Connecting Logic Accessing Data Data Access Using Logic
  • 44.
    Data Access TechnologyThe Last Ten Years Java EE Open SOA Microsoft Key 1996 ADO JDBC EJB 1.0 Entity Beans 1998 EJB 2.0 Entity beans 2001 Java Persistence API (JPA) 2006 JAXB Service Data Objects (SDO) ObjectSpaces (cancelled) 2003 Java Data Objects (JDO) System.XML ADO.NET 2002 Relational access O/R mapping XML mapping Relational access and XML mapping Supplants EJB Entity beans and JDO
  • 45.
    Illustrating ADO.NET .NETFramework Data Provider .NET Framework Data Provider Application DBMS XML Document XML Document DataSet Serialized DataSet <XML … /> Tables
  • 46.
    Illustrating SDO .NETFramework Data Provider XML Document XML Document Application DBMS Data Access Service Data Access Service XML Document Other Data Source Data Access Service Serialized DataObjects <XML … /> Data Graph DataObjects
  • 47.
    Perspective Data AccessData access is a hard problem Both camps have gone through many iterations The Java world has placed more emphasis on O/R mapping technology Microsoft’s forthcoming Language Integrated Query (LINQ) introduces a new perspective LINQ for SQL addresses O/R mapping LINQ for XML allows access to XML documents More . . .
  • 48.
    A Projection for2008 A Mainstream .NET Framework Application WCF Service WF Workflow ASP.NET AJAX WCF Service LINQ ADO.NET
  • 49.
    A Projection for2008 A Mainstream Java EE/Open SOA Application Java SCA Component JSP/ AJAX Java SCA Component BPEL SCA Component SDO JPA
  • 50.
    Summary Both campstend to move in similar directions The platforms will remain functionally similar The approaches sometimes differ in significant ways, however There are pros and cons Competition benefits everybody
  • 51.
    About the SpeakerDavid Chappell is Principal of Chappell & Associates in San Francisco, California. Through his speaking, writing, and consulting, he helps IT professionals understand, use, and make better decisions about enterprise software. David has been the keynote speaker for dozens of conferences and events in the U.S., Europe, Asia, and Latin America. His popular seminars have been attended by tens of thousands of developers, architects, and decision makers in forty countries. David’s books have been published in ten languages and used in courses at MIT, ETH Zurich, and many other universities. He is Series Editor for Addison-Wesley’s award-winning Independent Technology Guides , and he has been a regular columnist for several publications. In his consulting practice, David has helped clients such as Hewlett-Packard, IBM, Microsoft, Stanford University, and Target Corporation adopt new technologies, market new products, train their sales staffs, and create business plans. David’s comments have appeared in The New York Times, CNN.com, and various other publications. Earlier in his career, he wrote software for supercomputers, chaired a U.S. national standardization working group, and played keyboards with the Peabody-award-winning Children’s Radio Theater. David holds a B.S. in Economics and an M.S. in Computer Science, both from the University of Wisconsin-Madison.
  • 52.
    Ask The ExpertsGet Your Questions Answered You can find me at the Microsoft Ask the Experts area, located in the Exhibition Hall: Friday 10 November Lunch
  • 53.
  • 54.
  • 55.
    © 2006 MicrosoftCorporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.