Get the Bing + MSN extension Breaking news from around the world Get the Bing + MSN extension

Add it now
This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use. Learn more
Skip to main content
Microsoft
Cesar de la Torre
Cesar de la Torre
  • Home
  • DevBlogs
    • App Center
    • Azure DevOps
    • Visual Studio
    • Visual Studio Code
    • Visual Studio for Mac
    • Azure Artifacts
    • Azure Boards
    • Azure Pipelines
    • Azure Repos
    • Azure Test Plans
    • DevOps
    • C++
    • Java
    • JavaScript
    • PowerShell
    • Python
    • Q#
    • Scripting
    • TypeScript
    • Visual Basic
    • Visual C#
    • Visual F#
    • .NET
    • ASP.NET
    • NuGet
    • Xamarin
    • Apps for Windows
    • Azure Government
    • Bing Dev Center
    • Command Line
    • DirectX Developer Blog
    • IoT Developer
    • Microsoft Edge Dev
    • Microsoft Azure
    • Office 365 Development
    • Old New Thing
    • PIX on Windows
    • Premier Developer
    • Azure Cosmos DB
    • OData
    • Revolutions R
    • SQL Server Data Tools

    Cesar de la Torre

    Principal Program Manager at the .NET product Group (Microsoft Corp in Redmond, Seattle). Focus on Machine Learning .NET (ML.NET), .NET Core, Microservices based architecture, Docker Containers, Azure services. Check out http://dot.net/Architecture and https://github.com/dotnet/machinelearning-samples

    DDD

    Free eBook/Guide on ‘.NET Microservices – Architecture for Containerized .NET Applications’
    AvatarCesar De la TorreMay 10, 2017May 10, 201705/10/17

    The microservices architecture is emerging as an important approach for distributed mission-critical applications. In a microservice-based architecture, the application is built on a collection of services that can be developed, tested, deployed, and versioned independently. In addition, enterprises are increasingly realizing cost savings,

    Domain Events vs. Integration Events in Domain-Driven Design and microservices architectures
    AvatarCesar De la TorreFebruary 7, 2017Feb 7, 201702/7/17

    This blog post is about comparing several approaches of Domain Events vs. Integration Events patterns already published by the community. I might evolve this post depending on feedback and some implementations we’ll be doing in the short/medium term. So, feel free to discuss about it with comments at the end of this post.

    Just released our .NET Business Applications Technology Guide (MS PRESS eBook)
    AvatarCesar De la TorreJuly 11, 2013Jul 11, 201307/11/13

    What is this guide / eBook about?
    UPDATE – Dec.2013
    This same Guide has been published now as free MS PRESS eBook, here:
    http://blogs.msdn.com/b/microsoft_press/archive/2013/11/13/free-ebook-net-technology-guide-for-business-applications.aspx

    —
    A few days ago (late June 2013, at BUILD) we released a new paper showing a global and broad picture of Microsoft development technologies for custom LOB applications.

    Scoping CQRS and Event-Sourcing Guidance Project
    AvatarCesar De la TorreJanuary 12, 2012Jan 12, 201201/12/12

    I am collaborating with the patterns & practices team. We are considering doing a guidance project on implementing systems using the Command & Query Responsibility Segregation (CQRS) approach. This is not going to be a framework or reusable components. We are positioning this project as a learning journey and envision providing an experience report that describes building a sample app (reference implementation) to showcase various CQRS and Event Sourcing (ES) concepts &

    We completed the IASA-DDD Conference! (November 7th 2011)
    AvatarCesar De la TorreNovember 9, 2011Nov 9, 201111/9/11

    It was a remarkable DDD (Domain Driven Design) event in Madrid, Spain. We got around 150 attendees!!, and taking into account that this is the inaugural event from the IASA-Spain association, and this association was almost unknown in Spain, until now,

    Value-Object pattern implementation in .NET
    AvatarCesar De la TorreJuly 20, 2011Jul 20, 201107/20/11

    Regarding DDD patterns, here I link two nice Value-Object implementation samples:
    http://elegantcode.com/2009/06/07/generic-value-object/
    http://grabbagoft.blogspot.com/2007/06/generic-value-object-equality.html

    Published first ALPHA version of Domain Oriented N-Layered Architecture V2.0
    AvatarCesar De la TorreJuly 3, 2011Jul 3, 201107/3/11

    [UPDATED – April 2017] – IMPORTANT:  For up-to-date architecture and development guidance using .NET (i.e. .NET Core, ASP.NET Core, Docker containers, etc.) including Domain-Driven Design patterns, microservices architectures and other .NET related technologies like Xamarin for mobile apps check this landing page pointing to multiple NEW guides and reference applications:
    https://www.microsoft.com/net/architecture/
    Specifically,

    DDD-Exchange 2011
    AvatarCesar De la TorreJune 13, 2011Jun 13, 201106/13/11

    So, it was such a great event with Eric Evans, Udi Dahan and Greg Young.
    Here I post a few pictures I got.
    Before starting:

    Eric Evans presenting the Agenda:

    Q&A to Eric, Udi and Greg:

    Saying hello to Udi:

    Strong discussions below…

    Implementing a Value-Object Base class (Supertype pattern–DDD patterns related)
    AvatarCesar De la TorreJune 6, 2011Jun 6, 201106/6/11

    It is usually a recommended practice to have Value-Object base-class so we can have common functionality which can be used by all of our value-object classes. Typically, comparison methods or any other common subject for Value-Objects, should be included here.
    Below I show a sample Value-Object Base-Class:

    1
    public class <strong><span style="font-size: x-small">ValueObject<TValueObject></span></strong> : IEquatable<TValueObject><br />    where TValueObject : ValueObject<TValueObject><br />{

    1
        <br />public bool <strong>Equals(</strong>TValueObject other)<br />{<br />    if ((object)other == null)<br />        return false;<br /> <br />    //compare all public properties<br />    PropertyInfo[] publicProperties = this.GetType().GetProperties();<br /> <br />    if ((object)publicProperties != null<br />        &&<br />        publicProperties.Any())<br />    {<br />        bool result = true;<br />        foreach (var item in publicProperties)<br />        {<br />            //compare two values using default equatable method<br />            if (!item.GetValue(this, null).Equals(item.GetValue(other, null)))<br />            {<br />                result = false;<br />                break;<br />            }<br />        }<br /> <br />        return result;<br />    }<br />    else<br />        return true;<br />}<br /> <br />public override bool <strong>Equals(</strong>object obj)<br />{<br />    if ((object)obj == null)<br />        return false;<br /> <br />    ValueObject<TValueObject> item = obj as ValueObject<TValueObject>;<br /> <br />    if ((object)item != null)<br />        return Equals((TValueObject)item);<br />    else<br />        return false;<br /> <br />}<br /> <br />public override int <strong>GetHashCode()</strong><br />{<br />    int hashCode = 31;<br />    bool changeMultiplier = false;<br />    int index = 1;<br /> <br />    //compare all public properties<br />    PropertyInfo[] publicProperties = this.GetType().GetProperties();<br /> <br />    if ((object)publicProperties != null<br />        &&<br />        publicProperties.Any())<br />    {<br />        foreach (var item in publicProperties)<br />        {<br />            object value = item.GetValue(this, null);<br /> <br />            if ((object)value != null)<br />            {<br /> <br />                hashCode = hashCode * ((changeMultiplier) ? 59 : 114) + value.GetHashCode();<br /> <br />                changeMultiplier = !changeMultiplier;<br />            }<br />            else<br />                hashCode = hashCode ^ (index * 13);//only for support {"a",null,null,"a"} <> {null,"a","a",null}<br />        }<br />    }<br /> <br />    return hashCode;<br />}<br /> <br />public static bool <strong><span style="font-size: x-small">operator ==</span></strong>(ValueObject<TValueObject> x, ValueObject<TValueObject> y)<br />{<br />    // If both are null, or both are same instance, return true.<br />    if (System.Object.ReferenceEquals(x, y))<br />    {<br />        return true;<br />    }<br /> <br />    // If one is null, but not both, return false.<br />    if (((object)x == null) || ((object)y == null))<br />    {<br />        return false;<br />    }<br /> <br />    // Return true if the fields match:<br /> <br />    return x.Equals(y);<br /> <br />}<br /> <br />public static bool <span style="font-size: x-small"><strong>operator !=</strong></span>(ValueObject<TValueObject> x, ValueObject<TValueObject> y)<br />{<br />    return !(x == y);<br />}<br />}

    Don’t like EF 4.1 ‘Data Annotations’ for DDD Architectures implementation –’Fluent API’ fits better for that!
    AvatarCesar De la TorreMay 27, 2011May 27, 201105/27/11

    I write this post in order to get some feedback regarding what I currently think about EF 4.1 Data Annotations and how it fits in DDD Architectural styles.
    About DDD Architectural styles, here it is our Architecture Guide (Though we are actually writing its second edition,

    • 1
    • of
    • 2
    • 
    Archive
  • November 2019
  • September 2019
  • June 2019
  • May 2019
  • March 2019
  • May 2018
  • February 2018
  • November 2017
  • July 2017
  • May 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • September 2016
  • July 2016
  • June 2016
  • May 2016
  • February 2016
  • December 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • December 2013
  • July 2013
  • June 2013
  • March 2013
  • January 2013
  • November 2012
  • October 2012
  • September 2012
  • June 2012
  • May 2012
  • April 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • Top Bloggers
    Avatar

    Cesar De la Torre
    Principal Program Manager

    Topics

    Stay informed

    Login
    What's new
    • Surface Pro X
    • Surface Laptop 3
    • Surface Pro 7
    • Windows 10 apps
    • Office apps
    Microsoft Store
    • Account profile
    • Download Center
    • Microsoft Store support
    • Returns
    • Order tracking
    • Store locations
    • Buy online, pick up in store
    • In-store events
    Education
    • Microsoft in education
    • Office for students
    • Office 365 for schools
    • Deals for students & parents
    • Microsoft Azure in education
    Enterprise
    • Azure
    • AppSource
    • Automotive
    • Government
    • Healthcare
    • Manufacturing
    • Financial services
    • Retail
    Developer
    • Microsoft Visual Studio
    • Windows Dev Center
    • Developer Network
    • TechNet
    • Microsoft developer program
    • Channel 9
    • Office Dev Center
    • Microsoft Garage
    Company
    • Careers
    • About Microsoft
    • Company news
    • Privacy at Microsoft
    • Investors
    • Diversity and inclusion
    • Accessibility
    • Security
    English (United States)
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2019