sure. One of the intermediate patterns in the Builder pattern. With it,
you can create a dynamic structure composed of objects during creation.
Your app can use that structure to drive the behavior of the system without
each component requiring a change.
This isn't trivial coding, but it isn't all that complex either.
What isn't clear from your description: is each client running on their own
machine or is he using your web server? If running from his own machine,
then you can set up your builder to read the configuration from a config
file, telling it how to build the wizard. It can do this once and use it
many times. On the other hand, if the user visits your server and gets
different behavior, then you will need to drive the configuration from a
many-to-one structure like a database. In that case, read the config when
the user logs in and create your structure at that time.
My personal favorite structure for a wizard is a simple indexed list, where
each element can get it's element id by asking the container class. Next is
simply a return where the container knows to close the current object and
open the next one in the list. Previous is a return where the container
knows to do the same, but open the previous one.
I hope this helps
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Stewart Rogers" <St***********@discussions.microsoft.com> wrote in message
news:EB**********************************@microsof t.com...
Hi all,
I have been working on an ASP.NET application that is a kind of wizard ( a
list of sequential pages ). We built that application for the CLIENT-A and
it
worked fine. After six months CLIENT-B came along and and requested the
same
application but with little bit different requirements (both in terms of
the
front-end and back-end processing), so we had to create a new application
for
that client. Now came CLIENT-C !!!!!!
I am not into the favor of creating one more application for this client
and
have been thinking about creating one generic application that will fit
most
of our clients needs; I mean the application has to change the behavior
based
on the client for which it has been called.
For example, CLIENT-A requires all pages to be shown in a sequence (Page1,
Page2, Page3, Last Page). CLIENT-B does not want to show Page1, rather
they
want to show Page2, and the Last Page. CLIENT-C wants to show all of the
pages in the same sequence but has less data entry fields on some of the
forms!!!
Now is there a way I can implement/architect/design a generic/semi-generic
application that would change its behavior based on the client for which
it
has been invoked for? any design pattern that would do the trick for this
kind of application? any insights?
Thanks in advance.
Stewart