none
Visual Basic + Java + Access

    Question

  • To All,

    I am researching a probable upcoming project.  I am likely to need to refactor an existing MS Access application into one that includes VB and Java sections.  Since this is a refactor of an existing (and running) application, I prefer to do it in sections over a period of time.  Eventually no Access will be left and all of it will be VB and Java.  The data will be ported into Oracle.  The application is not trivial and it has grown to exceed Access's capabilities.

    My question is -  what tricks exist that can allow these three languages to call each other.  I have never done anything like this before.  Am I stuck with components or JNI?

    If this can't be done easily, I'll have to use plan B -- a comprehensive rewrite, all of it in Java.

    Thanks for your input.

    Dave

     

    Wednesday, May 17, 2006 5:21 PM

Answers

  • Well Dave in that case as spotty mentioned in his post, if you are going to use Microsoft based technologies for development stick to it, I have been involved with VB apps talking to Java based COM classes but it ain't pretty at all. So if you are considering Java go all Java if your department prefers that platform. And if you still want the app to be developed using the 2 languages i.e. Java and VB my suggestion would be to use VB on the front end if its a windows based app and use Java to write web services and as far as pure OOAD is concerned the frameworks and platforms of both of these languages are totally different, they can in theory talk with each other using each others classes, but in reality getting it to work is not a trivial task at all and again it would all depend on the architecture of the application also, anyways I hope I was more clear in my response.

    Amit

    Friday, May 19, 2006 2:09 AM

All replies

  • Dave,

                Is using Java a must? You could rewrite the whole app in VB and have the backend database as Oracle, which would be a productive path than going the Java way from Access as the Access code will be VBA and you will feel right at home porting from VBA to VB. You can use the Oracle OLEDB driver to interact with Oracle directly from VB (if using VB 6). Or if you are planning for VB.Net then you can use the OracleClient of ADO.Net to talk to Oracle. Let me know what you think.

    Amit

    Wednesday, May 17, 2006 5:36 PM
  • Amit,

    Thanks for your reply. 

    Java is preferable because it is the preference of my department.  On the other hand it is not carved in stone that VB is out of the question.  It is really early in the process and I am only looking at options at this point.  I haven't really started any of it.

    Some of it will depend on how hard it is to integrate the languages - which was my original question.

    The point of integrating the languages comes from some recent OOAD class work I've done.  The section on refactoring a complex application suggested segmenting it and reconstructing it piecemeal while using Adapters to spoof the remaining old code into working with the new.  This project seemed like a possible use for that approach.  But the MS Access injects a language/platform change into the analysis.  I am aware that from a pure OOAD perspective I am jumping the gun for even considering language at this point.  Old habits die hard I guess...

    Thanks,

    Dave

    Thursday, May 18, 2006 6:48 PM
  • VB.Net plays nicely with other microsoft language and can use components written in other languages through technology such as .NET Remoting, COM etc.   but Java is not a MS language.   J++ is  but I would assume you are talking Java from Sun or a vendor like that.

    If your Java can produce COM components, Web Services or a compatible technology to communicate between the components then you can develop you components in whatever language of choice you use.     COM , .NET Remoting and Web services are three good choices for .NET languages.    There are performance and compatibility issues with all of these technologies which are well documented online and you should look at to find which is most suitable for you in terms of the size and type of your application.

    Personally I'd use a single language for the development and VB or C# are the two obvious choices from Microsoft.   Trying to do a mixture of languages results in probably a more complex development as your using multiple languages - so developers have to keep swapping between the two.  

    So is it possible to do write applications using a mixture of languages from different vendors - sure !!!!   Is it something that you should do thinking everything will work seamlessly - probably not.   Will it create more maintenance/ development issues mixing multiple vendors - almost certainly.

     

     

    Thursday, May 18, 2006 11:08 PM
  • Well Dave in that case as spotty mentioned in his post, if you are going to use Microsoft based technologies for development stick to it, I have been involved with VB apps talking to Java based COM classes but it ain't pretty at all. So if you are considering Java go all Java if your department prefers that platform. And if you still want the app to be developed using the 2 languages i.e. Java and VB my suggestion would be to use VB on the front end if its a windows based app and use Java to write web services and as far as pure OOAD is concerned the frameworks and platforms of both of these languages are totally different, they can in theory talk with each other using each others classes, but in reality getting it to work is not a trivial task at all and again it would all depend on the architecture of the application also, anyways I hope I was more clear in my response.

    Amit

    Friday, May 19, 2006 2:09 AM
  • Well said Amit !!!

    It can be done but it wont be particularly pretty.

     

    Friday, May 19, 2006 2:14 AM
  • Amit & Spotty,

    Thank you both.  What you said is what I was afraid of.  Two languages sounds like a huge violation of the Keep It Simple rule.  Even it it does make the architectural change somewhat easier.

    You have given me plenty to think about.

    Thanks.

    Dave

     

    Monday, May 22, 2006 5:55 PM