Dynamic-4gl/web examples???
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Migration, Import/Export & Data Conversion, Java & JDBC Development
I have been charged with migrating an Informix-4gl application to the web. One of the options I am looking at is a Dynamic-4gl migration. Can anybody point me to a web-site that has an example of a D-4gl application being served up as either plain HTML, or through the Java client? Failing that, can anybody with D-4gl experience let me know how easy it really is (not what Informix says) to port an old Informix-4gl application. Are there any caveats that would make it harder than what Informix says? Does the resulting D-4gl application look like a good GUI application, or does it look like I-4gl trying to be GUI? Thank you in advance for any help you can give. Steve Harding
Steve Harding Netcom wrote in message <399080CE.82882FA9@ix.netcom.com>...
>I have been charged with migrating an Informix-4gl application to the
>web. One of the options I am looking at is a Dynamic-4gl migration.
>
>Can anybody point me to a web-site that has an example of a D-4gl
>application being served up as either plain HTML, or through the Java
>client?
>
Nope, I want to play with this so once this week's holiday is over...
>Failing that, can anybody with D-4gl experience let me know how easy it
>really is (not what Informix says) to port an old Informix-4gl
>application. Are there any caveats that would make it harder than what
>Informix says? Does the resulting D-4gl application look like a good
D4GL
a) makes sure that the right number of arguments are passed to and reurned
from functions AT COMPILE TIME. If you pass the wrong
number of arguments YOU CODE WILL FAIL TO COMPILE.
b) Using 4gl's status variable does not work. Use sqlca.sqlcode
instead
c) (Most recently found problem and we have been using D4GL
(actually 4js from www.4js.com but they are the same thing).
DECLARE my_cursor CURSOR FOR
SELECT x FROM my_temp TABLE
CREATE TEMP TABLE my_temp(...)
FOREACH my_cursor....
runs ok under normal 4gl
COMPILES but FAILS TO RUN (table does not exist error when
cursor is declared).
D4GL/4JS compiles to p-code (uses a runner if you need to link
C routines). The p-code is tiny 300 progs =
1Gb C4GL
<300Mb D4GL
Our 1Gb application binaries partitions now have 700Mb free!
Also the p-code is portable (one version for whatever operating
system.
For C code you add something like
x.c
...
..
#ifdef 4js
CFACE(my_func,<num args to pass>,<num args to return>)
#endif
and have a fglExt.c file which has an array of function name
int myfunct()...
something_array[] = {
{my_func,x,y}
}
something like that (you need to declare it TWICE in the fglExt.c
file and add one CFACE() call to the .c file. Urgh! Declare the
same link between 4js and C functions THREE times!!
Guess who did
something_array[] = {
{my_func,x,y}
{my_func,w,z}
}
instead of
something_array[] = {
{my_func,x,y}
{my_other_func,w,z}
}
and got a core dump. Core dumps do NOT contain a stack trace
similar to
my_func(..)
...
...
...
so this is very hard to trace.
[Guess who spent a day writing a test program to call all C functions
in the runner??
Compiling programs gives :-
module_1.42x
module_2.42x
my_prog.42r
and to run this use
my_runner my_prog.42r
my_prog.42r MUST be in the current directory! So cd $BINDIR
first!.
Library functions are loaded at runtime hence live and test systems
need separate library directories.
Overall it is a cool product. You can
a) kermit small executables/library functions to customers easily
b) update library functions on the fly and have all programs pickup
the new versions (even C functions by replacing the runner).
c) have one set of binaries for all platforms!
>GUI application, or does it look like I-4gl trying to be GUI?
Much more GUI-ish then you expect. One window per 4GL window
but you can only have one window active at a time. Buttons down the
right side of the screen replace function keys. Menus appear as
buttons in the window. Clicking on a field on the screen can either
a) execute AFTER FIELD on the old field you were in and
BEFORE FIELD on the field clicked on
b) execute AFTER FIELD on the old field you were in, AFTER FIELD
on any fields between the old and new field and BEFORE FIELD on the field
clicked on (Prefered option).
You can embed logos which are clickable to take you to a Website.
You can run Windows programs run within 4gl. Eg. Have HELP key
run a browser on a help file!
>
>Thank you in advance for any help you can give.
>Steve Harding
>
Steve Harding Netcom wrote: > I have been charged with migrating an Informix-4gl application to the > web. One of the options I am looking at is a Dynamic-4gl migration. > > Can anybody point me to a web-site that has an example of a D-4gl > application being served up as either plain HTML, or through the Java > client? [...] http://www.4js.com, I believe... -- Yours, Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h> Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN "I don't suffer from insanity; I enjoy every minute of it!"
In article <399080CE.82882FA9@ix.netcom.com>, srhardin@ix.netcom.com says... > I have been charged with migrating an Informix-4gl application to the > web. One of the options I am looking at is a Dynamic-4gl migration. > > Can anybody point me to a web-site that has an example of a D-4gl > application being served up as either plain HTML, or through the Java > client? www.falout.com, see Projects->App. Service Providing in tree menu. I run CLI-Java with 4Js Universal compiler, AKA D4GL, on my personal site. You can get a login and run them over the Internet yourself if you want. I don't remember seeing demo on 4Js site, but there must be useful info there for sure. -- Yours, Andrej Falout, http://www.falout.com ICQ 7628616 ++64.21.607517 #----------------------------------------------------------------- globals "std_disclaimer.4gl" Ask yourself just one question: ' Qu' m's se puede hacer y aprender ? - Propellerhead ReBirth RB-338 manual
I tried D4gl in HTML mode in version 2.1. It looks pretty bad. Do you guys know if the Java client looks any better? Thank you. "Steve Harding Netcom" <srhardin@ix.netcom.com> wrote in message news:399080CE.82882FA9@ix.netcom.com... > I have been charged with migrating an Informix-4gl application to the > web. One of the options I am looking at is a Dynamic-4gl migration. > > Can anybody point me to a web-site that has an example of a D-4gl > application being served up as either plain HTML, or through the Java > client? > > Failing that, can anybody with D-4gl experience let me know how easy it > really is (not what Informix says) to port an old Informix-4gl > application. Are there any caveats that would make it harder than what > Informix says? Does the resulting D-4gl application look like a good > GUI application, or does it look like I-4gl trying to be GUI? > > Thank you in advance for any help you can give. > Steve Harding >
"Edmond Ying" <edmond@redconnect.net> wrote: > I have been charged with migrating an Informix-4gl application to the > web. One of the options I am looking at is a Dynamic-4gl migration. Hmm. Unless you're really pressed for time I wouldn't recommend the HTML approach. First, you lose all of your BEFORE/AFTER field logic. Second, it looks kinda ugly (IMO anyway). Third, it doesn't work at all like a web-application is expected to so you use the real benefit of moving to HTML (ease of use). I haven't tried the Java client yet. > Failing that, can anybody with D-4gl experience let me know how easy it > really is (not what Informix says) to port an old Informix-4gl > application. Are there any caveats that would make it harder than what > Informix says? Actually, its surprisingly nice. Our app is ~3 million lines of 4GL code, and it went over in a couple of man-months. Barring a few bugs that are being worked out in D4GL, the main issue was that, like the v4- v6 transition, the D4GL compiler catches some bugs that the C4GL compiler let slide. Its been a good exercise in correctness and stability even for our C4GL customers. > Does the resulting D-4gl application look like a good > GUI application, or does it look like I-4gl trying to be GUI? Hmm. A bit of both. Realistically, I was impressed by the result considering the relatively small development effort we've had to put in on this end. Some tips: Use v.3 -- its much better than v.2. Plan on using the p-code version, not the C version. Compilation and execution is a little different -- we had a nice abstract build system so it wasn't a huge effort, but I ended up autocreating a set of shell scripts with the .4ge suffix so we didn't have to rewrite any program execution logic. Make sure that all of your .4gl files are uniquely named. Yeah, its a little weird but they have to be unique in your entire system (or else your execution phase gets messy). C Code in libraries is no big deal. C code linked in locally to your executables is harder to deal with. Those modules on our system were all non-UI so we're still requiring C4GL and building them traditionally. And a question: Has anyone figured out how to change the foreground color (not background) in a highlighted field (ie: currently being edited) that has been displayed REVERSE from the .4gl code in the Windows client (1.484)? -Richard Stanford richard_stanford@exe.com Sent via Deja.com http://www.deja.com/ Before you buy.