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

Issue 6858045: Example module for env view refactor

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by bcsaller
Modified:
11 years, 5 months ago
Reviewers:
benjamin.saller, mp+135272, hazmat
Visibility:
Public.

Description

Example module for env view refactor Looking to get more eyes on the way the module code is playing out. In particular I'm much more interested in if the various parts fit together in a way that makes sense to people than an details of the impl. The basic pattern is this EnvironmentView has a Topology object which is a subclass of the d3-component stuff. The Env view binds modules to the topology (from app/views/topology/). The framework will look at each modules declarative structures for events and bind behavior. The basic cycle the view moves through then is update() <- called on data change to recompute view models, things like position information. render() <- draw the current scene. Render itself support the notion of one time setup code and incremental rendering. For the most part scene mutation will happen in the event handlers though, those behaviors are facilitated by the framework but not controlled by it. Modules attempt to aid in keeping inter-module code loosely coupled. This is done by encouraging use of custom YUI events. Module.events.yui is one of the event binding structures available from the framework, modules can listen for changes that may be of interest to other modules and fire events which can trigger handlers. There isn't always a clean line between what should live in a module and the topology object itself but the rule of thumb is that if it can reasonably go in a module it should, the topology layer is mainly configuration and coordination. Looking forward to comments. Thanks. https://code.launchpad.net/~bcsaller/juju-gui/component-modules/+merge/135272 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Example module for env view refactor #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2730 lines, -2307 lines) Patch
M .bzrignore View 1 chunk +1 line, -7 lines 0 comments Download
M Makefile View 1 chunk +127 lines, -47 lines 0 comments Download
M README View 1 chunk +1 line, -1 line 0 comments Download
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M app/app.js View 5 chunks +86 lines, -44 lines 0 comments Download
A app/assets/images/back_triangle.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A app/assets/images/notifier-error.png View 0 chunks +-1 lines, --1 lines 0 comments Download
M app/assets/javascripts/d3-components.js View 8 chunks +56 lines, -11 lines 0 comments Download
M app/assets/svgs/service_health_mask.svg View 3 chunks +196 lines, -128 lines 0 comments Download
M app/assets/svgs/service_module.svg View 2 chunks +124 lines, -131 lines 0 comments Download
A app/favicon.ico View 0 chunks +-1 lines, --1 lines 0 comments Download
M app/index.html View 4 chunks +11 lines, -8 lines 0 comments Download
M app/models/models.js View 1 chunk +2 lines, -0 lines 0 comments Download
M app/modules.js View 2 chunks +12 lines, -109 lines 0 comments Download
A app/modules-debug.js View 1 chunk +166 lines, -0 lines 0 comments Download
M app/store/notifications.js View 1 chunk +1 line, -1 line 0 comments Download
M app/templates/charm-description.handlebars View 5 chunks +20 lines, -11 lines 0 comments Download
M app/templates/charm-pre-configuration.handlebars View 1 chunk +14 lines, -14 lines 0 comments Download
M app/templates/charm-search-result.handlebars View 1 chunk +6 lines, -3 lines 0 comments Download
A app/templates/notifier.handlebars View 1 chunk +3 lines, -0 lines 0 comments Download
M app/templates/overview.handlebars View 2 chunks +4 lines, -2 lines 0 comments Download
M app/views/charm.js View 2 chunks +3 lines, -2 lines 0 comments Download
M app/views/charm-panel.js View 17 chunks +82 lines, -16 lines 0 comments Download
M app/views/environment.js View 2 chunks +43 lines, -1612 lines 0 comments Download
M app/views/notifications.js View 3 chunks +30 lines, -2 lines 0 comments Download
M app/views/service.js View 2 chunks +5 lines, -3 lines 0 comments Download
A app/views/topology/panzoom.js View 1 chunk +42 lines, -0 lines 0 comments Download
A app/views/topology/relation.js View 1 chunk +42 lines, -0 lines 0 comments Download
A app/views/topology/service.js View 1 chunk +361 lines, -0 lines 0 comments Download
A app/views/topology/topology.js View 1 chunk +133 lines, -0 lines 0 comments Download
A app/views/topology/viewport.js View 1 chunk +41 lines, -0 lines 0 comments Download
M app/views/unit.js View 1 chunk +2 lines, -1 line 0 comments Download
M app/views/utils.js View 1 chunk +2 lines, -1 line 0 comments Download
A app/widgets/notifier.js View 1 chunk +148 lines, -0 lines 0 comments Download
A bin/merge-files View 1 chunk +80 lines, -0 lines 0 comments Download
M docs/style-guide.rst View 5 chunks +38 lines, -0 lines 0 comments Download
M grunt.js View 1 chunk +3 lines, -3 lines 0 comments Download
A lib/merge-files.js View 1 chunk +136 lines, -0 lines 0 comments Download
M lib/server.js View 2 chunks +25 lines, -3 lines 0 comments Download
M lib/templates.js View 2 chunks +2 lines, -2 lines 0 comments Download
M lib/views/stylesheet.less View 25 chunks +262 lines, -108 lines 0 comments Download
M package.json View 1 chunk +2 lines, -1 line 0 comments Download
M test-server.js View 1 chunk +4 lines, -1 line 0 comments Download
M test/index.html View 4 chunks +5 lines, -2 lines 0 comments Download
M test/test_app.js View 1 chunk +1 line, -1 line 0 comments Download
A test/test_app_hotkeys.js View 1 chunk +63 lines, -0 lines 0 comments Download
M test/test_application_notifications.js View 1 chunk +1 line, -1 line 0 comments Download
M test/test_charm_panel.js View 4 chunks +12 lines, -16 lines 0 comments Download
M test/test_charm_view.js View 1 chunk +2 lines, -1 line 0 comments Download
M test/test_d3_components.js View 3 chunks +8 lines, -4 lines 0 comments Download
M test/test_environment_view.js View 4 chunks +56 lines, -2 lines 0 comments Download
M test/test_notifications.js View 1 chunk +61 lines, -0 lines 0 comments Download
A test/test_notifier_widget.js View 1 chunk +103 lines, -0 lines 0 comments Download
M test/test_service_view.js View 2 chunks +4 lines, -2 lines 0 comments Download
A test/test_topology.js View 1 chunk +97 lines, -0 lines 0 comments Download
M test/test_unit_view.js View 1 chunk +2 lines, -1 line 0 comments Download
M undocumented View 2 chunks +0 lines, -8 lines 0 comments Download

Messages

Total messages: 4
bcsaller
Please take a look.
11 years, 5 months ago (2012-11-20 22:40:22 UTC) #1
bcsaller
Please take a look.
11 years, 5 months ago (2012-11-20 22:43:19 UTC) #2
benjamin.saller
This created a huge delta, not sure why yet.
11 years, 5 months ago (2012-11-20 22:44:26 UTC) #3
hazmat
11 years, 5 months ago (2012-11-22 11:18:48 UTC) #4
On 2012/11/20 22:44:26, benjamin.saller wrote:
> This created a huge delta, not sure why yet.

Hi ben, i created another mp for this, but if you got a chance it would be great
if you could cleanup this mp and copy the comments over to it.
Sign in to reply to this message.

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