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
A new version of TrueView is in the pipeline for next year. The features on the whiteboard are:
- Better support for true DDD concepts
- Allow code models to be reused without TrueView
- Configuration without using .NET attributes
- Open architecture, to let consumers develop custom ‘persistence providers’
- More UI interception points, to allow greater customisation
- Auto-databinding features, for WPF and possibly Silverlight
- N-Tier support (finally)
And we’re considering making TrueView FREE for non-commercial use.
We’re going to need beta-testers for the new version, so if you’re interested please email us.
In the meantime, have a very Happy Christmas!
Finally got around to upgrading to Windows 7 RTM, only to be greeted with the following:
You cannot upgrade this prerelease version of Windows 7. Go online to see how to install Windows 7 and keep your files and settings
A quick Google found these instructions. Should save you the hassle of rebuilding your PC
The latest release has some UI fixes for TrueView, and mapping fixes for DataBridge. Download it here.
TrueView Fixes
- UI now shows changes if entities are modified inside constructors
- Corrected treenode selection when removing a previously selected node
- Fixed race condition when opening Entity property nodes
- Entity Property treenode no longer renders with the Entity’s style
- Fixed window layout for magnetic windows
- Fixed window positioning when overlaying windows
- Correctly identifies the top-most window in multi-monitor mode
- Exceptions when retrieving Summary value are no longer fatal
- Fixed Search Results window ownership in MyApplication.Load<T>(query, parameters)
- Shortcut key presses are now handled for multi-monitor mode
Enhancements
- ‘Short’ values now have smaller widgets (Strings)
- Improved ‘Version Check’ dialog messages
DataBridge Fixes
- Corrected writing of Component properties
- Fixed Foreign Key names for Entity properties of the same type
The latest release adds Dependency Injection to the mix. The default behaviour uses a simple Service Locator, but you can inject your own dependencies as you wish. See the user guide for more info.
BREAKING CHANGES:
The following interfaces now implement IServiceDependent:
- IEntity
- IFactory
- IRepository
- IService
Enhancements
- Added MyApplication.ServiceLocator (for locating Factory/Repository/Service classes)
- Added IServiceDependent for DependencyInjection services
- Added IService interface (similar to IFactory and IRepository)
- Services are now shown in the Class Library treeview
- MyApplication now raises EntityCreated event when entities come into scope
- MyApplication now raises EntityDisposed event when entities are no longer required
- MyApplication now raises ApplicationInitialised event at startup
- Many delegates moved out of classes (reduce API clutter)
- Added EntityListAttribute.HasUniqueItems, to determine if duplicate items are allowed
- Drag/Drop tip now detects duplicate items
- Replaced Class Library CheckBoxes with ToggleButton
- Added Search box to Class Library to allow easy finding of Entity classes
- Increased scrolling speed when using Drag/Drop on treeview
- ListView numeric columns are now right-aligned
- Re-instated “Explore” context-menu option for root Entities
- Added support for parameterised Methods
- Window buttons bar is now visible by default (to reduce flickering)
- Added AddRange & RemoveRange methods to TransientEntityList
- Added AddRange & RemoveRange methods to EntityList
- Search Form now shows Query text as query is built
- Boolean editor now changes value immediately
- Hitting F2 over a listview opens the editor beneath the mouse cursor
- ‘Short’ values now have smaller widgets (Numbers, Enums, Dates)
- Added new “Replace/Add” context-menu items for context sensitive queries
- “Open File” option renamed to “View File”
- Changed internal async command processing
- Added “Allow multi-monitor use” option for non-MDI interfaces
- Query List no longer shows “Type” in first header
- Entity treeview no longer scales when window is resized
- Changed error message when trying to execute HQL using MemoryCache provider
Fixes
- Reduced flickering when rendering/repainting controls
- Corrected header style for each window
- Correction in MyApplication.Start() to allow repeated calls
- Saving object graphs with unmapped entities now always forces NHibernatePersistence
- Corrected UI updates when setting Parameters
- Applied [Visible=false] attribute to all public interface members
- Exceptions no longer thrown if Providers aren’t defined in app.config
- Correction in collection/list count
- Correction in identifying parent widgets
- Fixed margin settings for collapsible panels
- Corrected identification/caching of icons for sub-classes
- Corrected icon for Namespace nodes
- ListView “Auto-resize” option now overrides user defined widths
- Window button tooltip is updated for Search Forms
- Corrected culture setting for DateTimePicker
- Better handling of exceptions when editor controls are rendered
- Now uses correct DateTimePicker rendering for Windows 7
- Corrected background colour in Enum editor
- Empty Category headers are no longer displayed
- Disabled “Explore” option for primitive types
- Corrected multiple argument injection in EntityList Add & Remove methods
- Reduced Drag/Drop tip flickering
- ListView “Property” column is now sized to fit
- Selected TreeView node is now scrolled into view
- Corrected border colour for Boolean editor
- Corrected Entity Relationships for properties in super classes
- Corrected event handler disposal in a few controls
Optimisations
- Improved string building performance
- Optimised widget detection at mouse co-ords
- DynamicMethods are now created lazily
- Entity Relationships are now resolved lazily
This release has some major UI rendering improvements, and a couple of enhancements to aid usability. TrueView DataBridge also has a couple of small fixes. Download them here
Enhancements:
- Drag/drop tip now explains the drop action
- Drag/drop tip now tries to stay on-screen, regardless of curson position
- Now allows new entities to be added to unsaved parent entities
- “Save This” tooltip now shows reason for being disabled (where applicable)
- Removed duplicate results in Search window
- Friendly names are now generated for generic lists
- Improved icons bitmap scaling quality
- Removed error messages when using IQuerySpecification with FilePersistence provider class
Fixes:
- UI refresh now updates all Entities
- Fixed stack overflow when tracking dirty entities in circular object graphs
- Corrected tracking of entities that are removed from lists
- Dynamic listbox ensures that property value is automatically loaded
- Fixed NullReferenceException when pressing Enter in an empty Queries List
- Fixed DataTimePicker background colour on Windows Vista
- Removed system beeps when entering/exiting edit controls (NumericUpDown is still a problem)
- Correct sizing of PropertyGrid columns
- Corrected enabled state for “Save This” menu item
- Corrected bold text clipping in Search treeview
- Allow NHibernate to use reflection-optimizer if configured to do so
- Menu and toolbar items are now updated if Undo/Redo fails
- Better alignment of Boolean radio-buttons
- Better sizing of bitwise(flag) enum listbox
- String compacting algorithm no longer creates null-terminated strings
Optimisations:
- Massive improvements to UI rendering performance
- Reduced startup time in MyApplication.Initialise (i.e. for unit testing)
- FilePersistence now flushes to disk less frequently
- Improved string building performance
Known issues:
- NumericUpDown editor still beeps when Enter is pressed
- Search Query Editor window doesn’t hide Boolean editors immediately (need to hit Escape twice)
The latest maintanance release fixes some glaring errors (sorry!).
The UI has also been updated for better usability – and now supports dynamic drop-down lists using IQuerySpecification. Read the user guide to learn more.
Enhancements:
- Moved MDI window toolbar to top (tab-like appearance)
- MDI window ‘tabs’ now toggle normal/maximised window state
- Added support for dynamic UI ‘lookup lists’ using IQuerySpecification
- User is prompted to email errors at shutdown
- Added “Communication Settings” to Preferences
- Added online version checking for Trial build
- Added Vista style TaskDialogs
- Dirty status is only shown for changed entities
- Collapsible panel widgets now highlight on mouse-hover
- Reduced flicker when changing between maximised windows
- Search “Add” now uses “Query Bookmarks”, which can be viewed after saving
- Added TransientEntityList class
- Default settings of AutoSave is now False
Fixes:
- Corrected UI updates when list Add/Remove is aborted
- Improved UI refreshing after performing commands
- Clearing a search form purges the internal cache
- Corrected Action button panel flow layout when resized
- Corrected tooltip rendering in Property treenodes
- Text no longer truncated in Action buttons
- Corrected MyApplication.IsStarted value
- Dialogs no longer displayed when Workbench isn’t running (for unit testing)
- Improved/optimised tracking of dirty entities within deep object graphs
- Now handles hidden/new properties
- Reattaches entities to NHibernate ISession before loading properties
- Improved NHibernate session management during Save operations
- Corrected ListView sorting for sub-items that are null
- Corrected ListView header sort icons for Vista
- Corrected lock-up when tabbing through PropertyGrid controls
- Corrected validation when dragging items from the Class Library
- Previous search results are cleared if query returns no matches
- Corrected “Unit of work” check for method Actions
- Added sync locking to allow rapid keyboard actions (e.g. keeping a key pressed)
- Now supports icons named after Interfaces
- Reset drag/drop label background colour
Optimisations:
- UI widgets are only refreshed once where possible
- Reduced amount of redrawing when listviews are refreshed
Known issues:
- DateTime editor doesn’t change background colour on Vista
- Preferences Editor doesn’t always render tree nodes
Cheltenham, UK, 10/03/2009
Evolving Software releases an update of “TrueView for .NET”, a framework for rapidly designing and creating business applications for Microsoft .NET.
TrueView helps .NET Developers and Business Experts share business knowledge, design interactive prototypes, and create flexible applications. Software teams use Domain Driven Design (an established technique for designing complex applications) to stay focused on essential business concepts.
“Absorbing business concepts can be pretty tough for development teams, especially when timescales are tight. Using TrueView, Developers can sit down with Business Experts, and use interactive prototypes to discuss the problem space. The feedback cycle reduces from days to hours.” explains Vijay Patel, founder of Evolving Software.
TrueView supports Agile development, Domain Driven Design, and the Naked Objects pattern. Combining these strategies allows developers to cut development times without compromising software quality.
Evolving Software is also offering personal licences to developers learning Domain Driven Design at discounted rates. Visit http://www.evolving-software.co.uk to learn more.
Thanks for all you comments. This release is based on your feedback, so please keep sending your comments. Download the latest version here.
Enhancements:
- Added PropertyGrid editor for unknown types (e.g. structs)
- Root entities can no longer be explored
- Top level nodes in Class Library treeview are now consolidated
- “Enter” now creates a new entity in Class Library
- Method buttons now have equal sizes
- Tweaked overall UI appearance (borders, padding, splitters, colours)
- Vertical splitter is removed if no methods are displayed
- Save action traces all affected entities
- Null EntityLists are now rendered with no grid lines
- Added “About Demo” window
- Added “Report a bug” option
- Trace log now saving in Zip compatible format
- “About” window now shows application information
- “About” window can be closed using Escape/Enter
- Failures in Query criteria no longer show dialog boxes (improved usability)
- Removed “Property was unchanged” message
- Clicking an empty area of the Actions panel hides Parameters listview
- “Edit Value” option is only shown in ‘Explorer’ mode
Fixes:
- Drag/drop now handles null EntityList properties
- Undo/redo now handles EntityLists
- Assembly resolve now handles upgrades/downgrades wherever possible
- Fixed “Collection modified exception” when resolving entity relationships
- Correction when identifying all parent entities
- Setting null values no longer attempts to create internal associations
- Corrected “Divide by zero” exception in memory calculation (for Vista64)
- Exceptions when invoking actions are only reported once
- Removing new instances from lists no longer causes ‘phantom’ dirty status
- Corrected “Paste new copy” functionality
- Action (method) button panel now expands correctly
- Application menu/toolbar are refreshed after clipboard operations
- Application menu/toolbar are refreshed after listview selection changes
- Corrected display of confirmation dialogs
- “Remove” item is now correctly enabled/disabled
- Corrected handling of ‘char’ editor
- Editors now change colour when they get focus
- Corrected change detection in ‘number’ editor
- File Editor now handles valid non-existing paths
- Added ‘IsMutable’ check when setting properties
- ValueObjects now share the same persistence details as their owner (Version, AccessDetails)
- Only critical exceptions are shown in a dialog
- Progress bar is not updated if form is disposing
- Trace message no longer appears when viewing an immutable object
- Saved Query filesnames now have 80 char limit
- Corrected NHibernate search queries for Component mappings
- Corrected NHibernate search queries for properties of same name, but different classes
- Corrected NHibernate search queries for subqueries of the same type
- Corrected re-hydration of saved Queries with multi-level subqueries
- All dialogs and forms are now disposed of explicitly
- Optimistic locking exceptions now show who modified the record, and when
Happy New Year!
We’re starting the year with a new release.
BREAKING CHANGES
- Upgraded to NHibernate 2.0.1GA (with breaking changes)
- Added InnerList property to IEntityList
- Changed NHibernate namespace to NH
- Removed EntityListAttribute.IListField
Enhancements:
- ValueObject now implements IValueObject
- AccessDetails now implements IValueObject
- Copy operations use a different colour when dragging primitives/ValueObjects
- MyApplication.Save only persists dirty objects in the graph
- TrueView is now responsible for object graph ‘cascading’
- Added PropertyAttribute.BackingFieldName
- EntityList now uses IEntityList.InnerList for NHIbernate collections
- Added custom NHibernatePropertyAccessor to auto-manage all property types
- Renamed “Paste Duplicate” menu item to “Paste New Copy”
Optimisations:
- Improved Save performance
- Improved UI update after setting a property
Fixes:
- Fixed duplicate entries in object graph traversal
- “Save this” never attempts to save other objects in the graph
- Cloning now handles ValueObjects
- Corrections in Entity version tracking
- SetProperty now automatically uses IValueObject.Clone()
- AddToList now automatically uses IValueObject.Clone()
- Interface inheritance hierarchies now correctly identified
- C#3.0 auto-property backing fields now identified
- NHibernate query builder now uses class metadata to identify correct property name
- Context menu doesn’t show duplicate Paste items for primitive values
- Exceptions during form close displayed with “Retry/Cancel” buttons
- Correction when validating property relationships
TrueView DataBridge 1.3.0901.05
BREAKING CHANGES
- Upgraded to NHibernate 2.0.1GA (with breaking changes)
Enhancements
- Added MSSQLServer2005 (default option)
- Removed FieldNamingStrategy – it is now auto-computed
- Interfaces are now “Unmapped” by default
- Now uses NHibernatePropertyAccessor to manage EntityList properties
- Uses PropertyAttribute.BackingFieldName if available
- Generated properties now have IDENTITY/INDEX attributes set
Optimisations
- Disabled ‘cascade’ options (TrueView is now responsible for cascading)
- Disabled “Select-before-update’
Fixes
- Corrected filter when creating interface mappings
- Component mappings no longer include OID or AccessDetail properties
- Corrected AssemblyResolve for strongly named assemblies