It pro dev_birbilis_20101127_el

Click here to load reader

  • date post

  • Category


  • view

  • download


Embed Size (px)


Java ...η ζωή μετά - Επαναχρησιμοποίηση Κώδικα και Δεξιοτήτων στον κόσμο του .NET / παρουσίαση στο ITProDevConnections 2010 -

Transcript of It pro dev_birbilis_20101127_el

  • 1. Life after Java (... )
    Reusing code and skills in a .NET world

Java- OOP vs
Java vs C#
Components & Controls vs JavaBeans
PME (Property Method Event) model
Java COM bridges
Web Services
WSRP : Web Services for Remote Portlets
3. Java OOP
, , , ...

4. Java
Java 1.x command line, AWT Applets
Java 1.2, 1.3, = Java 2 (JFC/Swing, )
JavaSE (= Standard Edition Desktops)
JavaEE (= Enterprise Edition Servers)
JavaME (= Micro Edition Mobiles)
(Re)focus JavaFX (Java vs JavaScript)
5. Java;

Sun Microsystems Oracle
JDeveloper vs NetBeans IDE
Java Cloud, Kenai

Sun vs Microsoft (MSJVM)
Oracle vs Google (Android Dalvik VM)
(ISO pull-out)
6. & :


7. Java vs C#
Anders Hejlsberg
Turbo Pascal
chief architect Delphi
J++, WFC (Windows Foundation Classes)
lead architect C#
LINQ (Language Integrated Query)
C# = Java + Object Pascal (Delphi) + VB ++
8. Components
Unstructured Data
Record = Structured, Addressable (Name, Pos) Data
Object = Record + Methods to manipulate its data
Component = Object + PME + Resources (Packaging)
Agent = Component + (Internal) Logic / Program Loop
9. Controls / Widgets
Control / Widget = User Interface Component
Components (non visible)
Controls ( JFC/Swing /Model-ViewController [M-VC])
Enterprise JavaBeans COM+ components ( JavaBeans) J2EE
10. PME (Property-Method-Event)
Properties (get/set accessors, metadata)
Methods (OOP)
Java: tightly-coupled (base classes / abstract methods), callback interfaces
VB: method signatures (WithEvents)
Object Pascal / Delphi: method variables
C#: delegates
11. JUMP & J# (Microsoft)
Import Java projects Visual Studio
Java C#
Java compiler IL code Java bytecode
Java datatype boxing
Java 1.x class library, Swing & Collections API
Visual Studio 2005
12. Java COM/.NET bridges (1)
JACOB (OpenSource)
COM Automation Java JNI wrappers
ActiveX Controls / Servers ([D]COM / Automation)
J-Integra .COM
DCOM wire protocol (ORPC) pure Java
J-Integra .NET
.NET Remoting wire protocol pure Java, Visual Studio & Eclipse plugins
13. Java COM/.NET bridges (2)
Java COM/.NET stateful TCP, low latency
Jni4net (OpenSource)
intra-process, object oriented, JNI implementation
Visual Studio & Eclipse plugins, shared memory, sockets, network binary protocol, HTTP/SOAP
JavaCOM/.NET, drag-drop Swing components
14. Java COM/.NET bridges (3)
Java Plug-in (JavaBeans Bridge for ActiveX)
Sun/Oracle Java VM, Web Browser integration, JavaBeans ActiveX controls (typelibrary)
Java C# Bridge (OpenSource)
Serlializing/DeserlializingJava - C# , C# generic JavaObject query
Caffeine (OpenSource)
Hosting JVM .NET Runtime,JNI OOP wrapper
R-JAX (pioneering, RMI/HTTP, obsolete)
15. JNBridgePro Call Java from .NET
16. JNBridgePro Call Java from .NET (1)
17. JNBridgePro Call Java from .NET (2)
Start Proxy Generator
18. JNBridgePro Call Java from .NET (3)
Edit Classpath
19. JNBridgePro Call Java from .NET (4)
Class Path Entries
20. JNBridgePro Call Java from .NET (5)
Load Classes
21. JNBridgePro Call Java from .NET (6)
Load Classes Progress
22. JNBridgePro Call Java from .NET (7)
Choose Proxies
23. JNBridgePro Call Java from .NET (8)
Generate Proxies
24. JNBridgePro Call Java from .NET (9)
Use the Proxies
25. JNBridgePro Call Java from .NET (10)
Call Java Methods
26. JNBridgePro Call Java from .NET (11)
Run the Program
27. JNBridgePro Call Java from .NET
Visually generate proxies: allow .Netaccess Java classes
Link .NET proxy assembly to .NET development project (Add Reference)
Write .NET code to access Java classes(with IntelliSense)
Edit configuration - specify communications mechanism (from in-process on same machine to cross-network)
Run integrated .NET and Java code (managed lifecycles)
28. JNBridgePro Call .NET from Java
29. JNBridgePro Call .NET from Java (1)
30. JNBridgePro Call .NET from Java (2)
Start Proxy Generator
31. JNBridgePro Call .NET from Java (3)
Add Assembly
32. JNBridgePro Call .NET from Java (4)
Assembly List Entries
33. JNBridgePro Call .NET from Java (5)
Load Classes
34. JNBridgePro Call .NET from Java (6)
Load Class Progress
35. JNBridgePro Call .NET from Java (7)
Choose Proxies
36. JNBridgePro Call .NET from Java (8)
Generate Proxies
37. JNBridgePro Call .NET from Java (9)
Use the Proxies
38. JNBridgePro Call .NET from Java (10)
Call .NET Objects
39. JNBridgePro Call .NET from Java (11)
Run the Program
40. JNBridgePro Call .NET from Java
Visually generate proxies: allow Java access .NETclasses
Reference Java proxy .JAR file from Java development project (place in build CLASSPATH)
Write Java code to access .NET classes
Edit configuration - specify communications mechanism (from in-process on same machine to cross-network)
Run integrated .NET and Java code (managed lifecycles)
41. JNBridgePro Visual Studio plugin
42. JNBridgePro Eclipse plugin
43. JNBridgePro Communications
44. (Jeroen Frijters)
Java (JVM):
Microsoft .NET Framework
Java Virtual Machine .NET
Java class libraries .NET
Java -.NET
Java Virtual Machine (JVM)
Java .
.NET Java
Java Virtual Machine (JVM)
java -jar myapp.jar
ikvm -jar myapp.jar
Java .
ikvmc= Java bytecode .NET IL
ikvmc -target:library mylib.jar
.. Apache FOP= XSL-FOprocessor (XML PDF)
.NET Java
ikvmc= Java bytecode .NET IL
ikvmc -target:exe myapp.jar
ikvmstub = Java stubs .NETAPI
ikvmstub mscorlib.dll
ikvmstub c:libmylib.dll
50. /
Mono (OpenSource .NET Novell)
MonoDevelop (IDE)
Ant (task ikvmc)
Jar2ikvmc( JAR)
51. IKVM.netintegration
Ant task ikvmc

