473,396 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Design Patterns

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
10 3591
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
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
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

"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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Design Pattern Catalog | last post by:
Thank you for your interest in "Design Patterns: Elements of Reusable Object-Oriented Design", by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. This message answers several...
5
by: Don Vaillancourt | last post by:
Hello all, Over the years as I design more database schemas the more I come up with patterns in database design. The more patterns I recognize the more I want to try to design some kind of...
1
by: Jay | last post by:
The GOF text is widely considered the definitive book on the topic. Design Patterns: Elements of Reusable Object-Oriented Softare, Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides ...
1
by: Josh28 | last post by:
Hi We are a group of two chaps just out of undergrad, we created a software to automate the use of Design Patterns. We have put it up at Source Forge--http://dpatoolkit.sourceforge.net/ The...
13
by: John Salerno | last post by:
Here are a few I'm considering: Design Patterns Explained : A New Perspective on Object-Oriented Design (2nd Edition) (Software Patterns Series) by Alan Shalloway Design Patterns C# by...
2
by: Carlo Stonebanks | last post by:
I have the infamous GoF Design Patterns boo - it's been sittin gon my shelf for years. I have a huge reading list and find this book a rather dry read and am always putting it off. I have...
22
by: Krivenok Dmitry | last post by:
Hello All! I am trying to implement my own Design Patterns Library. I have read the following documentation about Observer Pattern: 1) Design Patterns by GoF Classic description of Observer....
7
by: =?Utf-8?B?bWF2cmlja18xMDE=?= | last post by:
Hi, I would like to know more about design patterns and specifically using C#. Can any one recommend a good book? Thanks
5
by: macca | last post by:
Hi, I'm looking for a good book on PHP design patterns for a OOP beginner - Reccommendations please? Thanks Paul
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.