Angular Factory/Service names not following styleguide

Description

There seems to have been confusion about how to name services, factories, and classes. The goal of this ticket is to move our naming conventions back inline with the OpenLMIS-UI Naming Conventions

Most common errors:

  • Factories and services are not lowercase camelCase

  • Modules should be dash-separated, not dot.separated

Acceptance Criteria

  • All modules are dash-separated

  • Javascript class names are uppercase CamelCase

  • Factories and services are lowercase camelCase

  • Services end with the word "Service"

  • Factories end with the word "Factory"

  • Controllers are uppercase CamelCase and end with the word "Controller"

Environment

None

QAlity Plus - Test Management

Checklists

Activity

Nick Reid 
January 2, 2017 at 11:08 PM

I'm updating the coding conventions for this ticket, and I'm worried about the factory naming convention that John-Papa uses, and I think we should continue with the pattern that we are already using — I'd appreciate your thoughts

John-papa style means all factory names are lowercase camelCase with no type appended to it — so our current `RequisitionFactory` would become `requisition` — which I feel would get weird in telling the difference between:

  • A created requisition object in a controller

  • A resolved route value named requisition

I'm going to update the naming convention to be 'requisitionFactory' (which should be applied to other places) — let me know if you disagree

Done
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Original estimate

Time tracking

3d 6h logged2h remaining

Components

Sprint

Fix versions

Priority

Time Assistant

Created December 1, 2016 at 7:58 PM
Updated January 20, 2017 at 12:20 PM
Resolved January 13, 2017 at 9:17 AM