Jump to content

Recommended Posts

hi everyone,

 

 

i've had more than a few years of programming... and only now did i get into web-based environment, or rather, web based programming envi.

 

to make a more tangible inquiry let me site an example

 

I've an entry form for a particular product line...

 

it has 5 basic types... and tons of detail and related bill of materials

 

   one approach i can give here is to create a function for the layout of the page... with parameters for a number of inputs, and probably a couple of arrays... from there i can decide within the function on which configuration i can display an input page...

 

   at one end this does give me the advantage of maintaining the layout in one area( the function ), and apply any change easily to all configurations... but that's obviously the purpose of functions.

 

   however it worries me that php has to process this everytime, the page is requested by a client ( i'm not sure if i got that one right... i'm a rookie, admittedly).

 

   unlike coding for desktop executables that are compiled once. and the compiled version always available for execution by the users.  Php seems to do the compiling of the page everytime the page is requested by a client(additionally,  the creation and passing of variables, embedding the function into the calling page.. ) and i'm worried that it adds much load to the server( and i'm administering over a lan server machine that's already hosting another system and still acting as file server ).

 

 

   So it's pretty hard for me to gauge whether a 'common' block of code would be a good candidate for a function.

 

 

 

 

... hoping to get deeply intuitive responses from you guys, as always

 

( by the way, i think i tried to post this similar question but the php site seems to have undergone some repairs recently and i could no longer see if the post was registered )

 

(sorry guys, i did a more thorough search and yup i was successful posting it over a day ago (but surprisingly with no replies which is why  could not find it in the link 'new replies to your post'...  sorry, i am  human, i do err

 

should i presume that,

 

making references to a couple more

pages of grouped functions would not

drag down my server?

 

... well that was were i was headed at some point when i decided to re-evaluate my approach...

i was starting to get to a point where i might do 5 require_once for every page...

 

 

 

 

 

 

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.