M
MLecrone
Seeking a bit of advice from the folks that manage or work in a group
producing multiple .Net web applications for a single
customer/company...
I have a nagging suspicion I have misunderstood what a class should be
truly used for - please feel free to provide any insight based on your
experience(s)...
My team is transitioning from our classic ASP environment to .Net
(yay!). I am attempting to construct a "big picture" view of how
future .Net web applications will be able to access shared resources
like our classic ASP applications do today.
In today's environment (briefly), we have a folder in the root of our
web into which we put subroutines and functions commonly used among
all web applications. To make use of these only requires a simple
server side include (SSI) and then away we can go without rewriting
code. Easy enough.
The most common functions/subroutines reused among all apps are those
that have to do with getting and then displaying employee-related
information (from backend SQL db). Most of our apps require some form
of that information to be displayed on their pages such as "You are
logged in as [UserName]" as well as being able to customize page
rendering based on who the person is, etc., etc.
The following thoughts are now my assumptions which may need to be
seriously corrected. Please feel free to do so...
The above seems to translate quite obviously into the need to create
an Employee class containing those common functions designed to get
and display employee info that can then be referenced in all apps that
need it. However, it seems that when one creates an object based on a
class, the intent is to SET the properties of that object (such as
Employee.FirstName = [value]) rather than dynamically pass the
employee's unique identifier to that object, have it go get and set
all the properties, and THEN be able to simply code something like
Employee.FirstName which would render the name retrieved from a
function that resides within the Employee class.
Is this overkill perhaps? Not the true purpose of a class? Any
thoughts are welcome.
Many Regards,
MEL
producing multiple .Net web applications for a single
customer/company...
I have a nagging suspicion I have misunderstood what a class should be
truly used for - please feel free to provide any insight based on your
experience(s)...
My team is transitioning from our classic ASP environment to .Net
(yay!). I am attempting to construct a "big picture" view of how
future .Net web applications will be able to access shared resources
like our classic ASP applications do today.
In today's environment (briefly), we have a folder in the root of our
web into which we put subroutines and functions commonly used among
all web applications. To make use of these only requires a simple
server side include (SSI) and then away we can go without rewriting
code. Easy enough.
The most common functions/subroutines reused among all apps are those
that have to do with getting and then displaying employee-related
information (from backend SQL db). Most of our apps require some form
of that information to be displayed on their pages such as "You are
logged in as [UserName]" as well as being able to customize page
rendering based on who the person is, etc., etc.
The following thoughts are now my assumptions which may need to be
seriously corrected. Please feel free to do so...
The above seems to translate quite obviously into the need to create
an Employee class containing those common functions designed to get
and display employee info that can then be referenced in all apps that
need it. However, it seems that when one creates an object based on a
class, the intent is to SET the properties of that object (such as
Employee.FirstName = [value]) rather than dynamically pass the
employee's unique identifier to that object, have it go get and set
all the properties, and THEN be able to simply code something like
Employee.FirstName which would render the name retrieved from a
function that resides within the Employee class.
Is this overkill perhaps? Not the true purpose of a class? Any
thoughts are welcome.
Many Regards,
MEL