In it’s current issue the DOTNETPRO magazine published my recent article about developing interoperable Web Services with J2EE and .NET.
It’s worth a look. What else should I say?
Author: Wolfgang
!! New Phone Numbers !!
Due to a provider change my phone numbers have also changed.
Please update your contacts with the new numbers:
Phone: +49.(0)2151.3864844
Fax: +49.(0)2151.159404
Mobile: +49.(0)176.23207379
For a limited time you can reach me with the old numbers as well.
Thank you.
Getting Mobile
Yesterday I got my new XDA II PocketPC. It runs Windows Pocket PC 2003 Phone edition.
I’m impressed of the power and functionality of this device. I think there is no device on the market which comes close to it.
And the best is that It hosts the .NET Compact Framework. Together with a GPRS flatrate it is very suitable as device for webservice clients.
Tiger
The JSE1.5 Beta 1 has been released. The list of features is very promising.
The release will include a lot of things I appreciate very much in C#.
For instance:
Metadata
Generics
Boxing/Unboxing
Enums
Foreach equivalent
Formatted output
etc.
This release is a good example how competition drives innovation.
UML As Sketch
On his weblog Martin Fowler expressed an interesting opinion about Model Driven Architecture (MDA) and the use of UML.
He speaks out what I have experienced in a lot of projects. The model driven approach is heavyweight and often impractical.
One reason might be the lack of reliable and fast,handy tools especially when it comes to code generation, an other is the inaccuracy of UML in terms of programming languages.
Often this leads to a “overstereotyped” models which are almost useless outside the problem domain and for new team members as well. I’m curious about MDA will change that.
UML is great. I recommend to use it but mostly to communicate design ideas to others.
The rest of the documentation can be easily generated from the sourcefiles, e.g. with javadoc or C# xmldoc.
What is your experience?
QuickModeler V2.0 Released
Yesterday QuickModeler 2.0 was released.
This release contains a lot useful new features. The most demanded was multiple selection of model elements. It’s included now.
You feedback would be highly appreciated.
Back To The Office
This week I’m back to the office.
The end of the last year was very relaxing. I seized the opportunity to code a little bit.
Last year I wrote a VS.NET Add-In called QuickModeler, which allows to visualise arbitrary .NET code as a UML model. I improved it an the outcome is QuickModeler V2.0.
By the way – thank you for your feedback and suggestions. You’ll find some of them implemented in the new version.
I’m going to upload it at the end of the week so that it will be available for download next week.
Stay tuned.
Merry Christmas
Merry Christmas and a happy new year to all my colleagues, partners and friends.
I wish you all the best and look forward to meeting you again in 2004.
VC++.NET – The Glue To Integrate .NET and Java
Have you ever had the need for Java/.NET Integration ?
Although the main approach is web services interop, sometimes it’s necessary to do some lower level integration.
For example if you have a neat java library for instance for logging purposes which is tightly integrated in your application.
Why not use it within your .NET application as well ?
With VC++.NET and Java Native Interface (JNI) it’s not that complicated.
Just load the Java VM into the .NET process and call the Java methods with the help of unmanaged C++.
Below you can see an example of how to call the method
boolean MyLogger.log(String name)
which resides in C:\temp\mylogger.jar and is part of the package net.pleus. The class uses log4j.
#include “jni.h” // included in the jdk, link to jvm.lib as well
// configure Java VM
JavaVMOption options[3];
options[0].optionString = “-Djava.compiler=NONE”;
options[1].optionString = “-Djava.class.path=C:\\temp\\mylogger.jar;C:\\temp\\log4j.jar”;
options[2].optionString = “-verbose:jni”;
JavaVMInitArgs vm_args;
vm_args.version = JNI_VERSION_1_4;
vm_args.options = options;
vm_args.nOptions = 3;
vm_args.ignoreUnrecognized = JNI_FALSE;
// load Java VM
JavaVM* jvm;
JNIEnv* env;
JNI_CreateJavaVM(&jvm,(void **)&env, &vm_args);
// find class and method
jclass cls = env->FindClass(“net/pleus/MyLogger”);
jmethodID mid = env->GetStaticMethodID(cls,”log”,”(Ljava/lang/String;)Z”);
// call method
jstring name = env->NewStringUTF(“my message”);
bool res = env->CallStaticObjectMethod(cls,mid,name);
// cleanup
jvm->DestroyJavaVM();
The technology stack could be as follows:
Managed Code (C#, VB.NET) -> Hybrid C++.NET and JNI -> Java
I tried it out. It works very well (and fast).
The most difficult thing is to perform the type conversions and code the cumbersome signature descriptions.
The other way round (call .NET from Java) is also possible though it’s a little bit trickier.
Best Regards From ADO.NET
IBM and BEA announced the the new Service Data Object Specification (SDO).
It promises to simplify and unify several Java data access methods.
Most important it introduces support for disconnected data access scenarios.
Therewith it follows the same design principle as ADO.NET.
Below is a comparsion of the main classes (.NET – Java):
DataSet – DataGraph
DataTable – DataObject
DataAdapter – DataMediatorService
It seems that IBM/BEA favours an object centric approach whereas .NET uses a relational approach.
Interesting to see how .NET affects the J2EE development.
On the whole it’s great, as in the past nearly every enterprise level project created it’s own solution to cope with disconnected data structures.