PC Review


Reply
Thread Tools Rate Thread

Design Patterns

 
 
vital
Guest
Posts: n/a
 
      3rd Dec 2007
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
 
Reply With Quote
 
 
 
 
Michael Nemtsev
Guest
Posts: n/a
 
      3rd Dec 2007
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
>

 
Reply With Quote
 
vital
Guest
Posts: n/a
 
      3rd Dec 2007
On Dec 3, 9:54 am, Michael Nemtsev <nemt...@msn.com> wrote:
> 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
 
Reply With Quote
 
Michael Nemtsev
Guest
Posts: n/a
 
      3rd Dec 2007
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.com> wrote:
> > 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
>

 
Reply With Quote
 
Mr. Arnold
Guest
Posts: n/a
 
      3rd Dec 2007

"vital" <(E-Mail Removed)> wrote in message
news:0fef0f86-6fe6-4e0d-9a7b-(E-Mail Removed)...
> 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.



 
Reply With Quote
 
Liz
Guest
Posts: n/a
 
      3rd Dec 2007

"vital" <(E-Mail Removed)> wrote in message
news:e68030e7-b796-47ff-a923-(E-Mail Removed)...

> 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


 
Reply With Quote
 
vital
Guest
Posts: n/a
 
      3rd Dec 2007
On Dec 3, 11:07 am, "Liz" <l...@tiredofspam.com> wrote:
> "vital" <vital.madd...@gmail.com> wrote in message
>
> news:e68030e7-b796-47ff-a923-(E-Mail Removed)...
>
> > 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
 
Reply With Quote
 
DeveloperX
Guest
Posts: n/a
 
      3rd Dec 2007
On 3 Dec, 07:33, vital <vital.madd...@gmail.com> wrote:
> On Dec 3, 11:07 am, "Liz" <l...@tiredofspam.com> wrote:
>
>
>
>
>
> > "vital" <vital.madd...@gmail.com> wrote in message

>
> >news:e68030e7-b796-47ff-a923-(E-Mail Removed)...

>
> > > 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.

 
Reply With Quote
 
Mr. Arnold
Guest
Posts: n/a
 
      3rd Dec 2007

"vital" <(E-Mail Removed)> wrote in message
news:c99257fd-6a5d-4d17-96ad-(E-Mail Removed)...
> On Dec 3, 11:07 am, "Liz" <l...@tiredofspam.com> wrote:
>> "vital" <vital.madd...@gmail.com> wrote in message
>>


<snipped>

<http://books.google.com/books?id=LjJcCnNf92kC&dq=head+first+design+patterns&pg=PP1&ots=_8508Im4tZ&sig=3-XL0kVV3LBi5QAvvua1BEQ9U28&prev=http://www.google.com/search%3Fhl%3Den%26q%3Dhead%2Bfirst%2Bdesign%2Bpatterns%26btnG%3DGoogle%2BSearch&sa=X&oi=print&ct=title&cad=one-book-with-thumbnail>

 
Reply With Quote
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      3rd Dec 2007
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" <(E-Mail Removed)> wrote in message
news:0fef0f86-6fe6-4e0d-9a7b-(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
design patterns Andy B. Microsoft VB .NET 1 12th Apr 2009 01:31 AM
c# Design Patterns?? =?Utf-8?B?bWF2cmlja18xMDE=?= Microsoft ASP .NET 7 2nd May 2007 07:12 PM
Can you recommend a book about design patterns? (factory patterns, singleton patterns etc) Joakim Olesen Microsoft Dot NET 4 4th Jan 2005 07:17 AM
Ask about Design Patterns ! Phan Tien Microsoft Access 0 24th Mar 2004 02:31 PM
MVC and Design patterns Art Microsoft Dot NET 0 3rd Oct 2003 10:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:43 PM.