"environment" vs "model" in the code

Anastasia Macmood anastasia.macmood at canonical.com
Mon Jan 18 03:13:00 UTC 2016


Menno

Ian is traveling, so the renaming discussion will take place when he is
back online full-time - most likely Wednesday for us...

Renames scheduled for this iteration are:

* CLI;
* user facing text;
* api facades [methods and parameter names].

This is scheduled for this Iteration but we all know that this is
ahopeful list and there are complexities. So, whether all these renames
will land in this Iteration or not can only be determined once we start
rolling \o/

To minimise conflicts, I'd second suggestion to have all new work to
have "model" and not to touch existing functionality... Yes, there will
be "inconsistencies" \o/ BUT, if all goes well, the inconsistencies will
be short-lived (/me crosses fingers)

Sincerely Yours,

Anastasia

PS. Please notice the big BUT :D

On 18/01/16 10:35, Menno Smits wrote:
> +1 to what Roger said. New features always require changes to existing
> code so inconsistency is unavoidable if we take a piecemeal approach.
>
> Given that a big rename is planned at some point, and that renaming
> can be largely automated, continuing to use "environment" internally
> until the big rename happens may make more sense in terms of
> maintainability.
>
> Thoughts?
>
>
>  
> On 15 January 2016 at 21:05, roger peppe <roger.peppe at canonical.com
> <mailto:roger.peppe at canonical.com>> wrote:
>
>     On 15 January 2016 at 06:03, Ian Booth <ian.booth at canonical.com
>     <mailto:ian.booth at canonical.com>> wrote:
>     >
>     >
>     > On 15/01/16 10:16, Menno Smits wrote:
>     >> Hi all,
>     >>
>     >> We've committed to renaming "environment" to "model" in Juju's
>     CLI and API
>     >> but what do we want to do in Juju's internals? I'm currently adding
>     >> significant new model/environment related functionality to the
>     state
>     >> package which includes adding new database collections, structs and
>     >> functions which could include either "env/environment" or
>     "model" in their
>     >> names.
>     >>
>     >> One approach could be that we only use the word "model" at the
>     edges - the
>     >> CLI, API and GUI - and continue to use "environment"
>     internally. That way
>     >> the naming of environment related things in most of Juju's code and
>     >> database stays consistent.
>     >>
>     >> Another approach is to use "model" for new work[1] with a hope
>     that it'll
>     >> eventually become the dominant name for the concept. This will
>     however
>     >> result in a long period of widespread inconsistency, and it's
>     unlikely that
>     >> things we'll ever completely get rid of all uses of "environment".
>     >>
>     >> I think we need arrive at some sort of consensus on the way to
>     tackle this.
>     >> FWIW, I prefer the former approach. Having good, consistent
>     names for
>     >> things is important[2].
>     >>
>     >
>     > Using "model" for new work is the correct approach - new chunks
>     of work will be
>     > internally consistent with the use of their terminology. And we
>     will be looking
>     > to migrate existing internal code once we tackle the external
>     facing stuff for
>     > 2.0. We don't want to add to our tech debt and make our future
>     selves sad by
>     > introducing obsoleted terminology for new work.
>
>     The other side of this coin is that, as Menno says, now the code base
>     will be harder to read because it will be inconsistent throughout (and
>     not consistently inconsistent either, because the new work is bound to
>     cross domain boundaries).
>
>     Given that it's not hard to make automated source code changes in Go
>     (given gofmt, gorename, gofix etc), I wonder if doing it this way
>     might
>     just be making things harder for people maintaining the code without
>     actually making things significantly easier in the long run.
>
>       cheers,
>         rog.
>
>     --
>     Juju-dev mailing list
>     Juju-dev at lists.ubuntu.com <mailto:Juju-dev at lists.ubuntu.com>
>     Modify settings or unsubscribe at:
>     https://lists.ubuntu.com/mailman/listinfo/juju-dev
>
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20160118/dec4f81b/attachment.html>


More information about the Juju-dev mailing list