<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>Expert C# Business Objects - Review</title><link>http://davidhayden.com/blog/dave/category/30.aspx</link><description>Expert C# Business Objects - Review</description><managingEditor>Dave Hayden</managingEditor><dc:language>en-US</dc:language><generator>.Text Version 0.95.2004.101</generator><item><dc:creator>Dave Hayden</dc:creator><title>Expert C# 2005 Business Objects Book Review</title><link>http://davidhayden.com/blog/dave/archive/2006/09/09/Expert_CSharp_2005_Business_Objects_Book_Review.aspx</link><pubDate>Sat, 09 Sep 2006 11:53:00 GMT</pubDate><guid>http://davidhayden.com/blog/dave/archive/2006/09/09/Expert_CSharp_2005_Business_Objects_Book_Review.aspx</guid><description>&lt;H1&gt;&lt;FONT face=Verdana&gt;Expert C# 2005 Business Objects Book Review&lt;/FONT&gt;&lt;/H1&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;by &lt;/FONT&gt;&lt;A href="http://www.davidhayden.com/"&gt;&lt;FONT face=Verdana size=2&gt;David Hayden&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; ( &lt;/FONT&gt;&lt;A href="http://www.davidhayden.com/"&gt;&lt;FONT face=Verdana size=2&gt;Sarasota Florida ASP.NET Developer&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; )&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;A href="http://www.apress.com/book/bookDisplay.html?bID=10091" target=_blank&gt;&lt;IMG title="Expert C# 2005 Business Objects" alt="Expert C# 2005 Business Objects" src="http://www.davidhayden.com/photos/expertcsharp2005businessobjects.gif" align=right border=0&gt;&lt;/A&gt;A few weeks ago I received an email from a reader asking if I planned to write a chapter-by-chapter book review of Expert C# 2005 Business Objects Book Review like I did for its predecessor, &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/11/07/603.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/11/471.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Introduction to distributed, object-oriented architecture&lt;/FONT&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/14/476.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Features and functionality of the CSLA .NET Framework&lt;/FONT&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/16/479.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Key technolgies: Remoting, Serialization, Enterprise Services (COM+), Reflection, .NET role-based security, ADO.NET&lt;/FONT&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/19/486.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Building business object base classes in CSLA .NET&lt;/FONT&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/10/04/512.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Data Access and Security for the CSLA .NET Framework&lt;/FONT&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/10/24/563.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Object-Oriented Application Design - Business Rules and Domain Objects&lt;/FONT&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/10/30/586.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Implementing the Domain Layer&lt;/FONT&gt;&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Although the author suggests&amp;nbsp;Expert C# 2005 Business Objects&amp;nbsp;( &lt;A href="http://www.apress.com/book/bookDisplay.html?bID=10091" target=_blank&gt;Apress&lt;/A&gt; ) was essentially a complete rewrite to take advantage of the new features in the .NET 2.0 Framework, I didn't notice a lot of changes from Expert C# Business Objects. It felt like the same book to me, but to be fair, I didn't re-read Expert C# Business Objects again to refresh my memory. Due to my perception&amp;nbsp;that little has changed, I felt the links above to chapter summaries still hold true today.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;FONT face=Verdana&gt;Summary of Expert C# 2005 Business Objects&lt;/FONT&gt;&lt;/H2&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The purpose of the book is essentially to showcase the &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2006/06/20/2993.aspx"&gt;&lt;FONT face=Verdana size=2&gt;CSLA .NET Framework&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;, and lead the reader on a journey through its creation&amp;nbsp;as well as the&amp;nbsp;concepts and principles that shape it. One is essentially learning key technologies and concepts of &lt;A href="http://davidhayden.com/blog/dave/category/24.aspx?Show=All"&gt;object-relational mapping&lt;/A&gt; and creating domain ( business ) objects to support a distributed, scalable, and secure architecture.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;During the journey, the author introduces you to the entire spectrum of technologies&amp;nbsp;necessary for&amp;nbsp;databinding, implementing business rules, tracking the life-cycle of business objects, &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/category/24.aspx?Show=All"&gt;&lt;FONT face=Verdana size=2&gt;object-relational mapping&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;, and collaborating with other business objects. The author gets into the fundamentals of class design and discusses various interfaces ( IEditableObject, INotifyPropertyChanged, IBindingList, IDataErrorInfo, etc. ) and features in the .NET Framework ( serialization, reflection, delegates, etc. ) that&amp;nbsp;can be implemented to support&amp;nbsp;certain functionality.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The author discusses various object-oriented principles that govern the reason for assigning behavior to certain classes and why the domain objects collaborate in certain ways. He briefly mentions competing ideas and principles and the various pros and cons for choosing one over the other.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Most books only discuss the technology in a vacuum, leaving you to try to understand how to actually implement the technologies and concepts, but Expert C# 2005&amp;nbsp;Business Objects let's you&amp;nbsp;have your cake and eat it, too. You get 1) a great introduction to class design, object-oriented principles, functionality in the .NET Framework, &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/category/24.aspx?Show=All"&gt;&lt;FONT face=Verdana size=2&gt;object-relational mapping&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;, etc. and 2) pragmatic implementation of&amp;nbsp;those concepts&amp;nbsp;and technolgies to create a reusable framework for your business applications.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Even if like me you choose not to use &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2006/06/20/2993.aspx"&gt;&lt;FONT face=Verdana size=2&gt;CSLA .NET&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;, the book is extremely valuable. The concepts and technologies in the book can be used in your own applications and frameworks to implement databinding, business rules, lifecycle tracking of business objects, etc. You can also use the ideas as a stepping stone to create your own implementations.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;FONT face=Verdana&gt;Recommendations&lt;/FONT&gt;&lt;/H2&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;If you have the first book, &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/11/07/603.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;, I honestly don't think you need to read Expert C# 2005 Business Objects. I didn't notice a lot of major changes in concepts and learnings from the previous book.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;If you don't have Expert C# Business Objects and you are interested in business objects and object-relational mapping, the book is a must read in my opinion. It gives you a solid introduction to business object concepts and pragmatic implementation of those concepts into the CSLA .NET Framework.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Source: &lt;/FONT&gt;&lt;A href="http://www.davidhayden.com/"&gt;&lt;FONT face=Verdana size=2&gt;David Hayden&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; ( &lt;/FONT&gt;&lt;A href="http://www.davidhayden.com/"&gt;&lt;FONT face=Verdana size=2&gt;Sarasota Florida ASP.NET Developer&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; )&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Filed: &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/category/30.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects - Review&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;, &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/category/32.aspx?Show=All"&gt;&lt;FONT face=Verdana size=2&gt;.NET Books&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;, &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/category/24.aspx?Show=All"&gt;&lt;FONT face=Verdana size=2&gt;O/R Mappers&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Additional Resources: &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2006/03/14/2884.aspx"&gt;&lt;FONT face=Verdana size=2&gt;OOP and Design Patterns Resources - Books Websites Articles&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;img src ="http://davidhayden.com/blog/dave/aggbug/3032.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Dave Hayden</dc:creator><title>Expert C# Business Objects by Rockford Lhotka Book Review - Conclusion</title><link>http://davidhayden.com/blog/dave/archive/2004/11/07/603.aspx</link><pubDate>Sun, 07 Nov 2004 13:27:00 GMT</pubDate><guid>http://davidhayden.com/blog/dave/archive/2004/11/07/603.aspx</guid><description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects by Rockford Lhotka Review - Conclusion&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;----&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I will be providing a &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/category/30.aspx"&gt;&lt;FONT face=Verdana size=2&gt;chapter by chapter&amp;nbsp;review of Expert C# Business Objects&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; by Rockford Lhotka (&lt;/FONT&gt;&lt;A href="http://www.amazon.com/exec/obidos/tg/detail/-/1590593448/qid=1094910745/sr=8-1/ref=pd_ksr_1/102-2349741-0328941?v=glance&amp;amp;s=books&amp;amp;n=507846" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;Amazon&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;) as well as any thoughts and commentary when appropriate. Enjoy.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/11/471.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 1&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/14/476.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 2&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/16/479.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 3&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/19/486.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 4&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/10/04/512.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 5&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/10/24/563.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 6&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/10/30/586.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 7&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;This concludes my review of Expert C# Business Objects. Although there are additional chapters describing how to use the CSLA.NET framework via Windows Forms, Web Forms, and Web Services, they are implementational chapters and better read firsthand.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;----&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects&amp;nbsp;is highly recommended to anyone wanting an excellent tutorial on the how's and why's of building business objects for your applications. Regardless of whether you want to use CSLA.NET or not, the book is packed full of good information on key .NET technologies / practices and how to apply them to your design model.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The book doesn't assume much knowledge on .NET and business objects, so it is an excellent guide for beginners. However, I think intermediate and advanced developers will appreciate it as well. The chapters are constructed in a logical order that allows you to easily progress from chapter to chapter in a comfortable&amp;nbsp;manner.&amp;nbsp; The book has a good mix of technical and &amp;#8220;learning&amp;#8221; information spread within each chapter that makes it enjoyable to read.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;For more information on CSLA.NET, I recommend visiting Rockford Lhotka website at &lt;/FONT&gt;&lt;A href="http://www.lhotka.net/ArticleIndex.aspx?area=CSLA%20.NET" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;http://www.lhotka.net/ArticleIndex.aspx?area=CSLA%20.NET&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;From there you will find a whole list of links to help you further your knowledge.&lt;/FONT&gt;&lt;/P&gt;&lt;img src ="http://davidhayden.com/blog/dave/aggbug/603.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Dave Hayden</dc:creator><title>Expert C# Business Objects by Rockford Lhotka - Chapter 7 - Business Object Implementation - CSLA.NET</title><link>http://davidhayden.com/blog/dave/archive/2004/10/30/586.aspx</link><pubDate>Sat, 30 Oct 2004 11:53:00 GMT</pubDate><guid>http://davidhayden.com/blog/dave/archive/2004/10/30/586.aspx</guid><description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects by Rockford Lhotka - Chapter&amp;nbsp;7 - Business Object Implementation&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;----&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I will be providing a &lt;A href="http://davidhayden.com/blog/dave/category/30.aspx"&gt;chapter by chapter&amp;nbsp;review of Expert C# Business Objects&lt;/A&gt; by Rockford Lhotka (&lt;/FONT&gt;&lt;A href="http://www.amazon.com/exec/obidos/tg/detail/-/1590593448/qid=1094910745/sr=8-1/ref=pd_ksr_1/102-2349741-0328941?v=glance&amp;amp;s=books&amp;amp;n=507846" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;Amazon&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;) as well as any thoughts and commentary when appropriate. Enjoy.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/11/471.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 1&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/14/476.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 2&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/16/479.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 3&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/19/486.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 4&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;Read &lt;A href="http://davidhayden.com/blog/dave/archive/2004/10/04/512.aspx"&gt;Expert C# Business Objects Chapter 5&lt;/A&gt;.&lt;BR&gt;Read &lt;A href="http://davidhayden.com/blog/dave/archive/2004/10/24/563.aspx"&gt;Expert C# Business Objects Chapter 6&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Chapter&amp;nbsp;7 builds templates to help the developer organize and create c# business objects that implement the &lt;A href="http://www.lhotka.net/ArticleIndex.aspx?area=CSLA%20.NET" target=_blank&gt;CSLA.NET&lt;/A&gt; framework as well as actual c# business objects used to implement the sample project tracking application discussed in Chapter 6.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;----&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;This is another chapter, like Chapter 3 - Key Technologies, that alone is worth the purchase price of the book. This chapter is where the rubber meets the road and the developer puts together all the .NET technologies and business base classes discussed in previous chapters and builds a solid framework for their project.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The chapter begins by providing an overview of the lifecycle of business objects. Sequence diagrams are used to help visualize the life cycle where the perspective is given from the UI&amp;nbsp;viewpoint where objects are essentially managed. CSLA.NET uses &amp;#8220;Class-In-Charge&amp;#8221; for object creation, fetching, and immediate deletion which are exposed as static methods on the class.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Templates are created for various different types of business objects: editable root object, editable child collection, read-only NameValueLists, etc. that essentially can be used as a starting point for your own business objects. The following (see below) shows the common regions of a CSLA.NET business object.&amp;nbsp; I tosssed in some sample comments and data, but the chapter provides some really good detail on how these sections are implemented for various c# business objects. As a bonus, the reader also gets some good information about overriding basic object methods in your business components, whether you use CSLA.NET or not.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;[Serializable()]&lt;BR&gt;public class MyBusinessClass : CSLA.baseclass&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;#region Business Properties and Methods&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;#endregion&lt;BR&gt;&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;#region System.Object overrides&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;overrides&amp;nbsp;for ToString and&amp;nbsp;various Equals&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;#endregion&lt;BR&gt;&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;#region Static Methods&lt;BR&gt;&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public&amp;nbsp;static MyBusinessClass NewMyBusinessClass() { ... }&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static MyBusinessClass&amp;nbsp;GetMyBusinessClass() { ... }&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void DeleteMyBusinessClass() { ... }&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;#endregion&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;#region Constructors&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private MyBusinessClass()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Prevent Direct Creation&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;#endregion&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;#region Criteria&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Criteria for identifying existing object - example&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[Serializable()]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private class Criteria&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public int _id;&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public Criteria(int&amp;nbsp;id)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _id&amp;nbsp;= id;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;#endregion&lt;BR&gt;&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;#region Data Access&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // private implementation of data access CRUD methods&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;#endregion&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The last half of the chapter takes the business object templates built in the first half of the chapter and applies them to the project tracking sample application designed in chapter 6. Here you see&amp;nbsp;more useful&amp;nbsp;code for actual data tables and business root objects (aggregates), child collections, and read-only&amp;nbsp;NameValueLists. Real-world discussions of handling database transactions as well as making sure you process deletes in the databases first are also discussed in the end of the chapter. You also get to see the SafeDataReader and SmartDate objects in action to facilitate easier coding for the developer.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Certainly anyone walking away from Chapter 7 should have a pretty good understanding of CSLA.NET, business objects, and managing the business object lifecycle in general. Personally, the book could end here and I would be happy with the purchase.&amp;nbsp; However, it doesn't (bonus!). Now for the &lt;A href="http://davidhayden.com/blog/dave/archive/2004/11/07/603.aspx"&gt;conclusion&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;&lt;img src ="http://davidhayden.com/blog/dave/aggbug/586.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Dave Hayden</dc:creator><title>Expert C# Business Objects by Rockford Lhotka - Chapter 6 - Object-Oriented Application Design</title><link>http://davidhayden.com/blog/dave/archive/2004/10/24/563.aspx</link><pubDate>Sun, 24 Oct 2004 18:38:00 GMT</pubDate><guid>http://davidhayden.com/blog/dave/archive/2004/10/24/563.aspx</guid><description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects by Rockford Lhotka - Chapter&amp;nbsp;6 - Object-Oriented Application Design&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;----&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I will be providing a chapter by chapter summary of Expert C# Business Objects by Rockford Lhotka (&lt;/FONT&gt;&lt;A href="http://www.amazon.com/exec/obidos/tg/detail/-/1590593448/qid=1094910745/sr=8-1/ref=pd_ksr_1/102-2349741-0328941?v=glance&amp;amp;s=books&amp;amp;n=507846" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;Amazon&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;) as well as any thoughts and commentary when appropriate. Enjoy.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/11/471.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 1&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/14/476.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 2&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/16/479.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 3&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/19/486.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 4&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;Read &lt;A href="http://davidhayden.com/blog/dave/archive/2004/10/04/512.aspx"&gt;Expert C# Business Objects Chapter 5&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Chapter&amp;nbsp;6 walks the reader through the&amp;nbsp;design of a sample project tracking application. It describes building use cases, identifying entities and value objects, and creating database tables and stored procedures.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;----&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Chapter&amp;nbsp;6&amp;nbsp;focuses on the following key concepts:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Creation of a business object&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Implementation of business rules&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Transactional and nontransactional data access&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Parent-child relationships between objects&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Many-to-many relationships between objects&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Use of name-value lists&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Use of CSLA.NET security&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;This chapter is not very technical aside from showing the basic of database table design and stored procedures.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;&lt;STRONG&gt;Use Cases&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Rocky provides a decent overview of creating use cases for the sample project-&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;STRONG&gt;Project Maintenance&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Add a Project&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Edit a Project&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Remove a Project&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;STRONG&gt;Resource Maintenance&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Add a Resource&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Edit a Resource&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Remove a Resource&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;STRONG&gt;Assigning a Resource&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;&lt;STRONG&gt;Object Design&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Rocky then uses a form of decomposition for the object design, which identifies the &amp;#8220;nouns&amp;#8220; in the use cases and narrows down which of the &amp;#8220;nouns&amp;#8220; are business entities and value objects.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;He also identifies the security roles in the application based on the users in the use cases.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The chapter discusses overly complex relationships, in particular, circular containment issues.&amp;nbsp;Here is a quote from the chapter that I thought was worth mentioning:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;#8220;&lt;FONT face=Verdana size=2&gt;In a situation like this [circular containment issues], we should always be look for relationships that should be &lt;STRONG&gt;using&lt;/STRONG&gt;, instead of &lt;STRONG&gt;containing&lt;/STRONG&gt;. What we'll often find is that we're missing a class in our diagram - one that doesn't necessarily flow directly from the use cases, but is required to make the object model workable.&amp;#8220;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;#8220;&lt;FONT face=Verdana size=2&gt;The specific problem we're trying to deal with is that when we load an object from the database, it will typically also load any child objects in contains [no lazy loading here] - containment relationships will be followed in order to do the data loading. If we have an endless loop of containment relationships, that poses a rather obvious problem! We need some way to short-circuit the process, and the best way to do this is to introduce a &lt;STRONG&gt;using&lt;/STRONG&gt; relationship into the mix. Typically, we &lt;STRONG&gt;won't&lt;/STRONG&gt; follow a using relationship as we load objects.&amp;#8220;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The chapter then takes a moment to briefly reflect on performance and then shows UML diagrams to describe the overall design.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;&lt;STRONG&gt;Database Design&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The end of the chapter steps the reader through creating the database tables and stored procedures as well as establishing database security.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The next chapter, &lt;A href="http://davidhayden.com/blog/dave/archive/2004/10/30/586.aspx"&gt;Expert C# Business Objects Chapter 7, Business Object Implementation&lt;/A&gt;, takes you through creating the actual business objects.&lt;/FONT&gt;&lt;/P&gt;&lt;img src ="http://davidhayden.com/blog/dave/aggbug/563.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Dave Hayden</dc:creator><title>Expert C# Business Objects by Rockford Lhotka - Chapter 5 - Data Access and Security</title><link>http://davidhayden.com/blog/dave/archive/2004/10/04/512.aspx</link><pubDate>Mon, 04 Oct 2004 06:33:00 GMT</pubDate><guid>http://davidhayden.com/blog/dave/archive/2004/10/04/512.aspx</guid><description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects by Rockford Lhotka - Chapter 5 - Data Access and Security&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;----&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I will be providing a chapter by chapter summary of Expert C# Business Objects by Rockford Lhotka (&lt;/FONT&gt;&lt;A href="http://www.amazon.com/exec/obidos/tg/detail/-/1590593448/qid=1094910745/sr=8-1/ref=pd_ksr_1/102-2349741-0328941?v=glance&amp;amp;s=books&amp;amp;n=507846" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;Amazon&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;) as well as any thoughts and commentary when appropriate. Enjoy.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/11/471.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 1&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/14/476.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 2&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/16/479.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 3&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/19/486.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 4&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Chapter 5 discusses object persistence of business objects and the creation of tables and stored procedures.&amp;nbsp; This chapter is fairly technical, so the information here will be spotty at best.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;----&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Chapter 5 creates the following components in &lt;/FONT&gt;&lt;A href="http://www.lhotka.net/ArticleIndex.aspx?area=CSLA%20.NET" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;CSLA.NET&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;CSLA.Server.DataPortal.dll&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;CSLA.Server.ServicedDataPortal.dll&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;which are responsible for persisting business objects in your business framework.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;All business objects in you application will derive from one of four base classes:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;BusinessBase&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;BusinessCollectionBase&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;ReadOnlyBase&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;ReadOnlyCollectionBase&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;For these objects to support persistence, 5 virtual methods are added to each of these classes that must be overriden in your business classes:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;DataPortal_Create()&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;DataPortal_Fetch()&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;DataPortal_Update()&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;DataPortal_Delete()&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Save()&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;For example:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;virtual protected void DataPortal_Create(object criteria)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new NotSupportedException("Invalid operation - create no allowed");&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;These methods are not called directly by the object itself, but by the DataPortal Server object using reflection.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;For example, let's consider the following business object.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;[Serializable()]&lt;BR&gt;public class Employee : BusinessBase&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Serializable()]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public class Critieria&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string SSN;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public Criteria(string SSN)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.SSN = SSN;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; override protected void DataPortal_Create(object criteria)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Custom code needed to create object...&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Custom SQL Code...&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;FONT face=Verdana size=2&gt;During object creation an instance of the object's criteria class is passed to the DataPortal Server's create method:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;static public object DataPortalServer.Create(object criteria, object principal)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... GetMethod(criteria.GetType().DeclaringType, "DataPortal_Create") ...&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Using the criteria object, the portal can get the business object's "DataPortal_Create" method using reflection by using the DeclaringType property.&amp;nbsp; This method can then be invoked by the DataPortal to create the object. The other methods work in a similar fashion.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The rest of the chapter talks about database security and building utility classes, like SafeDataReader that automatically handles null values so you don't have to always write code like-&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;If (dr.IsDBNull(0))&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Handle null value appropriately&lt;BR&gt;}&lt;BR&gt;else&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Handle regular value appropriately&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;SafeDataReader automatically handles null appropriately.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;There is some pretty cool stuff in this chapter.&amp;nbsp; And, even if you don't want to use CSLA.NET in your projects, there are some good utility classes and best practices in CSLA.NET that can be of use in any project.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The next chapter, &lt;A href="http://davidhayden.com/blog/dave/archive/2004/10/24/563.aspx"&gt;Expert C# Business Objects Chapter 6 - Object-Oriented Application Design&lt;/A&gt;, takes you through creating a project to use CSLA.NET.&lt;/FONT&gt;&lt;/P&gt;&lt;img src ="http://davidhayden.com/blog/dave/aggbug/512.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Dave Hayden</dc:creator><title>Expert C# Business Objects by Rockford Lhotka - Chapter 4 - Business Framework Implementation</title><link>http://davidhayden.com/blog/dave/archive/2004/09/19/486.aspx</link><pubDate>Sun, 19 Sep 2004 07:40:00 GMT</pubDate><guid>http://davidhayden.com/blog/dave/archive/2004/09/19/486.aspx</guid><description>&lt;P&gt;&lt;A href="http://davidhayden.com/blog/dave/category/30.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; by Rockford Lhotka - Chapter 4 - Business Framework Implementation&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;----&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I will be providing a chapter by chapter summary of Expert C# Business Objects by Rockford Lhotka (&lt;/FONT&gt;&lt;A href="http://www.amazon.com/exec/obidos/tg/detail/-/1590593448/qid=1094910745/sr=8-1/ref=pd_ksr_1/002-8746182-7155236?v=glance&amp;amp;s=books&amp;amp;n=507846" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;Amazon&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;) as well as any thoughts and commentary when appropriate. Enjoy.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/11/471.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 1&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/14/476.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 2&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;Read &lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/16/479.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects Chapter 3&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Chapter 4 walks the reader through the creation of many of the business classes in &lt;/FONT&gt;&lt;A href="http://www.lhotka.net/ArticleIndex.aspx?area=CSLA%20.NET" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;CSLA.NET&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;----&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Chapter 4 uses the business concepts and key technologies discussed in chapters 1 - 3 to build many of the business classes in CSLA.NET:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Core.BindableBase&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Core.BindableCollectionBase&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;NotUndoableAttribute&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Core.UndoableBase&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;BusinessBase&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;BrokenRules&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;RulesCollection&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Rule&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;BusinessCollectionBase&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;ReadOnlyBase&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;ReadOnlyCollectionBase&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;SmartDate&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;This is one of those chapters that one really needs to read a couple of times and study to get real value.&amp;nbsp; It is not too advanced, but just a lot of technology and concepts thrown at the reader in one chapter. The chapter talks a lot about the real world issues of databinding, tracking business rules, and managing object statutes (IsNew, IsDirty, IsDeleted) as well as the author's desire to support n-level undo.&amp;nbsp; Throughout the chapter you actually build the classes mentioned above in Visual Studio.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The beginning of the chapter focuses mainly on the n-level undo functionality, which is a good education in the power of Reflection and Binary Serialization.&amp;nbsp; The &lt;FONT color=#ff0000&gt;Core.UndoableBase&lt;/FONT&gt; class essentially has 3 methods: &lt;FONT color=#ff0000&gt;CopyState()&lt;/FONT&gt;, &lt;FONT color=#ff0000&gt;UndoChanges()&lt;/FONT&gt;, and &lt;FONT color=#ff0000&gt;AcceptChanges()&lt;/FONT&gt;. CopyState() reads all private and public instance variables of an object, serializes them in binary fashion, and then pushes the snapshot on a stack.&amp;nbsp; UndoChanges() pops the snapshot off the stack and does just the opposite of CopyState().&amp;nbsp; AcceptChanges() just pops the stack.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Rockford then begins to focus on implementing the proper interfaces to support windows databinding, in particular, &lt;FONT color=#ff0000&gt;IEditableObject&lt;/FONT&gt;, which needs &lt;FONT color=#ff0000&gt;BeginEdit()&lt;/FONT&gt;, &lt;FONT color=#ff0000&gt;CancelEdit()&lt;/FONT&gt;, and &lt;FONT color=#ff0000&gt;ApplyEdit()&lt;/FONT&gt; methods.&amp;nbsp; He also discusses Object Status Tracking, which is essentially making sure objects are properly marked as New, Dirty, or Deleted so that the Save() method on an object knows whether to do an Insert, Update, or Delete in SQL on the object.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Next the chapter constructs the &lt;FONT color=#ff0000&gt;Rule&lt;/FONT&gt; and &lt;FONT color=#ff0000&gt;RulesCollection&lt;/FONT&gt; classes.&amp;nbsp; The rules are used by the DataPortal to decide if an object is valid.&amp;nbsp; If the object is valid (no broken rules in the RulesCollection), the object is saved, otherwise it is not.&amp;nbsp; The RulesCollection is also available to the UI developer to display errors.&amp;nbsp; The rules are not enforced, which means the business onbject could be invalid unless the developer throws the proper exceptions.&amp;nbsp; The rules framework only tracks broken rules and doesn't enforce them.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;There are some other goodies throughout the chapter dealing with handling dates, strongly-typed collections, and null values.&amp;nbsp; There is also a lot of good OOP concepts being thrown around to assure the developer cannot directly mess with certain areas of the business framework.&amp;nbsp; A lot of good use of Internal and Protected Internal access modifiers as well as virtual methods, operator overloading, events, etc.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Again, the chapter was excellent, but it is not an easy read and requires a bit more studying to get the full educational impact.&amp;nbsp; Before I continue with the next chapter, which starts to focus more on Data Access and Security, I am going to download the CSLA.NET source code (&amp;nbsp;&lt;/FONT&gt;&lt;A href="http://www.lhotka.net/Articles.aspx?id=2a10ff48-4642-454d-a5a0-2c8010f91794" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;CSLA .NET CS version 1.4&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;&amp;nbsp;) as well as read some other resources.&amp;nbsp; I also want to build a business object on top of the CSLA.NET framework and see it work for myself.&amp;nbsp; More on this in a couple of days.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Now&amp;nbsp;on to &lt;A href="http://davidhayden.com/blog/dave/archive/2004/10/04/512.aspx"&gt;Expert C# Business Objects, Chapter 5, Data Access and Security&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;&lt;img src ="http://davidhayden.com/blog/dave/aggbug/486.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Dave Hayden</dc:creator><title>Expert C# Business Objects by Rockford Lhotka - Chapter 3 - Key Technologies - Remoting - Serialization - Reflection</title><link>http://davidhayden.com/blog/dave/archive/2004/09/16/479.aspx</link><pubDate>Thu, 16 Sep 2004 10:14:00 GMT</pubDate><guid>http://davidhayden.com/blog/dave/archive/2004/09/16/479.aspx</guid><description>&lt;P&gt;&lt;A href="http://davidhayden.com/blog/dave/category/30.aspx" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; by Rockford Lhotka - Chapter 3 - Key Technologies&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;----&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I will be providing a chapter by chapter summary of Expert C# Business Objects by Rockford Lhotka (&lt;/FONT&gt;&lt;A href="http://www.amazon.com/exec/obidos/tg/detail/-/1590593448/qid=1094910745/sr=8-1/ref=pd_ksr_1/104-9213742-9111106?v=glance&amp;amp;s=books&amp;amp;n=507846" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;Amazon&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;) as well as any thoughts and commentary when appropriate. Enjoy.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/11/471.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Read Expert C# Business Objects Chapter 1&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;BR&gt;&lt;/FONT&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/14/476.aspx"&gt;&lt;FONT face=Verdana size=2&gt;Read Expert C# Business Objects Chapter 2&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Chapter 3 describes the key technologies used in the creation of the &lt;/FONT&gt;&lt;A href="http://www.lhotka.net/ArticleIndex.aspx?area=CSLA%20.NET" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;CSLA.NET&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; Framework.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;----&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;This chapter is extremely good from a technical perspective as it describes the following technologies and how they are used in CSLA.NET:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Remoting&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Serialization&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Enterprise Services (COM+)&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Reflection&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;.NET role-based security&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;ADO.NET&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;In my opinion, Rockford sums up the usefulness and practicality of these technologies very well in a single chapter.&amp;nbsp; I must have read the chapter three times, and in my opinion, this chapter alone is well worth the price of the book.&amp;nbsp; Although I cannot do the chapter justice, I wanted to briefly makes some points about Remoting, Serialization, and Reflection, which I found particularly interesting.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;Remoting&lt;BR&gt;&lt;/STRONG&gt;As I mentioned before, "remoting is all about allowing code running in one process to communicate with code running in a different process - even if that different process is on another machine across the network." - Rockford Lhotka&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The book discusses object proxies, formatters (binary and SOAP/XML), and channels (HTTP and TCP) used by the remoting subsystem to allow client-server communications.&amp;nbsp; Binary formatters were chosen in the CSLA.NET framework because they provide a &lt;FONT color=#ff0000&gt;deep copy of objects&lt;/FONT&gt; and the binary blob being sent over the channel is &lt;FONT color=#ff0000&gt;30% the size&lt;/FONT&gt; of payloads being sent by the SOAP/XML formatter.&amp;nbsp; The HTTP Channel is used as opposed to the TCP channel because it works best through firewalls and is easier to implement as it comes with IIS.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Rockford actually takes you through the building of a sample remoting project step-by-step.&amp;nbsp; Very cool indeed.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;Serialization&lt;/STRONG&gt;&lt;BR&gt;Serialization is used to convert a complex object type into a single byte stream. Remoting and Web Services use different types of serialization.&amp;nbsp; Remoting uses a type of serialization that finds all the variables within an object and converts their values into a byte stream.&amp;nbsp; To suppress serialization of some variables, you would need to use the [NonSerialized()] Attribute.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Web Services uses the XMLSerializer object, which only grabs public fields and public read-write properties only.&amp;nbsp; Web services will not serialize private fields, read only properties, or write only properties.&amp;nbsp; &lt;FONT color=#ff0000&gt;In short, The XMLSerializer does *not* make a clone of the object&lt;/FONT&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Rockford provides a useful code snippet, which is used in the CLSA.NET Framework, for manually invoking serialization for cloning objects using the binary formatter.&amp;nbsp; The following method would be placed in an object class-&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;public object Clone()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IO.MemoryStream buffer = new IO.MemoryStream();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Runtime.Serialization.Formatters.Binary.BinaryFormatter formatter = Runtime.Serialization.Formatters.Binary.BinaryFormatter();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; formatter.Serialize(buffer, this);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; buffer.Position = 0;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return formatter.Deserialize(buffer);&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;Reflection&lt;/STRONG&gt;&lt;BR&gt;The CLSA.NET framework uses Reflection quite a bit, which is especially important in the DataPortal.&amp;nbsp; The DataPortal needs to initiate business objects directly&amp;nbsp;even though the business objects have private constructors.&amp;nbsp; This is possible via reflection as long as the class has a parameterless private constructor.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Using reflection, one can get class and object information (fields, properties, methods, etc.) as well as set private and public variables and invoke methods on objects.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;You can get type information on a class:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Type typeData = typeof(string);&lt;BR&gt;Type typeData = typeof(Customer);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;or on an object:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Type typeData = objCustomer.GetType();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Using the type information, for example, you can then get all private instance variables and their values:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;FieldInfo[] fields = typeData.GetFields(BindingFlags.Instance | BindingFlags.NonPublic);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;foreach (FieldInfo field in fields)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Diagnostics.Debug.WriteLine(field.Name&amp;nbsp; + ": " + field.GetValue(cust).ToString();&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;Conclusion&lt;/STRONG&gt;&lt;BR&gt;This chapter was really cool.&amp;nbsp; A good practical overview on the power of these key technologies.&amp;nbsp; &lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/19/486.aspx"&gt;Expert C# Business Objects by Rockford Lhotka Chapter 4 Business Framework Implementation&lt;/A&gt; goes into further detail on how these key technologies are applied in CLSA.NET.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src ="http://davidhayden.com/blog/dave/aggbug/479.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Dave Hayden</dc:creator><title>Expert C# Business Objects by Rockford Lhotka - Chapter 2 - Framework Design - CSLA - Component-Based, Scalable, Logical Architecture</title><link>http://davidhayden.com/blog/dave/archive/2004/09/14/476.aspx</link><pubDate>Tue, 14 Sep 2004 08:07:00 GMT</pubDate><guid>http://davidhayden.com/blog/dave/archive/2004/09/14/476.aspx</guid><description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;A href="http://davidhayden.com/blog/dave/category/30.aspx" target=_blank&gt;Expert C# Business Objects&lt;/A&gt; by Rockford Lhotka - Chapter 2 - Framework Design&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;----&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I will be providing a chapter by chapter summary of Expert C# Business Objects by Rockford Lhotka (&lt;A href="http://www.amazon.com/exec/obidos/tg/detail/-/1590593448/qid=1094910745/sr=8-1/ref=pd_ksr_1/104-9213742-9111106?v=glance&amp;amp;s=books&amp;amp;n=507846" target=_blank&gt;Amazon&lt;/A&gt;) as well as any thoughts and commentary when appropriate. Enjoy.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Read &lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/11/471.aspx" target=_blank&gt;Expert C# Business Objects Chapter 1&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Chapter 2 talks about the high-level functions and capabilities we want out of the business framework, &lt;A href="http://www.lhotka.net/ArticleIndex.aspx?area=CSLA%20.NET" target=_blank&gt;CSLA.NET&lt;/A&gt;, that is going to be built throughout the book.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;----&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;In chapter 2, Rockford begins to discuss the functionality built into the framework design:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;n-Level undo capability&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Tracking broken business rules to determine whether an object is valid&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Tracking whether an object's data has changed (is it "dirty"?)&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Support for strongly-typed collections of child objects&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;A simple and abstract model for the UI developer&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Full support for databinding in both Windows Forms and Web Forms&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Saving objects to a database and getting them back again&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Table-driven security&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Other miscellaneous features&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Rockford decides to use a "&lt;FONT color=#ff0000&gt;Class in Charge&lt;/FONT&gt;" model for the simple and abstract model for UI development, which is where the business class has static methods to handle the creation of the new class as well as save and get instances:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;[Serializable()]&lt;BR&gt;public class Customer&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private Customer() {...}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private Customer(...) {...}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static Customer NewCustomer()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create new customer&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set default values&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Return Customer Object&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Rockford talks a bit about enabling the new business objects for databinding by supporting the &lt;FONT color=#ff0000&gt;IEditableObject&lt;/FONT&gt; interface and handling property change events as well as the business collections supporting the &lt;FONT color=#ff0000&gt;IBindingList&lt;/FONT&gt; Interface.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Throughout the second half of the book the reader is introduced to all the classes in the &lt;A href="http://www.lhotka.net/ArticleIndex.aspx?area=CSLA%20.NET" target=_blank&gt;CSLA.NET Framework&lt;/A&gt;.&amp;nbsp; For business object creation, for example, the following classes are available for which to inherit your own business classes:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;BusinessBase&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;BusinessCollectionBase&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;ReadOnlyBase&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;ReadOnlyCollectionBase&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;SafeDataReader&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;SmartDate&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;NameValueList&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;If you want to create an editable business object that supports n-level undo, tracking of business rules, object persistence, etc., you just inherit from BusinessBase:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;[Serializable()]&lt;BR&gt;public class Customer : &lt;FONT color=#ff0000&gt;BusinessBase&lt;/FONT&gt;&lt;BR&gt;{&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The chapter goes on to discuss the different classes as well as the high-level functionality in detail.&amp;nbsp; Here is an example on how the broken rules work:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;public int Quantity&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; get { return _quantity; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _quantity = value;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#ff0000&gt;BrokenRules.Assert&lt;/FONT&gt;("BadQuantity", "Qty must be positive", _quantity &amp;lt; 0);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#ff0000&gt;BrokenRules.Assert&lt;/FONT&gt;("BadQuantity", "Qty can't exceed 100", _quantity &amp;gt; 100);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MarkDirty();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The chapter ends with discussion on the DataPortal functionality, which is responsible for handling object persistence.&amp;nbsp; I won't go into it in detail, but Rockford focuses on how the DataPortal, and object persistence in general, should work whether the client is running in the same process on the same machine or a different process on a different machine.&amp;nbsp; And, the developer should not have to change any code (only config settings) if the client is moved to a separate tier.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Read &lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/16/479.aspx"&gt;Expert C# Business Objects by Rockford Lhotka - Chapter 3 - Key Technologies&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;&lt;img src ="http://davidhayden.com/blog/dave/aggbug/476.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Dave Hayden</dc:creator><title>Expert C# Business Objects by Rockford Lhotka - Chapter 1 - Distributed Architecture</title><link>http://davidhayden.com/blog/dave/archive/2004/09/11/471.aspx</link><pubDate>Sat, 11 Sep 2004 07:01:00 GMT</pubDate><guid>http://davidhayden.com/blog/dave/archive/2004/09/11/471.aspx</guid><description>&lt;P&gt;&lt;A href="http://davidhayden.com/blog/dave/category/30.aspx" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;Expert C# Business Objects&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; by Rockford Lhotka - Chapter 1 - Distributed Architecture&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;----&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I will be providing a chapter by chapter summary of Expert C# Business Objects by Rockford Lhotka (&lt;A href="http://www.amazon.com/exec/obidos/tg/detail/-/1590593448/qid=1094910745/sr=8-1/ref=pd_ksr_1/103-1288742-5679828?v=glance&amp;amp;s=books&amp;amp;n=507846" target=_blank&gt;Amazon&lt;/A&gt;) as well as any thoughts and commentary when appropriate. Enjoy.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Chapter 1 essentially introduces terms, concepts, and a layered architecture that will be used to build a framework, called &lt;/FONT&gt;&lt;A href="http://www.lhotka.net/ArticleIndex.aspx?area=CSLA%20.NET" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;CSLA&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; (component-based, scalable, logical architecture).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;----&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;In chapter 1, the author introduces us to the concepts and issues surrounding distributed, object-oriented architecture.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Rockford describes n-tier architecture from both a logical and physical perspective. When most people talk about n-tier applications, they're talking about physical models in which the application is spread across multiple machines and different functions: a client, a web server, an application server, a database server, and so on.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;A logical n-tier architecture (personally I call this a layered architecure) is about spreading different types of functionality.&amp;nbsp; The most common logical separation is into a UI tier, a business tier, and a data tier that may exist on a single maching, or on three separate machines - the logical architecture doesn't define those details.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;After discussing the impact different logical and physical n-tier architectures have on application complexity, performance, security, scability, etc., Rockford describes the Five Logical Tiers and the Roles They Provide:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;Presentation&lt;/STRONG&gt; - Renders display and collects user input&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;UI&lt;/STRONG&gt; - Acts as an intermediary between the user and the business logic, taking use input and providing it to the business logic, then returning results to the user.&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;Business logic&lt;/STRONG&gt; - Provides all business rules, validation, manipulation, processing, and security for the application.&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;Data access&lt;/STRONG&gt; - Acts as an intermediary between the business logic and data management. Also encapsulates and contains all knowledge of data-access technologies (such as ADO.NET), databases, and data structures.&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;Data storage and management&lt;/STRONG&gt; - Physically creates, retrieves, updates, and deletes data in a persistent data store.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Typically in an application, one ends up duplicating the business logic in several logical tiers. You can't trust the browser (for a web application), so one re-checks the business rules in the business layer. You can't trust the business layer, so one re-checks the business rules in the data access area.&amp;nbsp; After much discussion on where to put the business logic in a distributed application, it is decided that the business logic tier definitely still remains a separate concept from the other tiers, but it's directly used by and tied into both the UI and the data-access tiers.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Once the ideal logical architecture is known, Rockford begins to briefly discuss Business Objects and OOP as well as the concepts of Anchored Objects and Unanchored objects.&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;Anchored object&lt;/STRONG&gt; - When an anchored object is "passed" from one machine or process to another, only a pointer, or reference, is passed, not the object itself.&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;Unanchored object&lt;/STRONG&gt; - When an unanchored object is "passed" from one machine or process to another, the object is physically copied and passed by value.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Rockford then concludes the chapter by describing how the use of anchored and unanchored objects impact the other tiers, which get us ready for &lt;A href="http://davidhayden.com/blog/dave/archive/2004/09/14/476.aspx"&gt;Expert C# Business Objects by Rockford Lhotka - Chapter 2, Framework Design&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;&lt;img src ="http://davidhayden.com/blog/dave/aggbug/471.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>