Children
Contents
One class per .cs file
Why? Because your checkins are much clearer and it confuses because in most files this is the case
When? Nearly always
Except...you have a lot of really small classes with tight coupling to play some test scenario. Then it might be clearer to have them together.
Hibernate
Hibernate mappings next to your .cs files*
Why?
To make finding hbm files easy for everyone
When? Always.
Except..There are some 'old' mapping files (DelftTools.hbm.xml and SharpMapGis.hbm.xml). Then convention is not applied there yet.
Aspect Oriented Programming
- NotifyCollectionChange
- NotifyPropertyChange
- Event bubbling
- add your questions here
Recommended Plugin Project Layout
DeltaShell.Plugins.DemoPlugin/ Domain/ Animal.cs Animal.hbm.xml AnimalExtensions.cs Bear.cs BearProperties.cs Bear.hbm.xml Lizard.cs Lizard.hbm.xml Models/ ForestLifeModel.cs Forms/ AnimalControl.cs AnimalControl.Designer.cs AnimalControl.resx ForestLifeModelView.cs ForestLifeModelView.Designer.cs ForestLifeModelView.resx Uml/ Animals.cd DemoPlugin.cd DemoPlugin.cs DemoPluginPropertyProvider.cs DemoPluginDataProvider.cs DemoPluginViewProvider.cs
Views
When view is created for a specific data object, this object is injected via the view's Data property. View checks if data is correct and subscribes to the object's events.
If view is closed by user (in which case Delta Shell removes it from its ViewsCollection), Delta Shell sets the Data property to null. In this case View is responsible for unsubscribing from events, and delegating this responsibility to the objects it contains.