[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: starting the admin library



K.  Also, just as a general note when creating namespaces in ruby we should follow the rails conventions where the underscored version of a module or class is the file name - ie

    Admin::SomeModel

would be located on the file system at

    admin/some_model.rb

No good ever comes from violating that convention.  Don't know if that affects your name choices, admin feels pretty simple and correct to me (like Console, AdminConsole). 

On Jul 19, 2013, at 3:37 PM, Luke Meyer <lmeyer redhat com> wrote:

> I would call them "domain" rather than model. I.e. compositional.
> 
> ----- Original Message -----
> From: "Clayton Coleman" <ccoleman redhat com>
> To: "Luke Meyer" <lmeyer redhat com>
> Cc: "Openshift Dev" <dev lists openshift redhat com>
> Sent: Friday, July 19, 2013 3:29:12 PM
> Subject: Re: starting the admin library
> 
> Probably just admin - "-lib" suffixes are frowned upon.
> 
> Are these models true rails model objects (possibly subclasses), or more compositional logic? 
> 
> On Jul 19, 2013, at 3:22 PM, Luke Meyer <lmeyer redhat com> wrote:
> 
>> We've talked about putting functions into a central administrative library occasionally. This would centralize administrative functions currently spread around among various scripts, with the eventual goal of making them available for an administrative interface or for custom scripting (the current scripts remaining as simple wrappers to the same library).
>> 
>> In working on the admin-console I came across the first bit of functionality where this is needed (oo-stats) and thought I'd just get started. Since these functions will use the broker model objects, I created a directory under that. Presumably someday we can break out the broker model into a separate gem so that admin scripts/UI can just load that and not the entire broker.
>> 
>> Any objections/comments on the location/namespace? https://github.com/sosiouxme/origin-server/blob/f7526649d785f646fe9cf4672d621c23167dc862/controller/app/models/admin-lib/stats.rb
>> 
>> _______________________________________________
>> dev mailing list
>> dev lists openshift redhat com
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]