Modelus Blog - Design and DevelopmentModelus Bloghttp://modelus.com/Blog/
http://www.rssboard.org/rss-specificationBlogEngine.NET 2.8.0.0en-GBhttp://modelus.com/Blog/opml.axdhttp://www.dotnetblogengine.net/syndication.axdModelusModelus Blog0.0000000.000000modelus.com Product Landing Page receives new design<p><a href="http://modelus.com">www.modelus.com</a> Product Landing Page receives new design - <a href="http://www.modelus.com/m/blog/">www.modelus.com/m/blog</a>. Let us know what you think.</p>http://modelus.com/Blog/post/2015/06/13/modeluscom-Product-Landing-Page-receives-new-design.aspx
http://modelus.com/Blog/post/2015/06/13/modeluscom-Product-Landing-Page-receives-new-design.aspx#commenthttp://modelus.com/Blog/post.aspx?id=d8cb0549-6173-487f-8b8a-5ba949c47342Sat, 13 Jun 2015 01:18:00 -0100AppsDesign and DevelopmentAleh Matushttp://modelus.com/Blog/pingback.axdhttp://modelus.com/Blog/post.aspx?id=d8cb0549-6173-487f-8b8a-5ba949c473420http://modelus.com/Blog/trackback.axd?id=d8cb0549-6173-487f-8b8a-5ba949c47342http://modelus.com/Blog/post/2015/06/13/modeluscom-Product-Landing-Page-receives-new-design.aspx#commenthttp://modelus.com/Blog/syndication.axd?post=d8cb0549-6173-487f-8b8a-5ba949c47342modelus.com website is now mobile-friendly!<p><a href="http://www.modelus.com">www.modelus.com</a> has been updated to pass mobile-friendly test by Google as well as to make a few other improvements for mobile users. Let us know if you experience any issues.&nbsp;</p>
<p>To learn more about the mobile-friendly criteria and how it affects Google Search, visit&nbsp;<a href="http://googlewebmastercentral.blogspot.com/2014/11/helping-users-find-mobile-friendly-pages.html" target="blank">Google Webmaster Blog</a>.</p>http://modelus.com/Blog/post/2015/06/13/modeluscom-website-is-now-mobile-friendly!.aspx
http://modelus.com/Blog/post/2015/06/13/modeluscom-website-is-now-mobile-friendly!.aspx#commenthttp://modelus.com/Blog/post.aspx?id=0de09af0-929b-4e03-b8ba-bf3cb93ca9d9Sat, 13 Jun 2015 00:38:00 -0100Design and DevelopmentAleh Matushttp://modelus.com/Blog/pingback.axdhttp://modelus.com/Blog/post.aspx?id=0de09af0-929b-4e03-b8ba-bf3cb93ca9d90http://modelus.com/Blog/trackback.axd?id=0de09af0-929b-4e03-b8ba-bf3cb93ca9d9http://modelus.com/Blog/post/2015/06/13/modeluscom-website-is-now-mobile-friendly!.aspx#commenthttp://modelus.com/Blog/syndication.axd?post=0de09af0-929b-4e03-b8ba-bf3cb93ca9d9Log4Net Extensions End of Support<p>Modelus Log4Net Extension Support is ending June 12, 2015. To assist you with a transition, the Extension library and its source code will be kept in their original locations until September 12, 2015. Contact us if you need our assistance. Happy Coding!</p>http://modelus.com/Blog/post/2015/06/11/Log4Net-Extensions-End-of-Support.aspx
http://modelus.com/Blog/post/2015/06/11/Log4Net-Extensions-End-of-Support.aspx#commenthttp://modelus.com/Blog/post.aspx?id=961df88d-9bcf-46d1-ad48-2feee47e9110Thu, 11 Jun 2015 06:08:00 -0100AnnouncementsDesign and DevelopmentAleh Matushttp://modelus.com/Blog/pingback.axdhttp://modelus.com/Blog/post.aspx?id=961df88d-9bcf-46d1-ad48-2feee47e91100http://modelus.com/Blog/trackback.axd?id=961df88d-9bcf-46d1-ad48-2feee47e9110http://modelus.com/Blog/post/2015/06/11/Log4Net-Extensions-End-of-Support.aspx#commenthttp://modelus.com/Blog/syndication.axd?post=961df88d-9bcf-46d1-ad48-2feee47e9110Are you are considering a new offshore project?<p>I am flying to Minsk this December. If you are considering a new project with our offshore team, let me know this week. Thank you.</p>http://modelus.com/Blog/post/2011/11/28/Interested-in-a-new-pr.aspx
http://modelus.com/Blog/post/2011/11/28/Interested-in-a-new-pr.aspx#commenthttp://modelus.com/Blog/post.aspx?id=accd5e6f-da4c-4d13-a9b4-2c00cb53fb84Mon, 28 Nov 2011 07:50:00 -0100Design and DevelopmentAleh Matushttp://modelus.com/Blog/pingback.axdhttp://modelus.com/Blog/post.aspx?id=accd5e6f-da4c-4d13-a9b4-2c00cb53fb840http://modelus.com/Blog/trackback.axd?id=accd5e6f-da4c-4d13-a9b4-2c00cb53fb84http://modelus.com/Blog/post/2011/11/28/Interested-in-a-new-pr.aspx#commenthttp://modelus.com/Blog/syndication.axd?post=accd5e6f-da4c-4d13-a9b4-2c00cb53fb84Modelus Specification 2.0 is released<p>
We released a new version of Specification. Download it <a href="http://modelus.com/Blog/Products/SpecificationPattern.aspx">here</a>. With this new release, we added support for .NET 4.0, .NET 3.5, and Silverlight and provided a number of pre-created collection specifications. Happy coding!
</p> http://modelus.com/Blog/post/2011/07/05/Modelus-Specification-20-is-released.aspx
http://modelus.com/Blog/post/2011/07/05/Modelus-Specification-20-is-released.aspx#commenthttp://modelus.com/Blog/post.aspx?id=23b28a99-8d28-4208-a998-6181f6a1a0b2Tue, 05 Jul 2011 02:36:00 -0100AnnouncementsDesign and DevelopmentAleh Matushttp://modelus.com/Blog/pingback.axdhttp://modelus.com/Blog/post.aspx?id=23b28a99-8d28-4208-a998-6181f6a1a0b20http://modelus.com/Blog/trackback.axd?id=23b28a99-8d28-4208-a998-6181f6a1a0b2http://modelus.com/Blog/post/2011/07/05/Modelus-Specification-20-is-released.aspx#commenthttp://modelus.com/Blog/syndication.axd?post=23b28a99-8d28-4208-a998-6181f6a1a0b2Installing Management Studio for SQL Server Express 2008 R2<p>I came across an issue trying to install SQL Server Management Studio on a computer with SQL Server 2008 R2 Express Edition. The installation program started fine but could not find any additional features to install.</p>
<p>The work-around is to choose <u>New Instance</u> during the installation. Everything runs smoothly after that. Happy coding!</p>http://modelus.com/Blog/post/2011/06/22/Installing-Management-Studio-for-SQL-Server-Express-2008-R2.aspx
http://modelus.com/Blog/post/2011/06/22/Installing-Management-Studio-for-SQL-Server-Express-2008-R2.aspx#commenthttp://modelus.com/Blog/post.aspx?id=2e3186f1-7d70-4342-a0bf-d1515666ddc3Wed, 22 Jun 2011 16:30:00 -0100Design and DevelopmentAleh Matushttp://modelus.com/Blog/pingback.axdhttp://modelus.com/Blog/post.aspx?id=2e3186f1-7d70-4342-a0bf-d1515666ddc30http://modelus.com/Blog/trackback.axd?id=2e3186f1-7d70-4342-a0bf-d1515666ddc3http://modelus.com/Blog/post/2011/06/22/Installing-Management-Studio-for-SQL-Server-Express-2008-R2.aspx#commenthttp://modelus.com/Blog/syndication.axd?post=2e3186f1-7d70-4342-a0bf-d1515666ddc3VS 2010 SP1 available for download<p>Microsoft released Service Pack 1 for Visual Studio 2010. <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=75568aa6-8107-475d-948a-ef22627e57a5&displaylang=en" target="_blank">Click here</a> to download the installer.</p>
<p>For more news and announcements, follow me on Twitter: <a href="http://twitter.com/alehmatus" target="_blank">http://twitter.com/alehmatus</a>. </p>http://modelus.com/Blog/post/2011/03/10/VS-2010-SP1-available-for-download.aspx
http://modelus.com/Blog/post/2011/03/10/VS-2010-SP1-available-for-download.aspx#commenthttp://modelus.com/Blog/post.aspx?id=58f688d5-eba7-4053-ad59-edbeeb6776a9Thu, 10 Mar 2011 23:01:00 -0100Design and DevelopmentNews and EventsAleh Matushttp://modelus.com/Blog/pingback.axdhttp://modelus.com/Blog/post.aspx?id=58f688d5-eba7-4053-ad59-edbeeb6776a90http://modelus.com/Blog/trackback.axd?id=58f688d5-eba7-4053-ad59-edbeeb6776a9http://modelus.com/Blog/post/2011/03/10/VS-2010-SP1-available-for-download.aspx#commenthttp://modelus.com/Blog/syndication.axd?post=58f688d5-eba7-4053-ad59-edbeeb6776a9Book Review: The Android Developer's Cookbook: Building Applications with the Android SDK<p>
<h2>James Steele and Nelson To<br />
<span>The Android Developer's Cookbook</span></h2>
</p>
<p>Smart-phone market and mobile web consumption are exploding.
Within the next few years, more users will connect to the Internet over mobile devices than desktops.
We are in the middle of the next technological revolution.</p>
<p>
Android has recently overtaken iPhone in US market share and continues to enjoy widespread adoption among device manufacturers.
James Steele's and Nelson To's cookbook helps get started building mobile applications for Android. Organized as a set of independent easy-to-follow recipes, it provides an excellent overview of the fast-growing Android development platform:
<ol>
<li>Threads, Services, Receivers</li>
<li>Activities, Intents</li>
<li>User Interface elements</li>
<li>Touches and Gestures</li>
<li>Audio and Video support</li>
<li>Communicating with other devices</li>
<li>Location services</li>
<li>Sensors</li>
</ol>
</p>
<p>I highly recommend this book to all levels of the experience. Happy reading!</p>
http://modelus.com/Blog/post/2011/01/28/January-book-review-The-Android-Developers-Cookbook-Building-Applications-with-the-Android-SDK.aspx
http://modelus.com/Blog/post/2011/01/28/January-book-review-The-Android-Developers-Cookbook-Building-Applications-with-the-Android-SDK.aspx#commenthttp://modelus.com/Blog/post.aspx?id=ae682f24-a7bd-4976-a983-a750c7c0ae2dFri, 28 Jan 2011 00:25:00 -0100Book RecommendationsDesign and DevelopmentAleh Matushttp://modelus.com/Blog/pingback.axdhttp://modelus.com/Blog/post.aspx?id=ae682f24-a7bd-4976-a983-a750c7c0ae2d0http://modelus.com/Blog/trackback.axd?id=ae682f24-a7bd-4976-a983-a750c7c0ae2dhttp://modelus.com/Blog/post/2011/01/28/January-book-review-The-Android-Developers-Cookbook-Building-Applications-with-the-Android-SDK.aspx#commenthttp://modelus.com/Blog/syndication.axd?post=ae682f24-a7bd-4976-a983-a750c7c0ae2dMarch Architect: Domain Model Structure - Part 4: Value Objects<p>In the <a href="http://modelus.com/Blog/post/2009/12/06/November-Architect-Domain-Model-Structure-Part-2-Entities.aspx">Part 2</a> and <a href="http://modelus.com/Blog/post/2010/01/19/January-Architect-Domain-Model-Structure-Part-3-Repositories.aspx">Part 3</a> of the Domain Model Structure series, we continued our discussion around how to organize classes inside your domain model. We defined Entities, looked at their relationships, and reviewed options for loading them into memory. This month, we will take a look at Value Objects.</p>
<h2>Discovering Value Objects</h2>
<p>Value Objects are domain model elements with no conceptual identity. They represent descriptive aspects of the domain and are fully defined by their state. Their behavior depends on what they are, not who they are. If they need to be tracked, they should be tracked with the elements they describe. Thus, they do not need an identity of their own. </p>
<p>We prefer to keep Value Objects immutable, i.e. changeable by full replacement only. Immutable Value Objects are safe to share (which increases performance), and easy to understand (which allows you to build complex behaviors). Let me give you an example based on a classical OO problem: </p>
<p><i>Assume you have two buckets of paint: b1 and b2. The first bucket b1 contains 1 gallon of yellow paint. The second bucket b2 contains 1 gallon of blue paint. Without looking into the code, could you answer the following questions about the results of the operation <i>b1.Add(b2)</i>?:
<ol><li>What will be returned by the Add method? Is it 2 gallons of green paint or nothing?</li>
<li>What will be in the the first bucket b1? Is it 2 gallons of green paint or 1 gallon of yellow paint?</li>
<li>What will be in the second bucket b2? Is it 1 gallon of blue paint or nothing?</li></ol></i></p>
<p>If you notice, we do not have a requirement to track buckets of paint. Thus, I will assume that Bucket is a Value Object and should be immutable. Since both buckets are immutable, they will contain their original values of 1 gallon of paint each and the result of the Add operation will be 2 gallons of green. With no convention in place, it would be impossible to answer these questions without checking the code or better yet unit tests first.</p>
<p>You domain has many Value Objects, a lot more than Entities. If you are having troubles seeing them in your system, take a closer look at the Entities. How are they being described? What are their attributes and properties? How are they being searched for or ordered by? The chances are you will be talking about Value Objects.</p>
<p>Examples: Address, DayPoint, Money, Range, SSN, etc.</p>
<h2>Domain Model Structure</h2>
<p>Value Objects along with Entities are main elements of the domain model. Many of them are small simple classes that will be widely used in your application.
Place them together in a sub-folder under the Domain Model root. We name this folder "Capability":</p>
<p><center><img src="http://modelus.com/images/blog/2010/Capability.png" alt="Domain Model Structure - Capability folder" /></center></p>
<p>You are likely to have a number of very complex Value Objects as well. I will try to discuss some of them in my future articles. </p>
<h2>Summary and Additional Tips</h2>
<p><ol>
<li>Never define an identity for a Value Object.</li>
<li>Consider overriding equality operators to match Value Objects using object attributes rather than object references.</li>
<li>Keep Value Objects immutable.</li>
<li>Place Value Objects used across many applications into a dedicated Domain Kernel library.</li>
<li>If you are interested in creating a simple base Value Object class, you can start with the one listed below:
<p><center><img src="http://modelus.com/images/blog/2010/ValueObjectTemplate.png" alt="Domain Model Structure - Value Object Template" /></center></p>
</li>
</ol></p>
<p>Happy coding! To be continued...</p>http://modelus.com/Blog/post/2010/03/31/March-Architect-Value-Objects.aspx
http://modelus.com/Blog/post/2010/03/31/March-Architect-Value-Objects.aspx#commenthttp://modelus.com/Blog/post.aspx?id=6a28f0ab-c540-4647-b915-418ed7e5ddd5Wed, 31 Mar 2010 07:09:00 -0100Design and DevelopmentThe ArchitectAleh Matushttp://modelus.com/Blog/pingback.axdhttp://modelus.com/Blog/post.aspx?id=6a28f0ab-c540-4647-b915-418ed7e5ddd50http://modelus.com/Blog/trackback.axd?id=6a28f0ab-c540-4647-b915-418ed7e5ddd5http://modelus.com/Blog/post/2010/03/31/March-Architect-Value-Objects.aspx#commenthttp://modelus.com/Blog/syndication.axd?post=6a28f0ab-c540-4647-b915-418ed7e5ddd5Videos from MIX10 conference available to downloadCheck out these session recordings from the MIX10 conference in Las Vegas (March 15-17, 2010): <a href="http://live.visitmix.com/videos/" target="_blank">http://live.visitmix.com/videos/</a>. Enjoy!http://modelus.com/Blog/post/2010/03/28/Videos-from-MIX10-conference-available-to-download.aspx
http://modelus.com/Blog/post/2010/03/28/Videos-from-MIX10-conference-available-to-download.aspx#commenthttp://modelus.com/Blog/post.aspx?id=c3e9a1e3-b346-47a1-9416-529d9dd25c2fSun, 28 Mar 2010 18:38:00 -0100Design and DevelopmentDesign and DevelopmentAleh Matushttp://modelus.com/Blog/pingback.axdhttp://modelus.com/Blog/post.aspx?id=c3e9a1e3-b346-47a1-9416-529d9dd25c2f0http://modelus.com/Blog/trackback.axd?id=c3e9a1e3-b346-47a1-9416-529d9dd25c2fhttp://modelus.com/Blog/post/2010/03/28/Videos-from-MIX10-conference-available-to-download.aspx#commenthttp://modelus.com/Blog/syndication.axd?post=c3e9a1e3-b346-47a1-9416-529d9dd25c2fVideos from MIX10 conference available to downloadCheck out these session recordings from the MIX10 conference in Las Vegas (March 15-17, 2010): <a href="http://live.visitmix.com/videos/" target="_blank">http://live.visitmix.com/videos/</a>. Enjoy!http://modelus.com/Blog/post/2010/03/28/Videos-from-MIX10-conference-available-to-download.aspx
http://modelus.com/Blog/post/2010/03/28/Videos-from-MIX10-conference-available-to-download.aspx#commenthttp://modelus.com/Blog/post.aspx?id=c3e9a1e3-b346-47a1-9416-529d9dd25c2fSun, 28 Mar 2010 18:38:00 -0100Design and DevelopmentDesign and DevelopmentAleh Matushttp://modelus.com/Blog/pingback.axdhttp://modelus.com/Blog/post.aspx?id=c3e9a1e3-b346-47a1-9416-529d9dd25c2f0http://modelus.com/Blog/trackback.axd?id=c3e9a1e3-b346-47a1-9416-529d9dd25c2fhttp://modelus.com/Blog/post/2010/03/28/Videos-from-MIX10-conference-available-to-download.aspx#commenthttp://modelus.com/Blog/syndication.axd?post=c3e9a1e3-b346-47a1-9416-529d9dd25c2fVisual Studio 2010 and Silverlight 4 launch date announced<p>
Microsoft announced the launch of both Visual Studio 2010 and Silverlight 4 on April 12, 2010 at the ASP.NET and Silverlight conference and expo in Las Vegas. <a href="http://www.devconnections.com/shows/SP2010ASP/default.asp?s=142" target="_blank">Click here</a> for the conference details.</p>
<p>Happy coding!</p>http://modelus.com/Blog/post/2010/03/25/Visual-Studio-2010-and-Silverlight-4-launch-date-announced.aspx
http://modelus.com/Blog/post/2010/03/25/Visual-Studio-2010-and-Silverlight-4-launch-date-announced.aspx#commenthttp://modelus.com/Blog/post.aspx?id=5879aa6a-38db-47dd-b978-5cb6b736e290Thu, 25 Mar 2010 15:59:00 -0100Design and DevelopmentAleh Matushttp://modelus.com/Blog/pingback.axdhttp://modelus.com/Blog/post.aspx?id=5879aa6a-38db-47dd-b978-5cb6b736e2900http://modelus.com/Blog/trackback.axd?id=5879aa6a-38db-47dd-b978-5cb6b736e290http://modelus.com/Blog/post/2010/03/25/Visual-Studio-2010-and-Silverlight-4-launch-date-announced.aspx#commenthttp://modelus.com/Blog/syndication.axd?post=5879aa6a-38db-47dd-b978-5cb6b736e290OTUG event on Tue, March 16, 2010<p>
<table border="0">
<tbody style="vertical-align:top">
<tr>
<td>Who:</td>
<td>Denis Ahearn and Casey Helbling</td>
</tr>
<tr>
<td>What:</td>
<td>An Overview of Ruby and Ruby on Rails from the Trenches</td>
</tr>
<tr>
<td>When:</td>
<td>Tuesday, March 16, 2010, 6:00 - 8:00 PM</td>
</tr>
<tr>
<td>Where:</td>
<td>Brady Educational Center (BEC) room LL03, University of Saint Thomas, St. Paul Campus</td>
</tr>
<tr>
<td>Cost:</td>
<td>Free</td>
</tr>
</tbody>
</table>
</p>
<p>Visit <a href="http://www.otug.org" target="_blank">OTUG</a> for more information.</p>http://modelus.com/Blog/post/2010/03/16/OTUG-event-on-Tue-March-16-2010.aspx
http://modelus.com/Blog/post/2010/03/16/OTUG-event-on-Tue-March-16-2010.aspx#commenthttp://modelus.com/Blog/post.aspx?id=80a6baf5-4c7f-4638-9c90-844cbcbf2333Tue, 16 Mar 2010 12:07:00 -0100Design and DevelopmentNews and EventsAleh Matushttp://modelus.com/Blog/pingback.axdhttp://modelus.com/Blog/post.aspx?id=80a6baf5-4c7f-4638-9c90-844cbcbf23330http://modelus.com/Blog/trackback.axd?id=80a6baf5-4c7f-4638-9c90-844cbcbf2333http://modelus.com/Blog/post/2010/03/16/OTUG-event-on-Tue-March-16-2010.aspx#commenthttp://modelus.com/Blog/syndication.axd?post=80a6baf5-4c7f-4638-9c90-844cbcbf2333Book Review: Working Effectively with Legacy Code<h2>Michael Feathers<br />Working Effectively with Legacy Code</h2>
<p>Legacy code is defined by Michael Feathers as code that lacks tests. Lack of tests makes the code hard to understand and difficult to change. When the code is changed, new subtle bugs are often inadvertently introduced. When the code breaks, countless hours are spent troubleshooting. </p>
<p>Does it sound familiar? If you are writing software professionally, the chances are you have worked with legacy code many times before. You may be working with legacy code now. If this is the case, you will find Michael Feathers' book invaluable.</p>
<p>Michael describes practical strategies and techniques to working effectively with both large and small untested code bases. He explains the mechanics of software change and provides insights into adding tests to and ultimately taking control of legacy code. </p>
<p>I recommend this book to all software developers. Happy reading!</p>http://modelus.com/Blog/post/2010/02/26/February-book-review-Working-Effectively-with-Legacy-Code.aspx
http://modelus.com/Blog/post/2010/02/26/February-book-review-Working-Effectively-with-Legacy-Code.aspx#commenthttp://modelus.com/Blog/post.aspx?id=21bc9bf6-b5ad-4988-884b-4dd3f0f2c91eFri, 26 Feb 2010 19:25:00 -0100Book RecommendationsDesign and DevelopmentAleh Matushttp://modelus.com/Blog/pingback.axdhttp://modelus.com/Blog/post.aspx?id=21bc9bf6-b5ad-4988-884b-4dd3f0f2c91e0http://modelus.com/Blog/trackback.axd?id=21bc9bf6-b5ad-4988-884b-4dd3f0f2c91ehttp://modelus.com/Blog/post/2010/02/26/February-book-review-Working-Effectively-with-Legacy-Code.aspx#commenthttp://modelus.com/Blog/syndication.axd?post=21bc9bf6-b5ad-4988-884b-4dd3f0f2c91eNovember Architect: Domain Model Structure - Part 2: Entities<p><a href="http://modelus.com/Blog/post/2009/08/22/August-Architect-NET-Solution-structure.aspx">Last month</a>, we started a discussion around how to organize classes inside your domain model in a clear, easy-to-understand, and easy-to-maintain way. We reviewed our objectives and discussed why they are important. This month, we will start revealing a story of a business domain for the purposes of developing a software application. We will look into what is being managed in the domain day to day: Entities.</p>
<h2>Discovering Entities</h2>
<p>There are a number of technical definitions of an Entity that are popular in the industry. For example, here is a definition from Eric Evans' book <a href="http://modelus.com/Blog/post/2008/02/29/February-book-review-Domain-Driven-Design.aspx">Domain Driven Design</a>, p. 89: <em>An object that is not fundamentally defined by its attributes, but rather by a thread of continuity and identity.</em></p>
<p>The way I prefer to think about Entities is what we manage in our domain day after day. Entities span through long periods of time and run across multiple systems. They often have lives well beyond our applications and must be effectively tracked. As a general rule, assume that mistakes in Entity identification and tracking are expensive to notice and repair.</p>
<p>To discover Entities in your domain, talk to your functional people and end users. Ask them to walk you through scenarios the new system should implement. How are your users going to use your application? What is important to them and why? What do they really care about? What is important to your company and how does it need to be reported? The chances are you will be talking about what needs to be tracked and how, thus you will be talking about Entities.</p>
<p>Examples: Person, Account, Loan, Application, Payment.</p>
<h2>Entity Relationships</h2>
<p>What are the relationships between your Entities? Before getting into technical details, create a simple analysis diagram that shows the Entities you have discovered and their relationships. Lets consider a simple example:
<p>Scenario 1: User logs in into the system to check the status of their applications and loans.</p>
<p>Scenario 2: User calls a Customer Service Representative (CSR) to reset their password.</p>
<p><center><img src="http://modelus.com/images/blog/2009/EntityRelationship.png" alt="Entity Relationship" /></center></p>
<p>Your research and conversations about the domain model revealed 4 Entities: Account, Person, Application, and Loan. Let us walk through the first scenario: <ol>
<li>User logs in into the system. The system needs to retrieve the user's security Account and verify their username, password, and any additional validation factors.</li>
<li>Upon successful login, the system retrieves a previously stored Person record based on Account information. Thus, you see an arrow from Account to Person. You learned that each Account has a corresponding Person record, but not all People have created an online Account. That explains the numerical values on the diagram.</li>
<li>Based on Person, the system retrieves their Application and Loan information. Thus, the arrows are shown from Person to Application and Loan. Person is created on the system with their first Application, but not all Applications are approved to become a Loan. Notice that there is no arrow between Application and Loan - we cannot determine its direction based on our current scenarios.</li>
</ol>Now, let us take a look at the second scenario: <ol>
<li>User cannot verify the security information during login and calls CSR to reset their password. CSR asks them a series of Personal questions and retrieves their Person record.</li>
<li>CSR retrieves the user's Account record for additional verification and resetting the password. Thus, you see an arrow from Person to Account.</li>
</ol>Do not worry about having a circular dependency between Account and Person on the Analysis diagram. In one of our next articles, we will show several implementation options for the relationships. We will not have a circular dependency in the final implementation.</p>
<h2>Domain Model Structure</h2>
<p>Account, Person, Application, and Loan are our first classes in the Domain Model. For now, place them together in a sub-folder under the Domain Model root. We name this folder "Operation":</p>
<p><center><img src="http://modelus.com/images/blog/2009/ModelStructureOperation.png" alt="Domain Model Structure - Operation folder" /></center></p>
<h2>Summary and Additional Tips</h2>
<p><ol>
<li>Entity is an object that is not fundamentally defined by its attributes, but rather by a thread of continuity and identity.</li>
<li>Entities span through time and space and are being tracked and managed in the day-to-day operations.</li>
<li>Discover Entities by talking to your functional and end users. Create simple Analysis diagrams as a result of these conversations.</li>
<li>Entity's primary responsibility is to maintain its continuity. Keep it simple by leaving complex behaviors out of its class definition.</li>
<li>Managing life-cycle of Entities is a complex and risky job. Try to keep the number of Entities in the system down. Too many Entities will defuse your model and create no value.</li>
<li>Compare Entities of the same type by their identity regardless of their form and history. Make identity type a Value Object.</li>
<li>If you are interested in creating a simple base Entity class, you can start with the one listed below:
<p><span style="color: #808080; "><span style="color: #808080; ">///&lt;summary&gt;</span></span><span style="color: #008000; "><span style="color: #008000; ">Base Entity Class</span></span>
<span style="color: #808080; "><span style="color: #808080; ">&lt;/summary&gt;</span></span>
<br/>
<span style="color: #0000ff; "><span style="color: #0000ff; ">public class</span></span><span style=""> </span><span style="color: #2b91af; "><span style="color: #2b91af; ">Entity</span></span>
<span style="">&lt;T&gt;
<br/>{<br/></span>
<span style="color: #0000ff; "><span style="color: #0000ff; ">&nbsp;&nbsp;&nbsp;&nbsp;public</span></span>
<span style=""> T ID { </span>
<span style="color: #0000ff; "><span style="color: #0000ff; ">get</span></span><span style="">; </span><span style="color: #0000ff; "><span style="color: #0000ff; ">protected set</span></span>
<span style="">; }<span style="">
</span></span><br/>
<span style="color: #0000ff; "><span style="color: #0000ff; ">&nbsp;&nbsp;&nbsp;&nbsp;public</span></span><span style=""> </span><span style="color: #0000ff; "><span style="color: #0000ff; ">static</span></span><span style=""> T NewID { </span><span style="color: #0000ff; "><span style="color: #0000ff; ">get</span></span><span style=""> { </span><span style="color: #0000ff; "><span style="color: #0000ff; ">return</span></span><span style=""> </span><span style="color: #0000ff; "><span style="color: #0000ff; ">default</span></span>
<span style="">(T); } }<span style="">
</span></span><br/><br/>
<span style="color: #808080; "><span style="color: #808080; ">&nbsp;&nbsp;&nbsp;&nbsp;///&lt;summary&gt;</span></span><span style="color: #008000; "><span style="color: #008000; ">Returns true if the object has not being stored in the system.</span></span>
<span style="color: #808080; "><span style="color: #808080; ">&lt;/summary&gt;</span></span><br/>
<span style=""><span style="">
</span></span>
<span style="color: #0000ff; "><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp;&nbsp;public</span></span><span style=""> </span><span style="color: #0000ff;"><span style="color: #0000ff; ">bool</span></span><span style=""> IsNew { </span><span style="color: #0000ff; "><span style="color: #0000ff;">get</span></span><span style=": x-small;"> { </span><span style="color: #0000ff; "><span style="color: #0000ff; ">return&nbsp;</span></span><span style="">Equals(NewID, ID); } }<span style="">
</span></span><br/>
<span style="color: #0000ff;"><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp;&nbsp;public</span></span>
<span style="">Entity(T id) { ID = id; }</span>
<br/>}
</p>
</li>
</ol>
</p>
<p>Happy coding! To be continued...</p>
</p>http://modelus.com/Blog/post/2009/12/05/November-Architect-Domain-Model-Structure-Part-2-Entities.aspx
http://modelus.com/Blog/post/2009/12/05/November-Architect-Domain-Model-Structure-Part-2-Entities.aspx#commenthttp://modelus.com/Blog/post.aspx?id=c355cda7-9c97-4ad1-9972-631ae64d20e8Sat, 05 Dec 2009 22:38:00 -0100Design and DevelopmentThe ArchitectAleh Matushttp://modelus.com/Blog/pingback.axdhttp://modelus.com/Blog/post.aspx?id=c355cda7-9c97-4ad1-9972-631ae64d20e80http://modelus.com/Blog/trackback.axd?id=c355cda7-9c97-4ad1-9972-631ae64d20e8http://modelus.com/Blog/post/2009/12/05/November-Architect-Domain-Model-Structure-Part-2-Entities.aspx#commenthttp://modelus.com/Blog/syndication.axd?post=c355cda7-9c97-4ad1-9972-631ae64d20e8