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

Issue 121064: Extensible ModulePrefs, better visitor pattern

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 7 months ago by Paul Lindner
Modified:
14 years, 7 months ago
Reviewers:
johnfargo
CC:
shindig.remailer_gmail.com
Visibility:
Public.

Description

This patch improves on the ModulePrefs system by cleaning up the visitor objects and adding a new visitor ExtraElementsVisitor The ExtraElementsVisitor accumulates any unknown tags and stashes them in a Multimap based on the key. Currently the list of visitors is still hard coded, but we're very close to making it Guice injectable.

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+184 lines, -80 lines) Patch
M java/gadgets/src/main/java/org/apache/shindig/gadgets/spec/ModulePrefs.java View 19 chunks +175 lines, -80 lines 1 comment Download
M java/gadgets/src/test/java/org/apache/shindig/gadgets/spec/ModulePrefsTest.java View 3 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 1
johnfargo
14 years, 7 months ago (2009-09-22 21:59:58 UTC) #1
One nit, but the majority concern I have is in the overall result of this
approach. Seems to me this encourages ad hoc modification of the spec, leading
to inconsistencies and incompatibility between gadgets. Why not use the existing
<Requires>/<Optional> syntax? It's limited, but typically can get the job done,
using a known pattern.

http://codereview.appspot.com/121064/diff/1/2
File java/gadgets/src/main/java/org/apache/shindig/gadgets/spec/ModulePrefs.java
(right):

http://codereview.appspot.com/121064/diff/1/2#newcode26
Line 26: import org.w3c.dom.*;
please expand these wildcards, verbose as it may be.
Sign in to reply to this message.

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