F
Frank Moyles
I am a developer with many years (approx 10years) development experience
using C++ for DESKTOP applications. I am writing a web application using
C#, and I wanted to ask a question about appropriate design.
My design is as follows:
I have an Application class, which delegates to various classes to
perform required functionality. The application class is responsible for
the following:
Authentication
Authorization
UserManagement
SystemAdmin
etc.
Because of the nature of the work that the Application class does, there
should not be more than one instance of it at any given time - since
both instances for example, may try to modify/save the same object to
database.
I was therefore thinking of implementing the Application class as a
Singleton. But then I rembered that a web application is different from
a desktop application, because you have several users requiring
authentication/authorisation etc at the same time - so maybe a Singleton
pattern would not be appropriate for web applications.
Even if I used a Singleton pattern - is the single instance restricted
to a particular users session - or does it apply server wide - i.e.
accross all sessions?
Any help and insight from experienced web application designers would be
much appreciated.
using C++ for DESKTOP applications. I am writing a web application using
C#, and I wanted to ask a question about appropriate design.
My design is as follows:
I have an Application class, which delegates to various classes to
perform required functionality. The application class is responsible for
the following:
Authentication
Authorization
UserManagement
SystemAdmin
etc.
Because of the nature of the work that the Application class does, there
should not be more than one instance of it at any given time - since
both instances for example, may try to modify/save the same object to
database.
I was therefore thinking of implementing the Application class as a
Singleton. But then I rembered that a web application is different from
a desktop application, because you have several users requiring
authentication/authorisation etc at the same time - so maybe a Singleton
pattern would not be appropriate for web applications.
Even if I used a Singleton pattern - is the single instance restricted
to a particular users session - or does it apply server wide - i.e.
accross all sessions?
Any help and insight from experienced web application designers would be
much appreciated.