How to name a new service in OFN

Thanks for your feedback!

So, from the 7 options…
I’d go for not using _service, that kills options 3, 4 and 7.
As discussed above option 6 (only resource name) could fall into one of the other categories but I think there should be space for non-ORM Data Objects in /services, for example, as mail_method or models/product_import/spreadsheet_data. This can be a separate topic for the future.

From the rest, I’d vote with Maikel for keeping the resource name in the beginning of the file name, that kills option 2.

that leaves us with option 1 and 5, basically, either resource/actor and resource/action. I think we can leave this open for each situation.

This would be the convention:
Services must start with the resource name (this resource can be a model or something not so specific) and be followed by the action they perform (reset, search, create) or the actor (aggregator, validator, syncer, etc).

Are you guys ok with this?

This would mean the following renames for existing services:

  • cart_service - - cart_populator
  • create_mail_method - - mail_method_create
  • create_order_cycle - - order_cycle_create
  • embedded_page_service - - page_embed
  • line_item_syncer :+1:
  • order_cycle_form :+1:
  • order_factory :+1:
  • order_syncer :+1:
  • order_update_issues :+1:
  • reset_order_service - - order_reset
  • restart_checkout - - checkout_restart
  • search_orders - - orders_search
  • subscription_estimator :+1:
  • subscription_form :+1:
  • subscription_validator :+1:
  • subscriptions_count :+1: