浏览 2337 次
锁定老帖子 主题:Gavin King的访谈,建议大家都看看
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2003-12-02
有帅哥Gavin King的TSS访谈,建议大家都看看,深受启发:) 引用 One of the reasons why transparent persistence may not be getting as much attention is because a lot people just aren’t writing domain models. Why do you think people are not yet adopting such a good object-oriented paradigm yet? Firstly, not every application needs a domain model. There are lots of applications for which a domain model is absolute overkill. There are lots of applications for which a view of sets of data coming out of the database is absolutely appropriate. And there’s all kinds of good tools in Java, in the open source community, for writing that kind of application well, things like the Spring Framework give you great ways of getting away a bit from very messy JDBC code, but writing those kind of applications which pull some stuff form the database and display it on the screen, or insert a row of data into the database. You don’t need a domain model to do those kinds of things. On the other hand, there's a whole other class of applications where we do significant business logic. And I should come back and say, really that’s not all applications. One of the problems is that a lot of books you read about Java assume, push on people the notion that they need to abstract their business logic out from their presentation logic. But if you’re not doing sufficient business logic you don’t need to make that level of abstraction. But there are some applications which need to do that. For those kind of applications, I think, unfortunately, because of the lack of a really good way of doing transparent persistence, that in itself, has pushed people away from using domain models, from using simple POJO-oriented domain models. One of the fundamental aspects of the domain model is it gets persisted to a relational database, in 98% of Java applications. Not being able to do that efficiently hinders the adoption of that way of building applications. 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |