INFORMIX-4GL AND JAVA
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Java & JDBC Development
Hi, How can i, used my informix-4gl functions inside a java program. I supposed, i need to compile my informix-4gl functions in C with c4gl, but after i don't know what to do. Then , i can develop a class accessed with RMI, and i don't have to rewrite all my code. Thanks for your answers.
Jamel SMATI wrote: > > Hi, > > How can i, used my informix-4gl functions inside a java program. > I supposed, i need to compile my informix-4gl functions in C with c4gl, > but after i don't know what to do. > > Then , i can develop a class accessed with RMI, and i don't have to > rewrite all my code. > > Thanks for your answers. There are so many variables here, it's really quite hard to know. What platform/version do you run on? Is there a JVM for your platform? Anyway you could rewrite the code, you could buy a tool which (claims) to convert 4GL to Java or you could compile to c and then hack the c functions round to UDOs in version 9.xx or something like that, but that would entail a lot of manual intervention. What is the size of your 4GL code base? IMHO in practice you would finish up doing a lot of rewriting anyway. The user interface might not work so well as 4GL converted to RMI calls. Migrating from 4GL to Java is never going to be painless. Can you use D4GL as a stop-gap? -- Andrew Pearson: "exactly what the web needs less of".
Andrew Pearson a écrit : > Jamel SMATI wrote: > > > > Hi, > > > > How can i, used my informix-4gl functions inside a java program. > > I supposed, i need to compile my informix-4gl functions in C with c4gl, > > but after i don't know what to do. > > > > Then , i can develop a class accessed with RMI, and i don't have to > > rewrite all my code. > > > > Thanks for your answers. > > There are so many variables here, it's really quite hard to know. > What platform/version do you run on? Is there a JVM for your platform? > My platform is HP-UX 10.20 with INFORMIX DYNAMIC SERVER 7.30 and INFORMIX-4GL 7.20. we have JDK 1.1.8, i download and we have not yet installed. > > Anyway you could rewrite the code, you could buy a tool which > (claims) to convert 4GL to Java or you could compile to c and > then hack the c functions round to UDOs in version 9.xx or > something like that, but that would entail a lot of manual > intervention. What is the size of your 4GL code base? > My code is small, only 4 functions, because the project is to used de business logic to create orders and consult stock items from the web. We have a very large application, but for this need, it's only a part of the business logic we want to put inside a java class. I know write a c function inside a 4gl program, but put a 4gl function ( translate in c ) inside a c function called with JNI from a java class, i don't know. > > IMHO in practice you would finish up doing a lot of rewriting > anyway. The user interface might not work so well as 4GL > converted to RMI calls. Migrating from 4GL to Java is never going > to be painless. Can you use D4GL as a stop-gap? > > -- > Andrew Pearson: "exactly what the web needs less of".
Jamel SMATI wrote: > > Andrew Pearson a écrit : > > > Jamel SMATI wrote: > > > > > > Hi, > > > > > > How can i, used my informix-4gl functions inside a java program. > > > I supposed, i need to compile my informix-4gl functions in C with c4gl, > > > but after i don't know what to do. > > > > > > Then , i can develop a class accessed with RMI, and i don't have to > > > rewrite all my code. > > > > > > Thanks for your answers. > > > > There are so many variables here, it's really quite hard to know. > > What platform/version do you run on? Is there a JVM for your platform? > > > > My platform is HP-UX 10.20 with INFORMIX DYNAMIC SERVER 7.30 and > INFORMIX-4GL 7.20. > > we have JDK 1.1.8, i download and we have not yet installed. > > > > > Anyway you could rewrite the code, you could buy a tool which > > (claims) to convert 4GL to Java or you could compile to c and > > then hack the c functions round to UDOs in version 9.xx or > > something like that, but that would entail a lot of manual > > intervention. What is the size of your 4GL code base? > > > > My code is small, only 4 functions, because the project is to used de > business logic > to create orders and consult stock items from the web. > > We have a very large application, but for this need, it's only a part of the > business logic we want to put inside a java class. > > I know write a c function inside a 4gl program, but put a 4gl function ( > translate in c ) inside a c function called > with JNI from a java class, i don't know. > As an aside, I'm sure that you know that you will have to upgrade soon, because Informix are moving IDS 7.2x to category 4 support. Since there is not a large amount of code to be migrated (I'm guessing the the rest of the large application stays as server-side 4GL) it probably makes more sense to re-write the 4 key functions in Java and use them natively from your Java intrface. Otherwise you would have to look at buying extra products to help you with the RMI calls to server side c functions. Are you expecting a high volume of calls to these functions from web users interacting with your DB? You probably want to avoid invoking too many processes on the server side as this will hit performance as otherwise you could wrap the 4GL function in a small executable and call it from an SP. But you really will have to think seriously about upgrading to a newer version of Informix, and you might find 9.21 has something useful to offer you (JVM, web data blade,...) -- Andrew Pearson: "exactly what the web needs less of".