• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Rapid Application Development with Cocoon
 

Rapid Application Development with Cocoon

on

  • 3,633 views

From the Cocoon GetTogether 2005:...

From the Cocoon GetTogether 2005:

When flowscript came up it was not only the powerful idea of continuations that helped making it a big success. In combination with its scripting nature it provided a much quicker development cycle.Soon people wished to have such a short turnaround in their java based development environments. And that's what we have in the latest Cocoon trunk - today! Auto-compilation of javaflow (the java based alternative to flowscript) and instant reloading of components helps to cut down development times tremendously. Without further need of restarting your servlet container after every little change, java development has finally become as easy as it should be.

This session will demonstrates on how to use features like reloading or auto-compilation of the current Cocoon trunk. It will also try to demystify the magic behind javaflow and will provide an overview about the current status and limitations.

Statistics

Views

Total Views
3,633
Views on SlideShare
3,629
Embed Views
4

Actions

Likes
0
Downloads
40
Comments
0

2 Embeds 4

http://www.techgig.com 3
http://115.112.206.134 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Rapid Application Development with Cocoon Rapid Application Development with Cocoon Presentation Transcript

    • Torsten Curdt <vafer/>.org tcurdt@apache.org Rapid Application Development with Cocoon javaflow and the compiling classloader Cocoon GetTogether 2005, Amsterdam
    • about me : 2 : • with Cocoon since 1.x • member of the Cocoon PMC • member of the Jakarta PMC • ASF member
    • quote : 3 : “Rapid Application Development is exactly the opposite of what Cocoon provided a fears ago - but gladly enough times have changed” Torsten Curdt
    • agenda : 4 : • general environment hints • Cocoon features for RAD • web application and IDE config • live demonstration • behind the scenes • overview of jci and javaflow
    • hints : 5 : • stripped down version of Cocoon • build the source jars • relocate the webapp with the COCOON_WEBAPP_HOME environment variable • use “cocoon servlet-debug”
    • features : 6 : • compiling + reloading of classes • compiling + reloading of javaflow • compiling + reloading of components • reloading of jars
    • map:classpath : 7 : <map:components> ... <map:classpath> <class-dir src=”...”/> <src-dir src=”...”/> <lib-dir src=”...”/> </map:classpath> ...
    • store : 8 : <map:components> ... <map:classpath> <class-dir src=”...”> <store class=”...”/> </class-dir> </map:classpath> ...
    • eclipse : 9 : DEMO
    • hmmm : 10 : So how does it work?
    • sitemap : 11 : • own component manager • can have a dedicated classpath • uses a paranoid* classloader *parent-last classloader
    • reloading : 12 :
    • adding flow : 13 : • resources transformed on-the-fly • similar to pipelines
    • ...but! : 14 : • does not help for core development • be careful on a live system upgrade • object types defined per classloader
    • dimensions : 15 :
    • gotchas : 16 : • objects in sessions • parent component manager component interactions • old continuations
    • commons : 17 : • commons jci does the • monitoring • compilation • commons javaflow provides • java continuations • cocoon javaflow block • evolved out of cocoon 2.1 • now being used in cocoon trunk
    • cocoon block : 18 : • flow interpreter • flow object model • base classes • integration with CForms
    • example : 19 : public class MyFlow extends AbstractContinuable { public void run() { ... sendPageAndWait( ”page”, data); ... }
    • jci : 20 : • compiler abstraction • supports eclipse, janino, groovy • filesystem monitoring • events for create, change and delete • compiling/reloading class loader http://jakarta.apache.org/commons/sandbox/jci
    • jci API : 21 : CompilationResult result = compiler.compiler( classNames, new FileResourceReader(dir), new MemoryResourceStore()); if (result.getErrors() .length > 0) { ...
    • jci API : 22 : FilesystemAlterationMonitor fam = new F..A..M(); fam.start(); fam.addListener( new CompilingListener( dir));
    • future : 23 : • almost ready for a release (94% testcase coverage!!) • better dependencies support • adding more compilers • javac, pizza, jikes, gcj • maven might switch to jci
    • javaflow : 24 : • java continuations through bytecode instrumentation • works hand in hand with jci • ant-task for jar/class rewriting • supports serialization(!!) http://jakarta.apache.org/commons/sandbox/javaflow
    • javaflow API : 25 : Continuation continuation = Continuation.startWith( new Calculator()); ... Continuation.continueWith( continuation);
    • continuations : 26 :
    • instrumentation : 27 :
    • scalability : 28 : • the deeper your flow, the more memory used per continuation • increases linearly • avoid recursion • the more method calls, the more overhead • can be heavily optimized
    • limitations : 29 : • suspend in synchronized blocks • suspend in a catch/finally
    • future plans : 30 : • remove current limitations • call graph analysis for optimization • switching from BCEL to ASM(?) • support for external suspends(?) • talking with the guys from RIFE • release within the next few months
    • summary : 31 : • auto-compiling and reloading of • classes • javaflow • components • full IDE support • debugging • refactoring • (potential) serialization support • persisting continuations across restarts • session and flow replication
    • thanks : 32 : questions?