Click to See Complete Forum and Search --> : Page with multiple functions, do they all get read / processed?
mgisonno
02-01-2007, 10:58 AM
So I have a webpage and at the top of this webpage I've included my helper functions from another .aspx file.
There are about 50 different functions, but not all of them are used by each page.
My question is, do they still create server lag time by being read, even though they haven't been triggered by the Page_Load or another event?
RobDavid
02-07-2007, 12:13 PM
I would say no. But just a question, why are you including helper functions from another .aspx page? Why don't create a "helper" class library or two and just import the namespaces that deal with that particular page?
mgisonno
02-07-2007, 02:30 PM
Well, in all honesty. The main reason is, I've never had formal .NET training. I've only been using examples and teaching myself everything I can from those examples. There are still so many areas that I don't understand and to be quite honest, don't know how they work. I get the basic idea of class based programming, but it's still very alien to me. I have just written a bunch of functions and then execute the function where I need it. I think this follows legacy asp coding techniques, which is not the direction I want to go, but I've been thrown in the middle of a major back end re-design. Anything, at this point, will be better then what was in place. I hope to take some .NET classes in the future for my own knowledge and side projects, but at work they are now going to migrate to ATG, which I believe is based on Java. That won't be for another year or so, but that's the goal. Hopefully somewhere along the way, I will be able to take a few classes on the subject.
RobDavid
02-07-2007, 02:48 PM
Yeah, I mean there is nothing wrong with the way youre approaching it. Its all executed as pre-compilied code anyway. Its just easier from a development and maintence point of view to use classes to handle that. It's more organized.
Anyway, Learn on...It's not that difficult. I don't think you even need to take a course or anything, just a few examples and maybe a intro book?
Good luck!