Tag Archives: c# library

TrueView V2 Beta, now with POCO support

TrueView V2 has some significant changes since the last version.  You can download the beta and code sample here.

POCO support

TrueView now supports POCO classes, that don’t need to be inherited or marked up with attributes. Now you can re-use your POCO assemblies in other applications, and remove the dependency on the TrueView framework.

To make your POCO classes viewable in the UI, add the following property:

    public Guid ID { get; set; }

To make your classes persistable, add a Version property:

    public long Version { get; set; }

Domain Class enhancements

  • Domain Classes no longer need to be marked with attributes
  • Optional Configuration classes can decouple Domain Objects from the TrueView framework
  • Better support for structs

Infrastructure Class enhancements

  • Infrastructure classes are now decoupled from Domain Classes.
  • IPersistenceInfrastructureService is now exposed, allowing custom Services to be injected at run-time.  TrueView provides FilePersistenceService and NhibernatePersistenceServices out of the box.
  • IExportInfrastructureService replaces the old PrintProvider, and allows you to export data for any Domain Object
  • IPresenterInfrastructureService replaces the old IUiPresenter.  You can control the formatting, and well as providing custom ‘adornments’ to display

UI enhancements

  • Error indicators are now shown next to the property that caused them
  • Custom adornments can be rendered next to an item in the Explorer view
  • Better use of screen estate using multiple columns
  • Improved drag/drop tips now show why certain operations cannot be performed
  • Inline Object and List properties allow users to see more detail without having to drill-down manually.
  • Hyperlinks make it easier to navigate to associated Objects and Lists
  • Additional Enum display options include Slider and Radio-Options.
  • Enum items can be filtered using IQuerySpecification<T>
  • A new Export function replaces the old Print option

Check out the included sample code to learn about the new features.

P.S. There’s a new DomainTypes library available as well.

Update to DomainTypes library

The initial release of DomainTypes was heavily influenced by the existing TrueView framework.  After spending much time working with a current client, it’s clear that a more ‘POCO’ approach has significantly more benefits.

Based on my findings (and questions over at StackOverflow), here are the major changes:

  • Refined and enhanced most of the interfaces
  • Removed the concept of persistent and transient classes
  • Domain Services and Application Services have explicit interfaces
  • Domain Objects no longer implement IDependencyAware
  • Removed the ITrackable interface

I’ve also added more examples to clarify how you might use the interfaces.

You can download the code here.  All comments are welcome.

P.S. Note that this library is NOT compatible with the current TrueView framework.  Watch this space for the new version!

http://evolving-software.co.uk/blog/wp-admin/post-new.php

Free .NET type library for Domain Driven Design + source code

I’ve observed a lot of newcomers to the DDD scene, and typically there’s lots of talk about Entities, Value Objects, Aggregate Roots, Repositories, Factories, IoC, and various technical concerns.

But I’m seeing a lot missing from the discussions.  Like “What about the locking implications around an Aggregate?” or “Must Value Objects be immutable“, or even “How do entities retrieve data if they can’t access a repository?“.

To that end, I’ve created a set of interfaces and base classes that represent the building blocks of DDD.  The idea is to get developers thinking about key concepts early in the design process, and let Intellisense provide some guidance.

You can download the source code here.  It has a Ms-Pl licence, so you can modify and use the code as you wish.

The DDD related interfaces are:

  • IDomainObject
  • IEntity
  • IAggregateRoot
  • IValueObject
  • IList<T>
  • IFactory<T>
  • IRepository<T>
  • IService<T>
  • ISpecification<T>
  • IQuerySpecification<TRequestor, TResult>

Additional interfaces for orthogonal concerns are:

  • IPersistable
  • IPersistableList<T>
  • IAudit
  • IAggregateLock
  • IAssertion
  • IDependencyAware
  • IDependencyLocator
  • ITrackable

Interfaces

This is still a work-in-progress, so feedback would be greatly appreciated.  In the next couple of posts, I’ll describe the interfaces and classes.

Download the C# project

P.S. The next version of TrueView will be based on these interfaces.  So if you code a domain model using the compiled library, TrueView will auto-generate a completely interactive UI (with the appropriate semantics) directly from your model.