On 01/13/2017 10:43 AM, Evan Rolfe wrote:
Hi all, I have a PR in which I've started to use namespaces to organise some new controllers and wanted to make sure everybody is onboard with this pattern since currently the only namespace we have in the controllers is Webui.
https://github.com/openSUSE/open-build-service/pull/2544
Those controllers are:
Source::KeyInfoController (https://github.com/evanrolfe/open-build-service/blob/8f016cb6b731e7d4261e4e2...)
Webui::Projects::PublicKeyController (https://github.com/evanrolfe/open-build-service/blob/8f016cb6b731e7d4261e4e2...)
Webui::Projects::SslCertificateController (https://github.com/evanrolfe/open-build-service/blob/8f016cb6b731e7d4261e4e2...)
In the case of Source::KeyInfoController this is an alternative to adding another method to SourceController which already has > 1600 lines. Namespacing will also allow us to follow a "one-controller-per-resource" (REST) pattern which would make the controller code simpler and more uniform.
Here is a pretty good article about this from our "Lord and Savior DHH™" http://jeromedalbert.com/how-dhh-organizes-his-rails-controllers/
Please let me know what you think.
-Evan
Hey, I like the idea. Seems to be a nice way to structure our code. Cheers Björn -- Björn Geuken - Rails Developer - Open Build Service SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org