Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(265)

Issue 194080043: Reorganize view code.

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 4 months ago by frankban
Modified:
9 years, 4 months ago
Reviewers:
bac, mp+245868, matthew.scott
Visibility:
Public.

Description

Reorganize view code. Replace most of the view closures with external private functions. This has several good side effects in my opinion: - view functions are shorter; - we know which objects are used for each callback function, because we need to explicitly pass them as arguments; - external functions can be reused by multiple views if required (and we have the _use example here); - if an external callback become less straightforward, it is now possible to directly unit test it. Tests: `make check`. QA: If unit tests pass we have some confidence that the interactive session is not broken. However, some time spent on it would be great, creating/editing/destroying environments, setting them as default, canceling the changes, starting one of them, etc... Thanks a lot. https://code.launchpad.net/~frankban/juju-quickstart/no-closure-for-you/+merge/245868 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Reorganize view code. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+140 lines, -101 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M quickstart/cli/views.py View 12 chunks +138 lines, -101 lines 0 comments Download

Messages

Total messages: 6
frankban
Please take a look.
9 years, 4 months ago (2015-01-08 14:53:46 UTC) #1
matthew.scott
LGTM, no QA yet (if bac doesn't get to it, I can do it later ...
9 years, 4 months ago (2015-01-08 17:43:32 UTC) #2
bac
LGTM. WIll QA now.
9 years, 4 months ago (2015-01-08 18:32:47 UTC) #3
bac
QA was OK. I changed defaults, created a new environment, and launched a local env.
9 years, 4 months ago (2015-01-08 19:21:29 UTC) #4
frankban
*** Submitted: Reorganize view code. Replace most of the view closures with external private functions. ...
9 years, 4 months ago (2015-01-12 08:32:54 UTC) #5
frankban
9 years, 4 months ago (2015-01-12 08:34:31 UTC) #6
Thank you both for the reviews!
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b