Hello everyone, The topic of naming conventions has been raised on several occasions and I think we need to make a decision on how to go forward.
The general complaints about the API are that our conventions are inconsistent within themselves (Add is used in some places, With in others, and any number of prefix and suffixes). It's also been said that they're "too natural", and we're trying to make a spoken sentence out of the interface, which is making it actually less readable. We recently had a ticket that aimed to address the inconsistency by changing all WithXXX methods to use Addxxx, however I don't think that entirely fixes the problem. My proposition is that we do away with any superfluous verbs in our API. Primarily, the With's need to go entirely, as do any unneeded Add's and Set's. Take the following mapping: HasManyToMany<ChildObject>(x => x.Children) .WithChildKeyColumn("columnName") .WithParentKeyColumn("parentColumn") .WithTableName("childTable") .IsInverse(); We've got several With's, an Has, and an Is that I think we could get rid of. ManyToMany<ChildObject>(x => x.Children) .ChildKeyColumn("columnName") .ParentKeyColumn("parentColumn") .TableName("childTable") .Inverse(); That's not a huge difference, but it is cleaner. There will be cases where a verb is required, so obviously we shouldn't remove them all (SetAttribute comes to mind), however there are a lot we can remove. What does everybody think? James --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibernate@googlegroups.com To unsubscribe from this group, send email to fluent-nhibernate+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en -~----------~----~----~----~------~----~------~--~---