52. IKVM.netintegration
Jar2ikvmc( JAR)
jar2ikvmc.exe JFreeChart JFreeChart2Net.cmd
ikvmc swtgraphics2d.jar -target:libraryikvmc servlet.jar -target:libraryikvmc junit.jar -target:libraryikvmc jcommon-1.0.10.jar -target:libraryikvmc gnujaxp.jar -target:library
ikvmc itext-2.0.2.jar -target:library -r:gnujaxp.dllikvmc jfreechart-1.0.6.jar -target:library -r:jcommon-1.0.10.dll
->-r:servlet.dll -r:gnujaxp.dll
53. Web Services
Restlet (Java web framework)
Expose/Consume RESTful web APIs
Java Web Services Stack (Metro)
JAX-WS (Java API for XML Web Services)
JAXB (Java Architecture for XML Binding)
WSIT (Web Services Interoperability Technologies [aka Project Tango])
WSIT (Tango) WCF (Indigo)
54. Web Services for Remote Portlets
Portlet = , markup, portals
WSRP = web services .
content & apps: discoverable & pluggable
55. Web Services for Remote Portlets
WSRP Web Services;
Mime types
Portlet modes (edit, help, view, custom)
Window states (minimized, maximized, solo, normal)
56. Web Services for Remote Portlets

57. Web Services for Remote Portlets
WSRP Producer
Web Service
1 Portlets
WSRP interfaces/operations
runtime (container) deploying/management 1 portlet
58. Web Services for Remote Portlets
WSRP Consumer
Web Service
WSRP web services producer
portlets Producers
59. Web Services for Remote Portlets
Producers (.NET WSRP)
NetUnitySharePoint WSRP Producer
Oracle WebCenter .NET Accelerator
Consumers (WSRP .NET)
Microsoft WSRP Toolkit - SharePoint 2007
NetUnity WSRP Consumer for SharePoint
NetUnity WSRP .NET Consumer
60. (1)
C# Java (Wikipedia)


Anders Hejlsberg (Wikipedia)


Java ISO pull-out (ECMA fast track to ISO)


Oracle vs Google Android (Dalvik VM)


Java Native Interface (JNI)