Your SlideShare is downloading. ×
0
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
J2 Ee Vs. .Net Workshop
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

J2 Ee Vs. .Net Workshop

1,356

Published on

J2EE & .Net, which one do you like?

J2EE & .Net, which one do you like?

Published in: Economy & Finance, Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,356
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
126
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Wednesday, May 27, 2009
  • Transcript

    • 1. J2EE vs. .NET A Technical Workshop from NGUON VIET SOFTWARE LLC
    • 2. Objectives <ul><li>To understand the Distributed System </li></ul><ul><li>To understand the J2EE Technology </li></ul><ul><li>To understand the .NET Technology </li></ul><ul><li>To know the difference between J2EE and .NET </li></ul>
    • 3. What is a Distributed System? A system made up of distinct sub-systems/ components that are distributed across multiple computers on a network. <ul><li>Availability </li></ul><ul><li>Manageability </li></ul><ul><li>Performance </li></ul><ul><li>Reliability </li></ul><ul><li>Scalability </li></ul><ul><li>Securability </li></ul>
    • 4. J2EE Framework
    • 5. J2EE <ul><li>The application server maintains controls and provides services through an interface or framework known as a container </li></ul><ul><li>There are five defined container types in the J2EE specification </li></ul><ul><ul><li>Three of these are server-side containers </li></ul></ul><ul><ul><li>The other two container types are client-side </li></ul></ul>Containers
    • 6. J2EE <ul><li>A servlet is a server-side component </li></ul><ul><ul><li>Written in Java </li></ul></ul><ul><ul><li>Extends the capabilities of servers </li></ul></ul><ul><ul><li>Accessed via request-response programming model </li></ul></ul><ul><li>What can Servlet do? </li></ul><ul><ul><li>Share information </li></ul></ul><ul><ul><li>Maintain in client state </li></ul></ul><ul><ul><li>Filter requests and responses </li></ul></ul><ul><ul><li>Control web flows </li></ul></ul><ul><li>Usage </li></ul><ul><ul><li>Used to develop the presentation (A controller in web tier) </li></ul></ul>Servlet
    • 7. J2EE <ul><li>A JSP page is a text document that contains two types of text </li></ul><ul><ul><li>Static data: HTML, SVG, WML, and XML </li></ul></ul><ul><ul><li>JSP elements: Construct dynamic content </li></ul></ul><ul><li>What can JSP do? </li></ul><ul><ul><li>Generate dynamic pages to interact with users </li></ul></ul><ul><ul><li>Transfer control to another web component </li></ul></ul><ul><ul><li>Access server-side objects </li></ul></ul><ul><ul><li>Support Tag Library </li></ul></ul><ul><li>Usage </li></ul><ul><ul><li>Used to develop the presentation </li></ul></ul>JSP
    • 8. J2EE <ul><li>An enterprise java bean is a server-side component that can be deployed in a distributed multi-tier environment. </li></ul>EJB Enterprise JavaBeans (EJBs) Session Bean (SB) Entity Bean (EB) Message Driven Bean (MDB) Stateless (SLSB) Stateful (SFSB) Bean Managed Persistence (BMP) Container Managed Persistence (CMP) Synchronous Communication Asynchronous Communication
    • 9. J2EE <ul><li>EJB usually plays roles in business tier </li></ul>EJB
    • 10. J2EE <ul><li>JMS (Java™ Messaging Service) </li></ul><ul><ul><li>Standard API for messaging </li></ul></ul><ul><li>JavaMail™ </li></ul><ul><ul><li>API allows an application component to send Internet mail. </li></ul></ul><ul><li>JAF (JavaBeans™ Activation Framework) </li></ul><ul><ul><li>Supports handling data in different MIME types </li></ul></ul><ul><li>JAXP (Java™ API for XML Parsing) </li></ul><ul><ul><li>SAX and DOM parser </li></ul></ul><ul><ul><li>XSLT transform </li></ul></ul><ul><li>JCA ( J2EE™ Connector Architecture ) </li></ul><ul><ul><li>The Connector architecture is a J2EE SPI that allows resource adapters that support access to Enterprise Information Systems to be plugged in to any J2EE product. </li></ul></ul>Service Technologies
    • 11. J2EE <ul><li>JDBC API </li></ul><ul><ul><li>API for connectivity with relational database systems. </li></ul></ul><ul><li>JTA (Java™ Transaction API) </li></ul><ul><ul><li>An application-level demarcation interface that is used by the container and application components to demarcate transaction boundaries. </li></ul></ul><ul><ul><li>An interface between the transaction manager and a resource manager </li></ul></ul><ul><li>JNDI (Java Naming and Directory Interface™) </li></ul><ul><ul><li>Standard API for naming and directory access. </li></ul></ul><ul><li>Security Services </li></ul><ul><ul><li>The Java™ Authentication and Authorization Service (JAAS) enables services to authenticate and enforce access controls upon users . </li></ul></ul>Service Technologies
    • 12. J2EE <ul><li>Web Services </li></ul><ul><ul><li>J2EE provides full support for both clients of web services as well as web service endpoints. </li></ul></ul><ul><li>Management </li></ul><ul><ul><li>The Java 2 Platform, Enterprise Edition Management Specification defines APIs for managing J2EE servers using a special management enterprise bean. </li></ul></ul><ul><ul><li>The Java™ Management Extensions (JMX) API is also used to provide some management support. </li></ul></ul><ul><li>Deployment </li></ul><ul><ul><li>The Java 2 Platform, Enterprise Edition Deployment Specification defines a contract between deployment tools and J2EE products. </li></ul></ul>Service Technologies
    • 13. J2EE <ul><li>Internet protocols </li></ul><ul><ul><li>TCP/IP, HTTP, HTTPS/SSL. </li></ul></ul><ul><li>OMG Protocols </li></ul><ul><ul><li>Java IDL (Java Interface Definition language) </li></ul></ul><ul><ul><ul><li>Allows J2EE application components to invoke external CORBA objects using the IIOP protocol. </li></ul></ul></ul><ul><ul><li>RMI-IIOP (Java Remote Method Invocation over Internet Inter-ORB Protocol technology) </li></ul></ul><ul><ul><ul><li>To enable interoperability between J2EE products </li></ul></ul></ul>Communication Technologies
    • 14. J2EE <ul><li>Web Application Security: </li></ul><ul><ul><li>Authentication: </li></ul></ul><ul><ul><ul><li>HTTP Basic and Digest Authentication </li></ul></ul></ul><ul><ul><ul><li>Form-Based Authentication </li></ul></ul></ul><ul><ul><ul><li>HTTPS Client Authentication </li></ul></ul></ul><ul><ul><li>Authorization </li></ul></ul><ul><ul><ul><li>Declarative Security </li></ul></ul></ul><ul><ul><ul><li>Programmatic Security </li></ul></ul></ul><ul><ul><li>Confidentiality and Integrity </li></ul></ul><ul><li>EJB Security </li></ul><ul><ul><li>Authentication (JAAS) </li></ul></ul><ul><ul><li>Authorization </li></ul></ul><ul><ul><ul><li>Declarative Security </li></ul></ul></ul><ul><ul><ul><li>Programmatic Security </li></ul></ul></ul>Security
    • 15. J2EE <ul><li>Security Interoperability </li></ul><ul><ul><li>IIOP/SSL </li></ul></ul><ul><ul><li>CSlv2 </li></ul></ul><ul><li>Web Services Security </li></ul><ul><ul><li>End-to-End Security </li></ul></ul><ul><ul><li>XML Digital Signature and XML Encryption </li></ul></ul><ul><ul><li>SAML </li></ul></ul><ul><ul><li>WS-Security </li></ul></ul>Security
    • 16. J2EE <ul><li>Support distributed transaction </li></ul><ul><ul><li>Supports Flat transaction model </li></ul></ul><ul><ul><li>Does not supports Nested transaction model </li></ul></ul><ul><li>Provide ACID (Atomicity, Consistency, Isolation, and Durability) properties </li></ul>Transaction
    • 17. J2EE <ul><li>There are two types of transactions </li></ul><ul><ul><li>Container-Managed Transactions </li></ul></ul><ul><ul><li>Bean-Managed Transactions </li></ul></ul>Transaction <ul><li>Container-Managed demarcation </li></ul><ul><li>Bean-Managed demarcation </li></ul>Database A Database B Client EJB server Begin Commit Bean A Bean A Database A EJB server Database B EJB server Client Bean A Bean A Begin Commit
    • 18. .NET <ul><li>.NET is the Microsoft solution for Web services, the next generation of software that connects our world of information, devices, and people in a unified, personalized way </li></ul><ul><li>Supports multiple operating systems </li></ul><ul><li>Supports multiple programming languages. But you’ll have to use special .NET variants </li></ul><ul><li>Supported by one vendor </li></ul>
    • 19. .NET Framework Windows COM+ Services Common Language Runtime Base Class Library ADO.NET and XML ASP.NET/Web Forms Windows Forms Common Language Specification VB C++ C# JScript … Visual Studio.NET .NET Remoting
    • 20. .NET <ul><li>Consists of two components: </li></ul><ul><ul><li>The form with its controls (.aspx file) </li></ul></ul><ul><ul><li>The code behind it that handles events associated with the form's controls </li></ul></ul><ul><li>Code behind file can be written in any .NET languages (C#, VB.NET…) </li></ul>ASP.NET/Web Forms Web Form UI (aspx) Code behind Class System.Web.UI.Page Code behind association Inherits
    • 21. .NET <ul><li>Provides a unified programming model for standard Windows application development </li></ul><ul><ul><li>Window API </li></ul></ul><ul><ul><li>.NET Window Form </li></ul></ul>Windows Forms HWND hwndMain = CreateWindowEx( 0, &quot;MainWClass&quot;, &quot;Main Window&quot;, WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, (HWND)NULL, (HMENU)NULL, hInstance, NULL); ShowWindow(hwndMain, SW_SHOWDEFAULT); UpdateWindow(hwndMain); Form form = new Form(); form.Text = &quot;Main Window&quot;; form.Show(); How much simpler ?
    • 22. .NET <ul><li>Provides a hierarchy of classes to create UI components such as Forms, TextBoxes, Buttons,… </li></ul><ul><li>Any .NET language can use this collection of classes that make up the Windows Forms object model. </li></ul><ul><li>Fully supports and integrates with Web Services, ADO.NET, and the .NET Framework base classes. </li></ul>Windows Forms
    • 23. .NET <ul><li>Allows to instantiate components on remote computer and use them as local components </li></ul><ul><li>Communicate channels: HTTP or TCP </li></ul><ul><li>Deployment: Window form application, Console application, Dedicated window service, IIS (with ASP.NET) </li></ul>.NET Remoting Application Domain Application Domain Client Object Component Direct access to component Component Communication between AppDomains Proxy Channel
    • 24. .NET <ul><li>Allow access to software components through standard web protocols such as HTTP, SMTP,… </li></ul><ul><li>Base on XML and SOAP </li></ul><ul><li>Can be written in any .NET language (C#, VB.NET,…) </li></ul>XML Web Services Internet Search for Web Service functionality 1 2 3 4 Web Service Vendor WSDL File Web Service UDDI Registry Discovery Interface SOAP Messages Internet DISCO File
    • 25. .NET <ul><li>Provides consistent access to data sources such as SQL Server, Oracle, Access,... </li></ul><ul><li>Leverages Current ADO Knowledge </li></ul><ul><li>Supports the N-Tier Programming Model </li></ul><ul><li>Supports XML </li></ul>ADO.NET
    • 26. .NET <ul><li>The .NET Framework enables you to create components called serviced components , to access COM+ services </li></ul><ul><li>System.EnterpriseServices namespace provides classes, interfaces and attributes for communicating with Component Services </li></ul><ul><li>Component Services of COM+ </li></ul><ul><ul><li>Transactions </li></ul></ul><ul><ul><li>Queued Components </li></ul></ul><ul><ul><li>Security </li></ul></ul><ul><ul><li>JIT Activation </li></ul></ul><ul><ul><li>Object Pooling </li></ul></ul>COM+ (Serviced components)
    • 27. .NET <ul><li>Provide ACID properties </li></ul><ul><ul><li>A tomicity </li></ul></ul><ul><ul><li>C onsistency </li></ul></ul><ul><ul><li>I solation </li></ul></ul><ul><ul><li>D urability </li></ul></ul><ul><li>Serviced Components have the ability to participate in transactions by voting on the outcome of the operations </li></ul>Transaction
    • 28. .NET <ul><li>.NET Framework security </li></ul><ul><ul><li>Role-based security </li></ul></ul><ul><ul><li>Code access security </li></ul></ul><ul><ul><li>Code signing </li></ul></ul>Security What is the code Evidence-based authentication What does the code do Permission-based Authorization CAS Policy User Code Code Access Security Security Resources Privileged Operation Evidence
    • 29. .NET <ul><li>ASP.NET security </li></ul><ul><ul><li>Authentication </li></ul></ul><ul><ul><ul><li>Forms-based authentication </li></ul></ul></ul><ul><ul><ul><li>Windows authentication </li></ul></ul></ul><ul><ul><ul><li>Passport authentication </li></ul></ul></ul><ul><ul><li>Authorization and Impersonation </li></ul></ul><ul><ul><ul><li>URL authorization </li></ul></ul></ul><ul><ul><ul><li>Resource authorization </li></ul></ul></ul>Security
    • 30. .NET Security What is the code Evidence-based authentication Authenticated Caller’s Access token (or IUSR_Machine Access token) ASP Processes Original Caller Fixed proxy Identity Authorization Web permissions NTFS Permission IP Address Restriction Authentication Anonymous Basic Digest Integrated Certificate ASP.NET (aspnet_wp.exe) Authorization File Authorization URL Authorization .NET Roles Authentication Windows Forms Passport None HTTP Requests SSL 1 Web Server 2 3 5 6 4 Local or Remote Resource 7 Identity ASP.NET Security
    • 31. .NET Base Class Library System System.Data System.Web Globalization Diagnostics Configuration Collections Resources Reflection Net IO Threading Text Service Process Security OleDb Common SqlTypes SqlClient Runtime InteropServices Remoting Serialization Configuration SessionState Caching Security Services Description Discovery Protocols UI HTMLControls Web Controls System.Xml XPath Schema XPath Serialization System.Drawing Imaging Drawing2D Text Printing System.Windows.Forms Design Component Model
    • 32. J2EE Distributed System Swing JSP Servlet Browser HTTP EJB - Session EJB-Entity EJB-MDB JMS Java mail RMI/IIOP, SOAP Oracle Database MS SQL Database Data in XML Format JDBC/JDO
    • 33. .NET Distributed System Windows Forms ASP.NET/ Web Forms ASP.NET/ XML Web Services Browser HTTP Managed Classes (Base Class Library) COM+ DCOM (Serviced Components) .NET Remoting, SOAP Oracle Database MS SQL Database ADO.NET Data in XML Format
    • 34. J2EE vs. .NET Technologies Equivalences Technology J2EE .NET Technology Type of Technology Standard (Specification) Product Programming Language Java C#, J# , C++, VB.NET, Cobol Library Java API Based and Extended classes Run-time Environment JVM CLR Distributed Protocol RMI-IIOP, SOAP, CORBA DCOM, SOAP Platform Support Multiple Platforms Windows Presentation Tier Technologies Infrastructure Standard (Specification). There are several web servers IIS Programming Model JSP, Servlet, Swing ASP.NET, WebForms, WindowForms
    • 35. J2EE vs. .NET Technologies Equivalences Technology J2EE .NET Business Logic Tier Technologies Infrastructure EJB ( Session Bean, Entity Bean and Message Driven Bean). Provided by the server COM+. Provided by the Platform Asynchronous JMS MSMQ Distributed Transaction JTS MS-DTC Connectivity JDBC, JCA (Java Connector Architecture) ADO.NET, HIS (Host Integration Server) Naming and Directory Service JNDI(Java Naming and Directory Interface) ADSI (Active Directory Services Interface) Security JAAS, supported by the Server COM+ Security , Supported by platform
    • 36. J2EE vs. .NET Technologies Equivalences Technology J2EE .NET Other Technologies Web Services XML Web Services XML Web Services XML Parser JAXP Build-in
    • 37. J2EE or NET? Scorecard Criteria J2EE .NET Comments Easy of use (Development Environment) VB.NET and C# are easier to use than J2EE because of VS.NET Scalability Execute Java code on mainframe Single Language Multiple Platforms Java can run on many platforms Multiple Languages, Single platform VB, C#, J#, etc. all run in the same run-time environment Reliability VB/COM developed in 1993 (J2EE – 1999) Performance Both will perform equally well Speed of development Visual Basic code is easier to learn Reuse Deploy same code on multiple platforms and multiple projects Open Standard Java, JVM are open standards
    • 38. J2EE or .NET? J2EE .NET
    • 39. References <ul><li>Microsoft </li></ul><ul><ul><li>www.microsoft.com </li></ul></ul><ul><li>SUN </li></ul><ul><ul><li>www.sun.com </li></ul></ul><ul><li>IBM </li></ul><ul><ul><li>www.ibm.com </li></ul></ul><ul><ul><li>J2EE vs. .NET </li></ul></ul><ul><li>The Platform Wars: .NET vs. J2EE </li></ul><ul><ul><li>Brian G. Lyons, Number Six Software, Inc. </li></ul></ul><ul><li>J2EE vs. .NET </li></ul><ul><ul><li>Roger Sessions, ObjectWatch, Inc. </li></ul></ul>
    • 40. Appendix <ul><li>Session Beans: A session bean represents a single client inside the Application Server </li></ul><ul><ul><li>Stateful session beans: Can maintain a conversational state for the client </li></ul></ul><ul><ul><li>Stateless session beans: Does not maintain a conversational state for the client </li></ul></ul><ul><li>Message Driven Beans </li></ul><ul><ul><li>Allows J2EE applications to process messages asynchronously </li></ul></ul><ul><li>Entity Beans: An entity represents a business object and an in-memory view of persistent data (data in a database) </li></ul><ul><ul><li>Container-Managed Persistence: Declarative persistent </li></ul></ul><ul><ul><li>Bean-Managed Persistence: Programmatic persistent </li></ul></ul>J2EE-EJB
    • 41. Glossary Acronyms/ Abbreviations Definitions JTA Java Transaction API JAAS Java Authentication Authorization Service EJB Enterprise Java Bean JNDI Java Naming Directory Interface XML Extensible Markup Language XSL Extensible Style sheet Language XSLT XSL Transformation JSP Java Server Page JDBC Java Database Connectivity EIS Enterprise Information System DTO Data Transfer Object MVC Model View Controller JDO Java Data Object
    • 42. Glossary Acronyms/ Abbreviations Definitions WML Wap Markup Language OMG Object Management Group CORBA Common Object Request Broker Architecture RMI-JRMI Remote Method Invocation - Java Remote Method Protocol RMI-IIOP Java Remote Method Invocation over Internet Inter-ORB Protocol technology IDL Java Interface Definition language Windows DNA Microsoft Windows D igital inter N et Applications A rchitecture OMG Object Management Group CORBA Common Object Request Broker Architecture SOAP Simple Object Access Protocol JIT Just-In-Time MIME Multipurpose Internet Mail Extension

    ×