is dao pattern is the best practice in projects

let me know if dao pattern is the best followed in all almost all the projects though finding alternatives to it. please clarify this for me and also i do want to know the best practices of the industry in using design patterns.
[242 byte] By [madhu261a] at [2007-11-27 3:28:25]
# 1

There is no 'best' pattern. It is just all about how and where to apply them. As long as we knows nothing about your requirements, we cannot say if the DAO pattern will be the best for you. You can find a variety of core J2EE patterns here: http://java.sun.com/blueprints/corej2eepatterns/Patterns/index.html (you can click at each block to get detailed information about applying the pattern). You can find the DAO pattern at the right bottom of the picture.

BalusCa at 2007-7-12 8:31:15 > top of Java-index,Other Topics,Patterns & OO Design...
# 2

> There is no 'best' pattern. It is just all about how

> and where to apply them.

This is very true,but these are common design patterns used in industry for standard problems.

Most of the time patterns are used not for some special reason but for more manageability and ease of change.So if you have a small application than it's ok but if you are working on big application which are needed to be maintained over a time and changes are frequent.Than its better to start learning about patterns because their will be problems which right now you can't see but eventually you have to take care of.

khangharotha at 2007-7-12 8:31:15 > top of Java-index,Other Topics,Patterns & OO Design...
# 3

> > There is no 'best' pattern. It is just all about

> how

> > and where to apply them.

> This is very true,but these are common

> design patterns used in industry for standard

> problems.

> ost of the time patterns are used not for some

> special reason but for more manageability and ease of

> change.So if you have a small application than it's

> ok but if you are working on big application which

> are needed to be maintained over a time and changes

> are frequent.Than its better to start learning about

> patterns because their will be problems which right

> now you can't see but eventually you have to take

> care of.

Ok, so given the above, which is the best pattern?

georgemca at 2007-7-12 8:31:15 > top of Java-index,Other Topics,Patterns & OO Design...
# 4

> > There is no 'best' pattern. It is just all about

> how

> > and where to apply them.

> This is very true,but these are common

> design patterns used in industry for standard

> problems.

> ost of the time patterns are used not for some

> special reason but for more manageability and ease of

> change.So if you have a small application than it's

> ok but if you are working on big application which

> are needed to be maintained over a time and changes

> are frequent.Than its better to start learning about

> patterns because their will be problems which right

> now you can't see but eventually you have to take

> care of.

That is either incorrect or phrased poorly.

Patterns come about because someone analyzes different existing code bases and notes that there are similarities in the way they are built.

It isn't that they are easier to maintain but rather that because the pattern has similarities it is easier to comprehend, understand the limitations, understand the possible related patterns, etc. That might lead to easier maintainance but it isn't the reason. The reason is because, if and only if, the requirements/architecture lead to a situation where that pattern could be properly used.

jschella at 2007-7-12 8:31:15 > top of Java-index,Other Topics,Patterns & OO Design...
# 5

"That is either incorrect or phrased poorly."

Well what i wanted to emphasize was sometimewhen you have a problem in hand and you come up with some solution .That solution right now with given scope looks just great.But their are people out there who also have gone through this before and when they found that this particular solution can't adapt with changing requirement and hence modified their solution.

So when you read patterns it gives you insight about how to solve the problem at hand and also how to have that solution decoupled and easy to change with changing requirements.

khangharotha at 2007-7-12 8:31:15 > top of Java-index,Other Topics,Patterns & OO Design...
# 6
It all depends on the project and your perspective.If uthink Dao's are required its the best pattern.
Kalyanaa at 2007-7-12 8:31:15 > top of Java-index,Other Topics,Patterns & OO Design...