On Sun, 23 Dec 2007 11:27:49 +0000, Frank Moyles <fgmoyles@nospam.com>
wrote:
Quote:
>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.
>
Are these things your Application class does or things the web
application will have to do to support the Application class?
Quote:
>
>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.
>
How does this work with the desktop application? It would seem that if
user A is running one instance of the app on box A and user B is also
running an instance on box B, concurrency issues might exist. With a
web application is both instances will run on box C. The
functionality's container isn't radically different in this respect.
Quote:
>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.
Re-examine the desired core functionality and determine how/if it can
be used by multiple users at once. Any possible concurrency should be
handled within the application and not be limiting the application to
a single instance.
regards
A.G.