Your SlideShare is downloading. ×
J2EEvs.NET
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

J2EEvs.NET

721
views

Published on

This presentation gives an idea about comparison of two different software platforms.

This presentation gives an idea about comparison of two different software platforms.

Published in: Technology

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
721
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
38
Comments
0
Likes
1
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

Transcript

  • 1. J2EE vs .NET Presentation by(  ): Saloni Tyagi E-Mail: saloni_tyagi2007@yahoo.com
  • 2. Agenda
    • Platform and Profile
    • Comparison
      • Layer-by-Layer comparison of the infrastructures
    • Summary
  • 3. Platform and Profile
    • There are the following variants of Java
      • JavaCard
      • J2ME (Java 2 Platform Micro Edition)
      • J2SE (Java 2 Platform Standard Edition)
      • J2EE (Java 2 Platform Enterprise Edition)
  • 4. .NET framework
    • . NET Universe
      • .NET framework for Standard
    • and enterprise
      • .NET Compact framework
    • Consistent Programming model
    • Cross platform support
    • Language interoprability
    • Automatic management of
    • resources
    • Ease of deployment
  • 5. OPERATING SYSTEM HARDWARE COMMON LANGUAGE RUNTIME(CLR) .NET FRAMEWORK BASE CLASS LIBRARY WINDOWS FORMS ASP.NET CONSOLE ADO.NET .NET FRAMEWORK CLASS LIBRARY COMMON TYPE SYSTEM COMMON LANGUAGE SPECIFICATION C# VB.NET VISUAL C++ OTHERS.. WINDOWS PRESENTATION (WPF) WINDOWS COMMUNICATION (WCF) WINDOWS WORKFLOW (WWF) WINDOWS CARDSPACE LINQ ASP.NET 3.5 ADO.NET ADDITIONAL ENHANCEMENTS.. . NET 3.0 . NET 3.5 Visual Studio.NET .NET framework 2.0 and SP1
  • 6. Layer-By-Layer Comparison
  • 7. The Runtime System
  • 8. Java Virtual Machine
    • The JVM is intended for Java and interprets Java Byte Code.
    • Just-in-Time compilers exist for different environments and OSs
    Java Compiler CLASS- Files Classloader/ Verifier JIT Native Code Interpreter Garbage Collection, Security Manager‘ Multithreading, ...
  • 9. .NET Runtime
    • Common Language Runtime (CLR)
    • It is intended for any language compiled to the MSIL
    • Provides integration for several languages
    C# VB.NET C++ Perl Compiler MSIL + Metadata Loader/ Verifier JIT Managed Code Execution Garbage Collection, Security, Multithreading, ...
  • 10. Commonalities and Differences
    • Commonalities:
      • Basic concepts are similar
    • Differences:
      • Java is intended for interpretation
      • Java allows for custom class loaders and security managers
      • .NET CLR provides a command set that also supports functional languages
  • 11. The Object Model
  • 12. Object Model (Java)
    • Java has primitive types and classes.
      • No automatic boxing/ unboxing
    Types Primitive Types Reference Types Interfaces Arrays Classes
  • 13. java.lang.Object
    • The “Mother of all Java classes“
    public class Object { public Object(); public boolean equals(Object obj); public final Class getClass(); public int hashCode(); public final void notify(); public final void notifyAll(); public String toString(); public final void wait() throws InterruptedException; public final void wait(long timeout) throws InterruptedException; public final void wait(long timeout, int nanos) throws InterruptedException; protected Object clone() throws CloneNotSupportedException; protected void finalize() throws Throwable; }
  • 14. Object Model (.NET)
    • In .NET, everything is an object
    Types Value Types Reference Types System Value Types User Value Types Enumerations Interfaces Pointers Self-describing Types Arrays Classes Delegates Boxed Values User-Defined
  • 15. System.Object
    • The “mother of all .NET classes“
    public class Object { public virtual int GetHashCode(); public virtual bool Equals(); public virtual String ToString(); public static bool Equals(object a, object b); public static bool ReferenceEquals(object a, object b); public Type GetType(); protected object MemberWiseClone(); protected virtual Finalize()´; }
  • 16. Important Base Classes No big conceptual differences here. Java.net: Sockets, URL, ... System.Net: Connection, HttpWebRequest, ... Communication java.util: Lists, Maps, Sets, Trees, Vectors System.Collections: ArrayList, BitArray, Maps, Queue, List, Stack Container SWING, AWT Windows.Forms Web.Forms GUI Java .NET
  • 17. Multithreading in .NET and Java
    • .NET:
      • .NET uses delegates for multithreading
      • There are monitors for synchronization
    • Java :
      • In java there is a class „Thread“
      • For synchronization there is synchronized keyword
  • 18. Deployment
  • 19. Java JAR files
    • .jar files are similar to .NET‘s assemblies
      • They can be shared or private
      • They can be signed
    • They contain
      • types
      • resources
      • metadata in manifest file
  • 20. Assemblies in .NET
    • Types:
    • Shared Assemblies
      • They are signed by a key
      • They are versioned!!
    • Private Assemblies
      • private to client
      • Avoid version problems .
    Menifest Resources metadata TYPE1 IL CODE TYPE2 IL CODE TYPE3 IL CODE
  • 21. Commonalities and Differences
    • Commonalities:
      • Assemblies and JAR files provide “deployment“ components
    • Differences:
      • Much better versioning support in .NET (side-by-side execution)
  • 22. Database Access in Java
    • Java provides JDBC to access relational data
    ODBC DB ODBC Driver JDBC/ ODBC Bridge Driver Manager Connection Statement Prepared Statement Callable Statement Resultset Application
  • 23. Database Access in .NET
    • In .NET there is ADO.NET
      • “ connectionless”
    Data Source DataSetCommand Command Connection DataReader DataSet Client Managed Provider
  • 24. ADO.NET
    • ADO.NET provides way to acess
      • XML data
      • Relational and application data
    • ADO.NET architecture
      • Disconnected
  • 25. Commonalities and Differences
    • Commonalities:
      • Decoupling of the concrete data model and the user
    • Differences:
      • JDBC has a more relational flavor,ADO.NET uses XML
      • JDBC is connection oriented, ADO.NET always works non-connected, or offline
      • .NET DataSets are a kind of In-Memory-Database-Cache.
  • 26. Web
  • 27. Java Server Pages and Servlets
    • Java also allows for server-side scripting
      • JSPs are based on Servlets
    Web Server Client (1) get a.jsp (2) process JVM JSP Other Components Database (4) result (5) HTTP file Servlet (3) gen. Servlet Servlet Impl.
  • 28. ASP.NET (Server-Side Scripting)
    • ASP.NET Architecture:
    IIS 5 Web Server Client (1) get a.apx (2) process .NET Engine .NET Assembly Other Assemblies Database (3) result (4) HTTP file
  • 29. Login Example JAVA LOGIN .NET LOGIN
  • 30. .NET and/or Java ?
    • .NET is a product, Java and J2EE is a specification
    • Java should be used for:
    • real big systems
    • Platform independence
    • More scalability
    • .NET should be used for:
    • Window application and GUI
    • Language indepedence
  • 31. Questions?
    • …..
  • 32. The End Thank you !!

×