开发者

Googling DAL & DAO returns only C# .NET related results – Does a DAL/DAO type pattern exist in Java?

The subject line says it all. Googling DAL & DAO returns only C# .NET related results.

Is there a DAL/DAO equivalent pattern in the Java w开发者_如何学运维orld? Are there any reference implementations available?


Of course it applies to Java as well: Don't Repeat The DAO!

Have a look at Fowler's Patterns of Enterprise Application Architecture. Core J2EE Patterns also refers to DAO.

It'd be interesting to check the dates on your C#/.NET references. I'd bet that the idea started on the Java side and was adopted later by .NET. Microsoft probably had another persistence technology that was their "best practice". If I recall correctly, VB used to tie UI elements closely to columns, without an intermediate layer in-between to separate the view from the database.


The patterns DAL and DAO are not language specific. Using them is good style in Java, too.

The Springframework provides a nice implementation of DAOs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