This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / I have several clients, there is a little bit difference among them, maybe I'll have more clients in future, how to design the architecture?
-guest:guest;
2000-10-24
(#11913@0)
-
Man, your question is too big to answerOne of my chief architects taught me: " Each project is unique." Your experience in the present project will be helpful for your future projects. However, please don't think you can work out an architecture that can be applicable to several projects. I don't hope your clients trust you with any architecture assignments. -): -):
-jabber(jabber);
2000-10-24
{338}
(#11915@0)
-
in details.I'm a server, serveral clients (not customer) connect with me, ...
-guest:guest;
2000-10-24
{67}
(#11916@0)
-
Man, what server are you? -): -): ? what clients does your server have? what is your business rule? Without these pre-conditions, no one can talk about the architecture.
-jabber(jabber);
2000-10-24
(#11917@0)
-
It doesn't matter, don't care about the details of server and clients, the most important is,
1, several clients which are a little bit difference
2. the number of clients will be increased sometime
I need a pattern only.
-guest:guest;
2000-10-24
(#11918@0)
-
Did you mean scalability?
-jabber(jabber);
2000-10-24
{2089}
(#11919@0)
-
thank you for your adviceI think I have told very clearly, if you don't know what the pattern is, you don't know what I said, in another word, you don't know what I want to do.
anyway, thank you!
-guest:guest;
2000-10-24
{174}
(#11920@0)
-
Not all things fall into some patterns
-jabber(jabber);
2000-10-24
{1117}
(#11921@0)
-
you are right."the number of clients will be increased sometime" means add a new client without modifying more source codes, it's more important than the first one, this is the point.
you can choose a pattern, and you can write a pattern by yourself, this is my question.
-guest:guest;
2000-10-24
{262}
(#11922@0)
-
I am still confused
-jabber(jabber);
2000-10-24
{1303}
(#11923@0)
-
my opinionseveral means 1-100(maybe it's wrong), everybody know
class BaseClient {}
class Client1:public BaseClient{}
class Client2:public BaseClient{}
class Client3:public BaseClient{}
...
void foo(BaseClient& b){}
maybe it defined in another class, you don't need modify it if you add a new client only
but, I hope to get a better way to implement it,
Actualy, I don't understand your story about name, what do you really want to do?
-guest:guest;
2000-10-24
{445}
(#11924@0)
-
I am happy to see that you are using Java.Obviously, you do not get my point in my
story about marriage. (I think I did not get me accrossed). So please forget abouot it.
If we talk about patterns, we should be able to find examples in everyday life. We should first describe it in everyday language, not in IT jargons.
I have seen your code. You used inheritance in Java. I suggest you use Adapter pattern.. probably, it would be a better idea to use
composition.
-jabber(jabber);
2000-10-24
{439}
(#11926@0)
-
Adapter pattern + Facade Pattern
-jabber(jabber);
2000-10-24
{1183}
(#11925@0)
-
I don't think so.Adapter convert the interface of a class into another interface clients expect.
Facade provide a unified interface to a set of interfaces in a subsystem.
I don't think it's what I want, i think the most important is the number of clients will increase in future.
-guest:guest;
2000-10-24
{268}
(#11927@0)
-
The discussion is interesting.But why doesn't Mr. guest describe the question definitely in one post?
The question is interesting, but I am afraid that Mr. guest doesn't describe the question completely. What business logic does it have? Why are there so many different type of clients? I think the design pattern just gives us a absact thinking way, Real world design always has some difference. A good design depends on experience, knowledge, inspiration sometimes.
-marcow(UserMarco);
2000-10-24
{440}
(#11941@0)
-
Actually, I don't understand this question clearly. I am idiot? :((
-marcow(UserMarco);
2000-10-24
(#11944@0)
-
Dear Marco, I second to you
-jabber(jabber);
2000-10-25
{1011}
(#12039@0)
-
yes,I can't understand what he said too.But That's ok!Sometimes pepole just don't know what they did.
Maybe he don't know the process of the projects and need help.
I don't think jabber did wrong.
I think jabber is kind guy.
-Always smile to life! :-)
-alwaysgreen(alwaysgreen);
2000-10-25
{223}
(#12130@0)
-
If you'd like to know what I said, read Design Patter written by GOF first.Don't care about how many clients I have, don't care about the business logic, it's not related with this topic, I just need a pattern in order to add a new client in future without modifying more codes, maybe it's very simple, maybe not, I don't konw.
-guest:guest;
2000-10-25
{257}
(#12131@0)
-
I think it depends on your application environment and requests of the projects or whatever.
-alwaysgreen(alwaysgreen);
2000-10-26
{523}
(#12136@0)
-
you are right, but ...what I need is a pattern to resolve the problem (maybe it's not a problem), it's a part of a project, it's dependent of any platform.
the customer has specification, but don't care about it, you can implement it in the derived class, it's not related with the pattern, I guess you didn't read books about design pattern
-guest:guest;
2000-10-26
{326}
(#12143@0)
-
sorry, it's independent
-guest:guest;
2000-10-26
{593}
(#12147@0)
-
I just think it's nothing except polymorphism. Am I right?
-marcow(UserMarco);
2000-10-26
(#12150@0)
-
a lot of patterns will use polymorphism, inheritance, which PATTERN is better for it?Don't answer me before you read a book about pattern.
-guest:guest;
2000-10-26
{54}
(#12179@0)
-
Nothing can I say to what you said....sorry...... actually, many developers I know in Canada have read this book, but I suspect the project is only a imagination.
-marcow(UserMarco);
2000-10-26
(#12141@0)
-
Some thoughts....
-jabber(jabber);
2000-10-26
{3282}
(#12180@0)