Walter Kempees
|
| Posted: 01/16/2006, 2:34 PM |
|
Dear All,
Please supply me with constructive comment on:
A page containing a Record Form (as an example)
The Form has the normal functionality of Add/Modify/Delete.
The AfterExecute of all 3 has custom code setting some variables and calling
a function with those variables (parms).
Now for the question:
I know I can stuff the functions in Common.php but as they are only needed
in this particular Page Iám wondering where my
esteemed CCS Developers (note the term) would put these functions.
Currently I am considering several methods:
1: Add a Include(RelativePath . /sources/Formname_includes.ph) line in the
source of my page just after "End Include Common Files" comment (white
space); creating such a file in a new subdirectory under my project
"sources" and put the functions in there.
2: similar but several includes each containing 1 function and using the
functionname as file name convention
3:create a functions subdirectory in the project directory tree and do
method 2 in there.
4 not my preference) stuff my functions in Common, at the end.
Remember though these functions are only used in this form (at least at
this moment).
I feel the need for a Hook in the Properties of a Page like CustomFunctions.
Please shoot fairly.....................I don't need explanations how to, am
looking for vision on how and why.
Walter
|
|
|
 |
TheunisP
Posts: 342
|
| Posted: 01/16/2006, 3:12 PM |
|
I curently group functions according to what type of logic they include and use #1 as needed- but I 'm interested in your hook idea @ page and maybe on system level as well
|
 |
 |
mamboBROWN
Posts: 1713
|
| Posted: 01/16/2006, 9:47 PM |
|
Walter
Have you also considered that you could also just include the functions in the page event After Initialize (if the code is only being used once). Just a thought.
|
 |
 |
Walter Kempees
|
| Posted: 01/17/2006, 2:57 AM |
|
MB:
Just a thought, and that's exactly what I asked for.
Thanks!
"mamboBROWN" <mamboBROWN@forum.codecharge> schreef in bericht
news:243cc84f1d6da4@news.codecharge.com...
> Walter
> Have you also considered that you could also just include the functions in
> the
> page event After Initialize (if the code is only being used once).
> Just
> a thought.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
|