CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Comment needed on include files containing functions

Print topic Send  topic

Author Message
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

View profile  Send private message
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.
View profile  Send private message
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/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.