locked
plugin naming convention? RRS feed

  • Question

  • Hello - What type of naming convention do you use for plugins?  I think that class *library* names should map to entity names.  I think that the specific classes that are registered should correspond to the basic action for which they are registered.

    For example, if a class is used for pre-save then the class should be named PreSave.  If a class is used for post-save then the class should be named PostSave. This should provide the entry point into the class and then specific business rules should be delegated into specialized methods within the class or delegated into other specialized classes via the primary PreSave/PostSave plugin class.

    Do you agree or do you have a different opinion?

    Sunday, July 7, 2013 7:25 PM

All replies

  • I don't like the Pre / Post convention. One reason for this is that a plugin may require a combination of steps that are registered on the pre and post and async stages.

    Similarly I typically prefer not to make plugins entity-specific. Many plugins can be written to be reusable across entities.

    Overall, most names I go for are based on what the plugin does, with additional name parts for the implementation and the authoring company


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Monday, July 8, 2013 7:56 AM
    Moderator