Home » Developer & Programmer » Forms » Forms Code  () 1 Vote
Forms Code [message #122714] Wed, 08 June 2005 02:56 Go to next message
doyyan
Messages: 2
Registered: June 2005
Junior Member
We are moving to Forms 9i, ie a shift from Client Server to 3 Tier and have the following doubts, hope someone has the answers?

1) Should ALL code in Forms be stored in server side programs, ie each Trigger simply has a call to a Packaged Procedure/Function.

2)Although code in Forms are compiled, do they get Re-Parsed (Hard) a Form is first invoked for the day. The reason is, since we store the .FMBs in the Filesystem compiled, there is no way for Oracle to know its dependencies have changed to invalidate the PL/SQL. Or is it?

2b)In the 9iAS, is it true every time a trigger is run, its code is actually loaded to the Shared Pool for reuse.

3)Should ALL forms have Blocks based on Procedures, or only the ones which do a lot of Post/Pre DML (Insert,Query,Update,Delete), to reduce Network Traffic?
Re: Forms Code [message #123539 is a reply to message #122714] Mon, 13 June 2005 21:58 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
From which version are you migrating - 4.5, 5, or 6?

You CAN leave the code where it is currently stored.

I don't understand what you are trying to achieve in question 2. As a rule for 9i you should remove all cyclic calls from the plls, then compile all plls, then all menus, then all the forms. I don't see the use in recompiling a form on the fly.

Question 2b) I could find out, but what's the problem if it is loaded for re-use?

The advantage of having blocks based on procedures is that if you use Designer to create the form then you can get designer to create the archive table and table API (procedures) for you. Also some people like to base their blocks on procedures instead of views because of the problems associated with updating through views in older version of Oracle data base.

If you are doing a _migration_ versus a _conversion_ then save yourself a lot of testing pain by just migrating the existing application. You will have enough problems to solve without worrying about rewriting the old style code.

David
Re: Forms Code [message #123849 is a reply to message #122714] Wed, 15 June 2005 02:34 Go to previous messageGo to next message
doyyan
Messages: 2
Registered: June 2005
Junior Member
Martin,

Thanks for your reply.

We are migrating from Forms 5->6->9.


Thanks for your answer to 1), but what I wanted to know was because the .FMB files are in the filesystem, as opposed to server side code like Packages/Procedures, what if one of the Oracle objects in a .FMB file had changed. So does Oracle always re-parse the whole code of a Forms trigger text just to make sure everything is OK?

2) Question 2b was about if concurrent users were using the same .FMB, would the PL/SQL Forms trigger text be loaded onto the 9iAS server so that there is code is loaded just once and re-used

3) Here's a more interesting question:

Lets say I have a web forms application which has been called and executes a list of triggers before the cursor becomes stationery at an item awaiting user input.

Say, it does a pre-form, when-new-form-instance, when-new-block, when-new-item (perhaps even a query). Important no interaction occured or was necessary till its station stop.

Now, was there just ONE network comm between Client PC and AS or was there one for each trigger that was fired. Reason for ask, is there a special optimisation in web forms which says "I know I don't have to stop till I execute all triggers up to first cursor stop point, so why not save Net by doing all at
once and transporting output to PC?"


4)Is this situation different if there were Post-Query triggers in a Block that is currently executing a query, as that sounds logical. Because after each record arrives at PC, maybe the Post-Query does something brand new that needs to be reprocessed, say change a display etc?



Re: Forms Code [message #123852 is a reply to message #123849] Wed, 15 June 2005 02:49 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
1) If the FMB has been changed then you will have compiled/generated a new FMX. Therefore, no problem, the code has been reparsed.

2) Yes, multiple users will use effectively the same code on the AS. They will have there own data, of course.

Big question) Form will become available for input when all activity has trigger taken place. No it is not possible to optimize to a single NET traffic as a decision in a trigger may cause a different request to be made of the DB.

4) There is significant difference in how Post-Query is handled. Before there was a 'cursor open', a fetch for each record, and a 'cursor close'. Now, as per the standards, there is a 'cursor open, record fetch, and 'cursor close' for EACH record. Therefore, 10 rows goes from 12 units of traffic to 30 units of traffic minimum. This is why some people base their blocks on procedures so that there is NO post-query action in the form.

David
Previous Topic: Need Admin Panel Sample Application
Next Topic: Connection to Remote Oracle Databse using ODBC in VB
Goto Forum:
  


Current Time: Fri Sep 20 10:34:07 CDT 2024