Compayler

Christian Stein <[email protected]> Sun, 5 Jan 2014 04:02:29 +0100
Newsgroups gmane.comp.java.prevayler
Message-ID <CAJi8+g6GpiJWVQJYs6m9i3rBOGLuC_GAvjH6UsFto6s2aWdycw@mail.gmail.com>
...or just another facade/decorator generator for Prevayler.

Hallo zusammen!

It'd be great, if you test-drived the http://compayler.sormuras.de (beta)
tool:

   - Feed it some source code, preferably with an interface definition.
   (e.g. Appendable.java<http://grepcode.com/file_/repository.grepcode.com/java/root/jdk/openjdk/7-b147/java/lang/Appendable.java/?v=source>
   )
   - Select the configuration tab and verify the name of the interface.
   - Switch to the result tab and copy the output to your IDE of choice.

Does the tool produce an error? Or not compiling code?

Result usage example demonstrating the pros of a decorated prevalent system:

  public void testAppendable(Appendable appendable) throws Exception {
    appendable.append('a').append("b").append("abc", 2, 3);
  }

  @Test
  public void testAppendableGenerated() throws Exception {
    // pojo
    Appendable appendable = new StringBuilder();
    testAppendable(appendable);
    assertEquals("abc", appendable.toString());

    // decorated
    appendable = new StringBuilder();
    Prevayler<Appendable> prevayler =
PrevaylerFactory.createTransientPrevayler(appendable);
    try (AppendableDecorator decorator = new
AppendableDecorator(prevayler)) {
      testAppendable(decorator);
    }
    assertEquals("abc", appendable.toString());
  }

The main difference between
PrevaylerTransactionsFacade<https://github.com/jsampson/prevayler/tree/master/extras/facade/src/main/java/org/prevayler/contrib/facade>
and
Compayler is that Compayler produces Java source code. Which can be
tweaked, pre-compiled or even compiled on-the-fly. Therefore, there's no
reflection/invokedynamic overhead at runtime.

Compayler sources and issue tracker are here:
https://github.com/sormuras/compayler

Cheers,
Christian

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk

_______________________________________________
To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion
_______________________________________________
"Databases in Memoriam" -- http://www.prevayler.org