1. Tapestry 5, Spring, Hibernate and Transaction

    A new project has been added at spreadthesource, it allows you to make Tapestry 5 services and Spring beans work in the same transaction. This contribution overrides the services provided by tapestry5-hibernate contribution to wrap the beans provided by spring. Also, It creates all the elements needed by Spring to work in a transaction.

    This contribution will be useful if :

    1. You want to benefit from an existing spring configuration to start writing data access code in Tapestry 5 services
    2. You have a mixed architecture (Tapestry 5 and Spring) and you have to work in the same transaction context
    3. You want to migrate from your existing spring bean to Tapestry and then benefit from the great hot reload feature

    In our case, for wooki we have used spring acl that uses a JDBCTemplate to query the database, our business layer has moved to Tapestry 5 for the hot reload feature, so we needed to find a solution to create ACLs in the same transaction than the main business method.

    The project is available on github, and you can find more information in the README and test application provided with this contribution.

  2. Decorating RenderSupport and any MarkupRendererFilter

    I recently faced to some limitations with RenderSupport. I wanted to decorate it but I realized that this filter is not a service. What a shame, one of the most important Tapestry 5 service is not customisable…

    Really? No. There is a possibility to decorate RenderSupport, and in fact any of MarkupRendererFilter and Environment objects.

    How to achieve that?

    • Create a new RenderSupport implementation that will wrap the initial object. It’s just like we normally do when creating a decorator.
    • Create a MarkupRendererFilter that will pop RenderSupport from Environment
    • Create a the interceptor from the poped RenderSupport and push it into the Environment.
    • Contribute to MarkupRenderer’s ordered configuration and add your filter just after RenderSupport.
        public void contributeMarkupRenderer(OrderedConfiguration<MarkupRendererFilter> configuration)    {
            MarkupRendererFilter renderSupportInterceptor = new MarkupRendererFilter()
            {
                public void renderMarkup(MarkupWriter writer, MarkupRenderer renderer)
                {
                    RenderSupport delegate = (RenderSupport) environment.pop(RenderSupport.class);
                    RenderSupport interceptor = new RenderSupportInterceptor(delegate);
    
                    environment.push(RenderSupport.class, interceptor);
                    renderer.renderMarkup(writer);
                }
            };
            configuration.add("RenderSupportDecorator", renderSupportInterceptor, "after:RenderSupport", "before:ClientBehaviorSupport",
                    "before:InjectDefaultStyleheet", "before:Heartbeat");
        }
    
  3. Atom and RSS feeds for Tapestry 5

    Another contribution this week for Tapestry 5 after the awesome “tapestry5-installer” : an integration of the Rome library. Rome is kind of a Java standard for generating Atom and RSS feeds.

    Rome gives you all you need to produce feeds. The only thing that may be tricky for newcomers to Tapestry 5 then is not how to produce them but how to return them. This is what “tapestry5-rome” contribution is doing: offering the possibility for action methods to return feeds.

    Want to see a sample? Check out the test page source code. Install instructions can be found in the readme file.

    Don’t forget to follow “spreadthesource” on Github to stay informed for any contributions updates.

  4. Create your web installation wizard for your Tapestry 5 applications

    For wooki, we needed to find an easy way for the user to install wooki and set its production environment properties like database URL or file upload directory. Main objectives are :

    1. No manual server restart after application configuration
    2. Easy to install : put the wooki.war in the ‘webapps’ folder, go to the browser, configure and that’s all
    3. Develop the installation application with Tapestry, no way to use JSP ;)
    4. Package the installation application with wooki.war
    5. Allow spring to directly access to the properties set by the user
    6. Run the installation application with a minimal set of Tapestry Modules to avoid hibernate or spring to load early on startup

    Then we have developed this solution in a standalone contribution that you can find on github with full documentation. It has been build with tapestry 5.2.0 because wooki now uses this version of Tapestry (but really requires less effort to move to 5.1.0.5)

    The solution has been tested with the current working branch of wooki and we expect to make it evolve to provide facilities for hibernate configuration for exemple. By the way, give it try if you are interested in and do not hesitate to post your comments/suggestions.

  5. Maven repository and Google Analytics plugin availability

    In order to better contribute with Tapestry 5 community, “Spread the source” projects are now available as downloadable Maven artifacts.

    First available artifact is Tapestry 5 Google Analytics plugin.
    How to & sources @ http://github.com/spreadthesource/tapestry5-googleanalytics

    We’ve got to say *a big thank you* to Christophe Furmaniak for sharing his Continuous Integration build platform with us.

    More contributions are coming soon. Note that all of them are extracted from Wooki’s experience and emphasize the ‘reusability facet’ of Tapestry.

  6. Announcing Wooki 0.2.0

    We are pleased to announce Wooki 0.2.0 release. We have been working more than two months on this major update and we hope you will appreciate our efforts.

    For newcomers, Wooki is a collaborative writing tool that let users publish and review documents. It is open source and distributed under the Apache 2.0 License. Of course, it is based on Tapestry 5.

    What’s new in Wooki 0.2.0?

    • PDF generation is now powered by Flying Saucer, which will offer great possibilities for PDF stylization
    • Redesigned User Interface to provide a more intuitive layout
    • Editor has been also improved with AJAX autosave, on the fly image upload and a fullscreen mode to make the edition easier
    • Feeds! Wooki now produces feeds on many pages. This feature is the result of integrating Rome library into Tapestry.
    • Spring 2.5 has been updated to Spring 3.
    • Last but not least this new version also includes a bunch of new Tapestry components. A great example is our Twitter like “more” button.

    We are looking forward to blog about all thoses technicals asides on this blog.

    Our demo website has been updated, try Wooki 0.2.0 now at http://wookicentral.com/demo

    We would like to thanks all our Github bugs reporters, all our followers, everyone who have contributed to this project in some way and everyone who supports it.

    Next release should focus on providing a REST API, more imports and exports formats and improving our core source code.

  7. Securing Tapestry 5 pages with Spring Security 2.x (Part I)

    Securing wooki was a big dilemma. There was a long discussion on Tapestry 5 user mailing list on how to implement security in a Tapestry 5 application, also Howard Lewis Ship (Creator of Tapestry) has written this really usefull article on his blog http://tapestryjava.blogspot.com/2009/12/securing-tapestry-pages-with.html. On the other side spring security seems to provide a full pipeline of services focused on all the security aspects from authentication, to authorization, with an extensible mechanism of filtering.

    Read the entire article

« Newer Posts