rajatv at thoughtworks.com
Thu Jan 7 07:52:30 UTC 2016
My preference is the same as what you've got there.
Fully namespaced Services and Controller allow for better reusability and
If all "deleteService" were named just that, it'll be mighty confusing to
use it in other places.
With regards to tying the folder path and the Service/Controller I'd mostly
go with that as that encourages simpler rules on how to namespace.
For the particular patch you mentioned, the namespaces had a bit of churn
which is sort of reflected in what exists in the patch now.
If we decide a convention, then we can go and change the bits when the
files change next.
On Wed, Jan 6, 2016 at 10:30 PM Richard Jones <r1chardj0n3s at gmail.com>
> Hi Horizon folks,
> We've been pretty good about namespacing the new angular code (to the
> extreme of having a bunch of very similar module files littered around, but
> that's angular/JS for you, so I'm not going to go on about it <wink>).
> Anyhoo. One thing I've noticed is that the services, factories and
> controllers inside those modules aren't being consistently named. We have
> got a mix of:
> Launch Instance:
> .factory('launchInstanceModel', launchInstanceModel);
> The new Images panel:
> .factory('horizon.app.core.images.row-actions.service', rowActions);
> and in the same patch:
> .factory('horizon.app.core.images.actions.deleteService', deleteService);
> I actually prefer the second form because it matches the filename
> ("row-actions.service.js") even though the module namespace doesn't match
> the file path ("/static/app/core/images/table/").
> Your thoughts?
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev