poeaa

Which pattern does Hibernate follow?

大憨熊 提交于 2019-12-29 04:16:08
问题 In his book "Patterns of Enterprise Application Architecture", Martin Fowler talks about persistence patterns which are commonly found in software development and particularly in relation to ORMs. Is there a pattern that Hibernate adheres to most closely? 回答1: Hibernate make use of several patterns: Lazy load (proxing collections) Unit of Work (as part of Session object) probably Identity Map or something more sophisticated Mapping Metadata Query Object for Criterion API all object relational

Which pattern does Hibernate follow?

不羁的心 提交于 2019-12-29 04:16:04
问题 In his book "Patterns of Enterprise Application Architecture", Martin Fowler talks about persistence patterns which are commonly found in software development and particularly in relation to ORMs. Is there a pattern that Hibernate adheres to most closely? 回答1: Hibernate make use of several patterns: Lazy load (proxing collections) Unit of Work (as part of Session object) probably Identity Map or something more sophisticated Mapping Metadata Query Object for Criterion API all object relational

what is the difference between a view model and a data transfer object?

混江龙づ霸主 提交于 2019-12-18 10:05:31
问题 I'm basing this question on Fowler PoEAA. Given your familiarity with this text, aren't the ViewModels used in ASP.NET MVC the same as DTOs? Why or why not? Thank you. 回答1: They serve a similar purpose (encapsulating data for another layer of the application) but they do it differently and for different reasons. The purpose of a DTO is to reduce the number of calls between tiers of an application, especially when those calls are expensive (e.g. distributed systems). DTOs are almost always

OOP App Architecture: Which layer does a lazy loader sit in?

无人久伴 提交于 2019-12-12 18:23:34
问题 I am planning the implementation of an Inheritance Mapper pattern for an application component http://martinfowler.com/eaaCatalog/inheritanceMappers.html One feature it needs to have is for a domain object to reference a large list of aggreageted items (10,000 other domain objects) So I need some kind of lazy loading collection to be passed out of the aggregate root domain object to other domain objects. To keep my (php) model scripts organised i am storing them in two folders: MyComponent\

Why does active record pattern not work with rich domain models?

﹥>﹥吖頭↗ 提交于 2019-12-09 05:29:46
问题 I'm reading the architectural patterns chapter of POEAA, and Fowler says that "As the domain logic gets more complicated and you begin moving toward a rich Domain Model (116), the simple approach of an Active Record (160) starts to break down. The one-to-one match of domain classes to tables starts to fail as you factor domain logic into smaller classes. Relational databases don't handle inheritance, so it becomes difficult to use strategies [Gang of Four] and other neat OO patterns. As the

Categories of design patterns [closed]

五迷三道 提交于 2019-12-06 07:19:58
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . The classic "Design Patterns: Elements of Reusable Object-Oriented Software" actually introduced most of us to the idea of design patterns. However these days I find a book such as "Patterns of Enterprise Application Architecture" (POEA) by Martin Fowler, much more useful in my day to day work. In discussions with

Categories of design patterns [closed]

浪子不回头ぞ 提交于 2019-12-04 14:33:51
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . The classic "Design Patterns: Elements of Reusable Object-Oriented Software" actually introduced most of us to the idea of design patterns. However these days I find a book such as "Patterns of Enterprise Application Architecture" (POEA) by Martin Fowler, much more useful in my day to day work. In discussions with fellow developers, many make the (fair) point that frameworks like .NET are slowly

Why does active record pattern not work with rich domain models?

不羁的心 提交于 2019-12-03 06:55:36
I'm reading the architectural patterns chapter of POEAA, and Fowler says that "As the domain logic gets more complicated and you begin moving toward a rich Domain Model (116), the simple approach of an Active Record (160) starts to break down. The one-to-one match of domain classes to tables starts to fail as you factor domain logic into smaller classes. Relational databases don't handle inheritance, so it becomes difficult to use strategies [Gang of Four] and other neat OO patterns. As the domain logic gets feisty, you want to be able to test it without having to talk to the database all the

what is the difference between a view model and a data transfer object?

戏子无情 提交于 2019-11-29 20:14:53
I'm basing this question on Fowler PoEAA. Given your familiarity with this text, aren't the ViewModels used in ASP.NET MVC the same as DTOs? Why or why not? Thank you. They serve a similar purpose (encapsulating data for another layer of the application) but they do it differently and for different reasons. The purpose of a DTO is to reduce the number of calls between tiers of an application, especially when those calls are expensive (e.g. distributed systems). DTOs are almost always trivially serializable, and almost never contain any behaviour. For example, you're developing an e-Commerce