GWT model, presenter, view framework
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.settings/gradle
apt-examples
apt
bootstrap
dev
docs
examples
gradle/wrapper
user
.gitignore
.travis.yml
LICENSE.markdown
README.markdown
build.gradle
cleanup.xml
formatter.xml
gradlew
gradlew.bat
settings.gradle

README.markdown

Join the chat at https://gitter.im/stephenh/tessell

See tessell.org.

Eclipse Setup

After checking Tessell out of git, there are two main projects, tessell-user and tessell-dev.

tessell-user uses annotation processing to generate some event classes, which is unfortunately kind of janky to setup in Eclipse.

  1. Install the Gradle Eclipse plugin
  • This is not strictly required, but the checked-in .classpath/.factorypath files assume this setup
  1. Go to Window / Preferences / Java / Build Path / Classpath Variables
  • Add GRADLE_REPO has /yourHomeDir/.gradle/caches/modules-2
  1. Import tessell-user and tessell-dev into Eclipse
  • Gradle should download all the dependencies and put them onto the Gradle classpath container
  • However, Eclipse needs to be "kicked" to see the annotation processor jar is now available
  1. Close tessell-user
  2. Open tessell-user
  3. Clean tessell-user
  4. Hopefully you have no build errors

Todo

  • Add @Place annotation
    • Take name of presenter
    • Any constructor parameters--how to denote application-level vs. request-level?
  • Figure out cross-presenter transitions
    • Event bus doesn't make sense--these aren't global things
    • Have Slot listen to presenter events?
  • Support 2nd generation Presenter interfaces via event hook hints in ui.xml file
  • form disable on ServerCall
  • indicator on ServerCall
  • Pre-fill the handler (optional);
  • doLogin.call(user, pass);
  • HasDispatchAsync to ServerCall cstr
  • Out-of-the-box local storage integration (probably via changes to dtonator, use AutoBeans)
  • PropertyGroup copies are not deep

Notes

  • ResourcesGenerator assumes a global namespace of image/CSS files, even if you use subdirectories. It also assumes all image/CSS files are below the packageName you pass to it.

Binder DSL Ideas

  • SetActions

    binder.when(...).is(true).set(//
      textOf(...).toOrElse("", ""), // toOrElse returns SetAction
      styleOf(...).to(bz.active())); // to returns SetAction
    
    binder.on(keyPressOf(...)).then(execute(command));
    binder.on(clickOf(...)).then(toggle(button));
    binder.on(clickOf(...)).set(SetAction...);
    binder.on(blurOf(...)).set(SetAction...);
    
    // or, for more unique static imports
    binder.on(blurOf(...), thenSet(textOf(...).to(asdf)));
    
    // string actions
    binder.when(condition, action1, action2);
    // e.g.
    binder.when(value, is(true), show(this), hide(that));
    
  • Non-trivial omponents, e.g.

    <foo:Form>
      <fields>
        <foo:TextLine />
      </fields>
      <blah>
        <foo:Bar />
      </blah>
    </foo:Form>
    

    Goes to:

    form.addField(textLine1);
    form.setBlah(...);
    

    Any HTML implicitly becomes an HTMLPanel, e.g.:

    <foo:Form>
      <blah>
        <p>
          <foo:Bar />
        </p>
      </blah>
    </foo:Form>
    

    Goes to:

    form.setBlah(htmlPanel, List<Bar> bars);