By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,050 Members | 1,157 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,050 IT Pros & Developers. It's quick & easy.

Design Patterns

P: n/a
Hi,

I am designing the middle tier of a project.
It has 6 classes and microsoft application data access block.
The six classes are DBServices, Logger, ProjectServices ... etc.
and all these classes talk to front-end directly.

Do I need to use any design pattern in this? or what kind of
design pattern is this?

Thanks
Dec 3 '07 #1
Share this Question
Share on Google+
10 Replies


P: n/a
it's hardly predict what do u need without detailed info
but I suggest to look at "Factory", "Singleton", "Facade", "Builder",
"Proxy" patterns.
which are most used patterns

If you are eager to build your middle-tier app regarding to all "patterns"
rules I think u need to read "Enterprise Patterns" book by Martin Fawler first

--
WBR, Michael Nemtsev [.NET/C# MVP].
Blog: http://spaces.live.com/laflour

"vital" wrote:
Hi,

I am designing the middle tier of a project.
It has 6 classes and microsoft application data access block.
The six classes are DBServices, Logger, ProjectServices ... etc.
and all these classes talk to front-end directly.

Do I need to use any design pattern in this? or what kind of
design pattern is this?

Thanks
Dec 3 '07 #2

P: n/a
On Dec 3, 9:54 am, Michael Nemtsev <nemt...@msn.comwrote:
it's hardly predict what do u need without detailed info
but I suggest to look at "Factory", "Singleton", "Facade", "Builder",
"Proxy" patterns.
which are most used patterns

If you are eager to build your middle-tier app regarding to all "patterns"
rules I think u need to read "Enterprise Patterns" book by Martin Fawler first

--
WBR, Michael Nemtsev [.NET/C# MVP].
Blog:http://spaces.live.com/laflour

"vital" wrote:
Hi,
I am designing the middle tier of a project.
It has 6 classes and microsoft application data access block.
The six classes are DBServices, Logger, ProjectServices ... etc.
and all these classes talk to front-end directly.
Do I need to use any design pattern in this? or what kind of
design pattern is this?
Thanks- Hide quoted text -

- Show quoted text -
Hi Michael,

I am not eager to use the design patterns but want to make sure my
design is flexible and easily maintainable enough.

Do you think my design is easily maintainable?

Thanks
Dec 3 '07 #3

P: n/a
Read this article http://msdn2.microsoft.com/en-us/library/ms998544.aspx
about design review just to understand that it's impossible to provide any
feedback without any input info of your system

--
WBR, Michael Nemtsev [.NET/C# MVP].
Blog: http://spaces.live.com/laflour

"vital" wrote:
On Dec 3, 9:54 am, Michael Nemtsev <nemt...@msn.comwrote:
it's hardly predict what do u need without detailed info
but I suggest to look at "Factory", "Singleton", "Facade", "Builder",
"Proxy" patterns.
which are most used patterns

If you are eager to build your middle-tier app regarding to all "patterns"
rules I think u need to read "Enterprise Patterns" book by Martin Fawler first

--
WBR, Michael Nemtsev [.NET/C# MVP].
Blog:http://spaces.live.com/laflour

"vital" wrote:
Hi,
I am designing the middle tier of a project.
It has 6 classes and microsoft application data access block.
The six classes are DBServices, Logger, ProjectServices ... etc.
and all these classes talk to front-end directly.
Do I need to use any design pattern in this? or what kind of
design pattern is this?
Thanks- Hide quoted text -
- Show quoted text -

Hi Michael,

I am not eager to use the design patterns but want to make sure my
design is flexible and easily maintainable enough.

Do you think my design is easily maintainable?

Thanks
Dec 3 '07 #4

P: n/a

"vital" <vi***********@gmail.comwrote in message
news:0f**********************************@w34g2000 hsg.googlegroups.com...
Hi,

I am designing the middle tier of a project.
It has 6 classes and microsoft application data access block.
The six classes are DBServices, Logger, ProjectServices ... etc.
and all these classes talk to front-end directly.

Do I need to use any design pattern in this? or what kind of
design pattern is this?
You may want to take a look at this MVP is the new boy on the block. The UI
should be loosely coupled to lower and unaware of the layers like BI and
DAL. I am sure you can more articles on MVP.

UI
MVP
Business
Data Access

MODEL-VIEW-PRESENTER

http://www.polymorphicpodcast.com/

click 'Shows'

click 'Design Patterns Bootcamp: Model View * Patterns'

view part 1-5.

Dec 3 '07 #5

P: n/a
Liz

"vital" <vi***********@gmail.comwrote in message
news:e6**********************************@e1g2000h sh.googlegroups.com...
I am not eager to use the design patterns but want to make sure my
design is flexible and easily maintainable enough.

Do you think my design is easily maintainable?

Nobody here knows anything about your project, other than the names of three
of the six classes you are apparently intending to use; it's impossible to
say *anything* about the nature or quality of your design ... or whether
it's "easily maintainable" ...

It does seem you are sort of approaching this inside-out, looking for ways
to "use design patterns" instead of doing the analysis and then making use
of whatever patterns might be appropriate to the work you're undertaking.

I would read your post as indicating that you either would like to know more
about design patterns or that you think you *should* know more about them.
Accordingly, I'd suggest a bit of reading on the topic; there are a lot of
books available; one that I have found reasonably readable is "C# Design
Patterns: A Tutorial" by James W. Cooper

http://www.amazon.com/Design-Pattern...6660677&sr=8-1

you can pick one up in "New & Used" for as low as $14 ...

Learning this material is not a one or two week project so if you're doing
something on a deadline you're probably best advised to simply carry on with
your work as best as you know how presently and learn about design patterns
independently ... unless a client or manager has directed otherwise there's
no reason that anyone has to ever know even a single thing about patterns.
That said, you will probably find at least some of them useful, even
interesting ... and in some shops, you *will* be expected to be conversant
with them

There's no magic in this stuff; it's just tried and true ways of
approaching problems. Some people find patterns they've already been using
so the only thing new is learning that there's a name for what they've been
doing. Generally, though, you will probably be seeing things that are novel
and you'll need some time to absorb the concepts and start putting them to
work.

In the interim, poke around Wikipedia for an overview of the topic
Dec 3 '07 #6

P: n/a
On Dec 3, 11:07 am, "Liz" <l...@tiredofspam.comwrote:
"vital" <vital.madd...@gmail.comwrote in message

news:e6**********************************@e1g2000h sh.googlegroups.com...
I am not eager to use the design patterns but want to make sure my
design is flexible and easily maintainable enough.
Do you think my design is easily maintainable?

Nobody here knows anything about your project, other than the names of three
of the six classes you are apparently intending to use; it's impossible to
say *anything* about the nature or quality of your design ... or whether
it's "easily maintainable" ...

It does seem you are sort of approaching this inside-out, looking for ways
to "use design patterns" instead of doing the analysis and then making use
of whatever patterns might be appropriate to the work you're undertaking.

I would read your post as indicating that you either would like to know more
about design patterns or that you think you *should* know more about them.
Accordingly, I'd suggest a bit of reading on the topic; there are a lot of
books available; one that I have found reasonably readable is "C# Design
Patterns: A Tutorial" by James W. Cooper

http://www.amazon.com/Design-Pattern...oper/dp/020184...

you can pick one up in "New & Used" for as low as $14 ...

Learning this material is not a one or two week project so if you're doing
something on a deadline you're probably best advised to simply carry on with
your work as best as you know how presently and learn about design patterns
independently ... unless a client or manager has directed otherwise there's
no reason that anyone has to ever know even a single thing about patterns.
That said, you will probably find at least some of them useful, even
interesting ... and in some shops, you *will* be expected to be conversant
with them

There's no magic in this stuff; it's just tried and true ways of
approaching problems. Some people find patterns they've already been using
so the only thing new is learning that there's a name for what they've been
doing. Generally, though, you will probably be seeing things that are novel
and you'll need some time to absorb the concepts and start putting them to
work.

In the interim, poke around Wikipedia for an overview of the topic
Hi Liz,

Thanks for taking lot of time in explaining. I am doing this project
at work and
nobody told me to use design patterns. But I want my design to be
robust so
I wanted to know is it useful to go after design patterns or simply go
ahead
with my design.

I have until January to start the coding for the project. I already
designed my classes
and some methods but in the meanwhile I want to know whether I can use
any design
pattern to make my project robust.

what kind of information do u need from me in explaining what kind of
design pattern I am
using If I am using one or needed to be used.

Thanks
Dec 3 '07 #7

P: n/a
On 3 Dec, 07:33, vital <vital.madd...@gmail.comwrote:
On Dec 3, 11:07 am, "Liz" <l...@tiredofspam.comwrote:


"vital" <vital.madd...@gmail.comwrote in message
news:e6**********************************@e1g2000h sh.googlegroups.com...
I am not eager to use the design patterns but want to make sure my
design is flexible and easily maintainable enough.
Do you think my design is easily maintainable?
Nobody here knows anything about your project, other than the names of three
of the six classes you are apparently intending to use; it's impossible to
say *anything* about the nature or quality of your design ... or whether
it's "easily maintainable" ...
It does seem you are sort of approaching this inside-out, looking for ways
to "use design patterns" instead of doing the analysis and then making use
of whatever patterns might be appropriate to the work you're undertaking.
I would read your post as indicating that you either would like to know more
about design patterns or that you think you *should* know more about them.
Accordingly, I'd suggest a bit of reading on the topic; there are a lot of
books available; one that I have found reasonably readable is "C# Design
Patterns: A Tutorial" by James W. Cooper
http://www.amazon.com/Design-Pattern...oper/dp/020184...
you can pick one up in "New & Used" for as low as $14 ...
Learning this material is not a one or two week project so if you're doing
something on a deadline you're probably best advised to simply carry on with
your work as best as you know how presently and learn about design patterns
independently ... unless a client or manager has directed otherwise there's
no reason that anyone has to ever know even a single thing about patterns.
That said, you will probably find at least some of them useful, even
interesting ... and in some shops, you *will* be expected to be conversant
with them
There's no magic in this stuff; it's just tried and true ways of
approaching problems. Some people find patterns they've already been using
so the only thing new is learning that there's a name for what they've been
doing. Generally, though, you will probably be seeing things that are novel
and you'll need some time to absorb the concepts and start putting them to
work.
In the interim, poke around Wikipedia for an overview of the topic

Hi Liz,

Thanks for taking lot of time in explaining. I am doing this project
at work and
nobody told me to use design patterns. But I want my design to be
robust so
I wanted to know is it useful to go after design patterns or simply go
ahead
with my design.

I have until January to start the coding for the project. I already
designed my classes
and some methods but in the meanwhile I want to know whether I can use
any design
pattern to make my project robust.

what kind of information do u need from me in explaining what kind of
design pattern I am
using If I am using one or needed to be used.

Thanks- Hide quoted text -

- Show quoted text -
Your best bet would be to read the links above and familiarise
yourself with things like MVP, singleton, factory, etc, and also start
coding a prototype. If you hit any specific issues with the prototype,
bring those to the forum and people can probably help more.

For example you have a Logger class. I would assume this is used for
error/message logging? You might want to investigate the Microsoft
application diagnostic block here as it provides a simple(ish) general
way of creating logging classes which log what you want where you
want, ie to a database, email, text file, and so on by defining
classes that implement IExceptionPublisher and adding a line to the
config file. Not knowing what your logger class is trying to do though
means that advice may be over kill or inappropriate.

Other information that is always handy is which framework version you
are targetting and what the application is supposed to do. Also, you
seem adamant that you're going with three tiers, but as we don't know
what the app is going to do, how long you have to develop it or who
will use it and how many, we can't even confirm that assumption is
correct.

Finally, patterns show you how to do something in a repeatable, proven
way. They don't tell you whether you need to apply that pattern. One
of the simplest patterns is the singleton which you could learn in
about 10 minutes. It will take significantly longer to know when or if
you need to apply it.

Dec 3 '07 #8

P: n/a
If you want a quick "briefing" on how to set up your project with patterns,
consider the .NET Design Pattern Framework from dofactory.com.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
"vital" <vi***********@gmail.comwrote in message
news:0f**********************************@w34g2000 hsg.googlegroups.com...
Hi,

I am designing the middle tier of a project.
It has 6 classes and microsoft application data access block.
The six classes are DBServices, Logger, ProjectServices ... etc.
and all these classes talk to front-end directly.

Do I need to use any design pattern in this? or what kind of
design pattern is this?

Thanks

Dec 3 '07 #9

P: n/a
Vital... At a minimum I would try to separate out the application logic
from the GUI (view and event handling code). There should be an entry
point to the application service that can be unit tested from a command
line console application. You can look at this as Model-ViewController
or ENGINE-INTERFACE where the Model or Engine encapsulates the
application logic, service or algorithm.

Regards,
Jeff

*** Sent via Developersdex http://www.developersdex.com ***
Dec 3 '07 #10

P: n/a
Liz

"vital" <vi***********@gmail.comwrote in message
news:c9**********************************@s36g2000 prg.googlegroups.com...
I have until January to start the coding for the project. I already
designed my classes
and some methods but in the meanwhile I want to know whether I can use
any design
pattern to make my project robust.
I'd suggest you dive in to the material: see, for example, what Factory,
Facade, Mediator patterns are, and go from there; if you see relationships
to your work and discern a rationale for employing a pattern, go for it

Since you mentioned having only six classes in your architecture, unless
this is an application of very limited scope, I'd venture a guess that your
present design is quite a bit more tightly coupled ... hard-coded ... than
it would be if you employ some of the commonly known and used design
patterns. But context is everything: in a one-off silo application it might
not be worth the effort to do all the abstraction work which is becoming
orthodoxy in the field .. you'll have to make that call since you know the
app, the stakeholders, the budget and your own level of proficiency
what kind of information do u need from me in explaining what kind of
design pattern I am
using If I am using one or needed to be used.
I, or anyone else, would have to review more material than I think is
practical in this medium; why don't you try to present some reasonably
specific questions to the group ... there are a lot of able and helpful
people around here who might be able to offer some good advice in that
context


Dec 3 '07 #11

This discussion thread is closed

Replies have been disabled for this discussion.