It pro dev_birbilis_20101127_el

Click here to load reader

  • date post

    25-Jun-2015
  • Category

    Technology

  • view

    632
  • download

    1

Embed Size (px)

description

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

Transcript of It pro dev_birbilis_20101127_el

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

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

,
Java
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, Java.net Kenai Java.net

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
JavaBeans:
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)
Events
Java: tightly-coupled (base classes / abstract methods), callback interfaces
VB: method signatures (WithEvents)
Object Pascal / Delphi: method variables
C#: delegates
11. JUMP & J# (Microsoft)
JUMP
Import Java projects Visual Studio
Java C#
J#
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
jacoZoom
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)
COMConnect
Java COM/.NET stateful TCP, low latency
Jni4net (OpenSource)
intra-process, object oriented, JNI implementation
JNBridgePro
Visual Studio & Eclipse plugins, shared memory, sockets, network binary protocol, HTTP/SOAP
EZ JCom
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. IKVM.net (Jeroen Frijters)
Java (JVM):
Microsoft .NET Framework
Mono
:
Java Virtual Machine .NET
Java class libraries .NET
Java -.NET
45. IKVM.net
Java Virtual Machine (JVM)
Java .
.NET Java
46. IKVM.net
Java Virtual Machine (JVM)
java -jar myapp.jar
ikvm -jar myapp.jar
47. IKVM.net
Java .
ikvmc= Java bytecode .NET IL
ikvmc -target:library mylib.jar
mylib.dll
.. Apache FOP= XSL-FOprocessor (XML PDF)
48. IKVM.net
.NET Java
ikvmc= Java bytecode .NET IL
ikvmc -target:exe myapp.jar
myapp.exe
49. IKVM.net
.NET API Java(IKVM.net JVM)
ikvmstub = Java stubs .NETAPI
ikvmstub mscorlib.dll
mscorlib.jar
ikvmstub c:libmylib.dll
50. IKVM.net /
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;
Localization
Mime types
Portlet modes (edit, help, view, custom)
Window states (minimized, maximized, solo, normal)
56. Web Services for Remote Portlets
portlets;


(scalability)
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
portal
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)

  • http://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Java

Anders Hejlsberg (Wikipedia)

  • http://en.wikipedia.org/wiki/Anders_Heljsberg

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

  • http://www.crn.com/news/channel-programs/18806978/sun-drops-iso-java-standards-effort-for-good.htm

Oracle vs Google Android (Dalvik VM)

  • http://www.businessweek.com/news/2010-08-13/oracle-says-google-android-violates-its-java-patents.html

(2)
Java Native Interface (JNI)

  • http://download.oracle.com/javase/6/docs/technotes/guides/jni/spec/jniTOC.html

JACOB

  • http://sourceforge.net/projects/jacob-project

jacoZoom

  • http://www.infozoom.de/en_jacoZoom.shtml

J-Integra

  • http://j-integra.intrinsyc.com

(3)
COMConn