Jim Fawcett CSE775 – Distributed Objects Spring 2012 Managed Environments Jim Fawcett CSE775 – Distributed Objects Spring 2012
Managed Environments .Net Common Language Runtime (CLR) Stack-based virtual machine Java Virtual Machine COM Run-time Support library and API on top of native API
Services Service CLR JVM COM RT Instantiation Yes yes Life-time mgmt. Garbage collect. Ref. Counting Error mgmt. Exceptions Error codes Reflection Object metadata Type library Interception With proxies COM+ proxies Isolation App. Domains, Sandbox Sandbox Apartments Component Strct. Available Required Object Model Full OO Sealed, weak Types Large type set Small type set Remote Comm. WCF Sockets, RMI DCOM Interoperation Other .Net Lang, Native, COM JNI Native, .Net Lang.
Language Facilities Facilities .Net Java COM Collections Generic, object Structs, safe arrays, BStrs Enumerators Yes Notifiers Delegates Roll your own Connection Pts Queries LINQ SQL, XML Proc. No GUI WPF Swing Copy Dev. Support Visual Studio, Eclipse Eclipse, NetBeans Active Template Library (ATL) Packaging Assemblies, Libs Packages, Jars component
Using AppDomains Effectively Cross Platform Java operates in all environments that supply a JVM – Windows, Linux, OSX .Net languages operate in all environments that supply a CLR Windows Linux and OSX via Mono – limited COM Windows only Using AppDomains Effectively
Suitable for System Programming Java Weak – manage memory & hardware only through JNI JVM was written in C++ .Net Languages C++/CLI & C++/CX – fully capable C++/CLI can call native C++ in same file C++/CX wraps native COM objects COM Fully capable but clumsy due to limited types Obviously works as much of Windows is COM
End of Presentation