Showing posts with label wicket. Show all posts
Showing posts with label wicket. Show all posts

Sunday, August 8, 2010

Best of this Week Summary 2 August - 8 August 2010

Sunday, July 18, 2010

Best of this Week Summary 28 June - 18 July 2010

Sunday, July 4, 2010

Lessons learned Wicket + Spring + Hibernate + Mod4J project

At a recent project we used the following tools & frameworks:


Below are a couple of lessons learned which I remembered to write down:

Wicket
  • In a ModalWindow you'd probably want to use a AjaxSubmitLink, not a SubmitLink, if you want to use modalWindow.setWindowClosedCallback(). See here for explanation.

  • ajaxrequesttarget.addComponent: addComponent name might be a bit confusing for beginners. It means "add the component to the list of components be re-rendered/refreshed".

  • An AjaxSubmitLink doesn't update the model when setDefaultFormProcessing() is set to false. Not totally illogical, but you still might run it to it when you don't expect it.

  • Here are tips to validate related fields. (In the original the example code is missing.)

  • AjaxSubmitLink: if you get a "Component-targetted feedback message was left unrendered. This could be because you are missing a FeedbackPanel on the page" warning in your Tomcat server console, it seems you have to tell in the onError() of the AjaxSubmitLink which feedback panel(s) you want to have updated.
    You get the warning even when you have feedback panels higher up in the tree of the (Base)Page. An example to update those panels could be:

    Component infoFeedback = getPage().get("infoPanel");
    target.addComponent(infoFeedback);
    Component warnFeedback = getPage().get("warningPanel");
    target.addComponent(warnFeedback);
    Component errorFeedback = getPage().get("errorPanel");
    target.addComponent(errorFeedback);

    This solution was inspired by these posts: post1, post2, post3, post4.

  • To show/hide any HTML markup block dynamically, just wrap it with a WebMarkupContainer. In the code create that wrapper and make it visible or not depending on your requirements:

    boolean makeVisible = false;
    WebMarkupContainer blockContainer = new WebMarkupContainer("blockWrapper");
    blockContainer.setVisible(makeVisible);
    add(blockContainer);


  • Sometimes you might get a popup when using a ModalWinow that says "Reloading this page will cause modal window to disappear" when you don't expect it. Check the logs/console, you might just got an exception in your app (after which Wicket tries to redirect to the error page, which causes the popup to show; at least that's my reasoning).

JUnit
  • If JUnit can't find the Spring context.xml in the resources directory, then you have to add the resources dir to your Build path

Mod4J
  • Does not really support LazyLoading so not very efficient for large "graphs" of data/dependencies. In those cases you could decide to skip the DTO layer and directly access the domain model.

  • The Maven plugin IAM in Eclipse can be turned off for the Mod4J models project in Eclipse, otherwise it runs twice: once by Mod4J features, once by Maven (plugin).

Sunday, June 27, 2010

Best of this Week Summary 15 June - 27 June 2010

Sunday, June 20, 2010

Best of this Week Summary 14 June - 20 June 2010

Sunday, May 2, 2010

Best of this Week Summary 26 April - 02 May 2010

  • Google's Chief Java Architect Josh Bloch "discusses many of the problems facing the Java community, including the ineffectiveness of J2ME, licensing problems, Java 7's late ship date, and even the JCP issues that James Gosling often opined about. He points out that these problems predate the Oracle acquisition of Sun, so everyone should just stop pointing their fingers at Larry Ellison."

  • Another Getting Started blogpost for a Mahout-Taste based movie recommendation engine, which uses Wicket as presentation layer.

  • Martin Fowler explaining Inversion of Control and suggesting to call it the Dependency Injection pattern. Notes that the Service Locator pattern can also remove the dependency, just as the DI pattern tries to. Describes which of these options to use. Finally he also gives pros/cons for constructor vs setter injection. Also pros/cons for configuration in the code or via configuration files.

  • Several Javascript performance-optimization tips taken at JSConf 2010.

  • An article "which looks at various storage mechanisms - JDBC, JPA, JavaSpaces, Java Content Repository, MongoDB, and DB4O, primarily - from the perspective of how good they are at CRUD operations and queries". The conclusion is that there is no one "best" mechanism, each has its own best application.

Sunday, April 11, 2010

Best of this Week Summary 5 April - 11 April 2010

Sunday, March 14, 2010

Best of this Week Summary 8 March - 14 March 2010

Sunday, February 14, 2010

Best of this Week Summary 8 February - 14 February 2010

  • Five new features of Spring 3.0 described:

    • Spring Expression Language (SpEL)

    • Object/XML Mapping (OXM) module

    • Type-conversion system

    • Formatter SPI

    • RESTful web services support

    What new Ajax simplifications have been introduced can be found here.

  • The Java EE 6 web tier introduces with Servlet 3.0 spec the ability for asynchronous processing of requests so that the thread may return to the container and perform other tasks. It also "adds annotation based configuration (@WebServlet, @ServletFilter and @WebServletContextListener) making the web.xml file optional, and introduces a new concept of web fragments."

  • Introductionary article to Apache Click. One difference between Click and Wicket is that Click is stateless by design, while Wicket is stateful. Both can be configured their "opposite" model, though these have their own pros/cons.
    Another main difference is that that Click uses templates (Velocity by default) where Wicket does not.

    Sidestep: here's a bunch of nicely designed Wicket sites that scale (note: not really clear where the scalability statements come from).

  • A 60 minutes presentation on how SOA is a hit at eBay.

Sunday, October 18, 2009

Best of this Week Summary 12 October - 18 October 2009

  • Last week was Oracle Open World 2009. Beside for Oracle DBMS and SOA specialists, these days the event is definitely also very relevant to Java professionals because of Oracle's (almost official) acquisition of Sun this year. Here's a set of relevant information from OOW:

    • The keynote on sunday which also describes the plans Oracle has with Java, MySQL and Sun hardware

    • James Gosling explaining to the developer audience what Sun was doing, what the scale is of Java activity around the world and across technology platforms.

    • The Dutch software company Amis also did quite a few presentations at OOW. Some of those presentations were already online before they were actually presented! All were interesting:

      • Good overview of what will be in the Patch Set 1 for the Oracle Fusion Middleware 11g stack, including JSF and ADF (mobile!). It's more than a patch!

      • Edition Based Redefinition (EBR): "Every database object (well, almost every database object - not tables!) can have different implementations/incarnations/versions in various editions. The object versions are all in the same schema - they only differ in the Edition they are created in."
        So no more direct table access! No big bang needed anymore. Challenges: what if a mandatory column is removed or added from the current EBR view (answer: special triggers). Including 2 suggestions for best practices.

      • XML processing/design tips.

      • This "session introduces SOA and the new Oracle SOA Suite 11g to the realm of database professionals from which it sometimes seems so far removed. What are the key SOA concepts and objectives? What is at the heart of Oracle SOA Suite 11g: composite applications, BPEL PM, and the mediator. The session shows how SOA services can be leveraged from the database, from triggers, PL/SQL units, or even SQL and how the database can publish events to the event delivery network. It covers how the SOA infrastructure can access the database, primarily using Oracle Database and Oracle Advanced Queueing adapter and how database developers can help in doing so efficiently. It ends with hints for applying SOA concepts to "normal" database development."

        Bit oriented at the database professional, but still interesting for those who want to stay up to date with Oracle's DMBS possibilities. And a bit scary too: it is possible in 11g to make webservice calls and publish them from the database(!). For example from PL/SLQ and put a webservice in front of PL/SQL... I haven't come up with a practical situation where you'd want to do this from an architectural point of view: large risk to getting tightly coupled systems and dependencies. If you have heavily invested (i.e built) in PL/SQL, it might be a valid option though.


  • There is currently a renewed focus on the role of code generation in developing enterprise Java applications. Springsource recently released Roo, Skyway Software released Skyway Builder Community Edition version 6.3 and Blu Age released M2Spring. What should the software architects and developers look for in a Code Generation framework?

  • Seven Wicket Do's and Don'ts.

Sunday, October 4, 2009

Best of this Week Summary 28 September - 04 October 2009

  • "Tony Hoare introduced Null references in ALGOL W back in 1965 “simply because it was so easy to implement”, says Mr. Hoare. He talks about that decision considering it “my billion-dollar mistake”. Tony Hoare, is a British computer scientist, probably best known for the development in 1960, at age 26, of Quicksort. He also developed Hoare logic, the formal language Communicating Sequential Processes (CSP), and inspired the Occam programming language."

  • "Peter Thomas has updated his web framework performance benchmark with Grails and Tapestry. Apache Wicket still leads the best of breed frameworks in terms of request times and memory usage." Other observations:

    • Grails was far more productive than Tapestry 5. This was mainly due to the documentation quality of Grails compared to the scattered and not very well organized Tapestry documentation.

    • Ease of writing custom tag-libraries is IMO one of the best things about Grails.

    • Grails still has some way to go in terms of performance. I am told that significant performance optimizations for GSP will make it into 1.2

    • Session usage of the Seam + JSF combination is significantly higher compared to all the rest, around 760 KB per session."


  • "At the JVM Languages Summit, Josh Bloch expressed his concern about what he called the "semantic gap" between the source code we write and its performance at runtime: As performance improves, our ability to predict the performance consequences of our source code degrades." Feedback from people on this subject can also be found here.

  • "Mckoi Distributed Database (MckoiDDB) is a database system used by software developers to create applications that store data over a cluster of machines in a network. It is designed to be used in online environments where there are very large sets of both small and big data items that need to be stored, accessed and indexed efficiently in a network cluster. The focus of the MckoiDDB architecture is to support low latency query performance, provide strong data consistency through snapshot transaction isolation, and provide tools to manage logical data models that may change dramatically in physical network environments that may experience similar dramatic change.
    MckoiDDB is written in 100% Java and runs on any operating system that supports Java 1.6. MckoiDDB is released under the GPLv3 open source license."

Sunday, September 6, 2009

Best of this Week Summary 24 August - 06 September 2009

  • Great introduction to Solr, a search server (and more). The article describes how to get it running, send it some documents to index and how to search those documents in a controlled way.

  • More details on Google Wave: the draft specification for the Google Wave Federation Protocol and the Java source code for the Google Wave Federation Prototype Server

  • An extensive comparison of Spring and Seam. And, recently added chapter 5, comparing them with Wicket 1.3.6. Too long for you to read? Then at least read the conclusion :)
    Talking about Wicket, here are some
    experiences written down on migrating an existing Wicket application to the new 1.4 version.

  • This article provides a short overview on the basics of RESTful HTTP and discusses typical issues that developers face when they design RESTful HTTP applications. It shows how to apply the REST architecture style in practice. It describes commonly used approaches to name URIs, discusses how to interact with resources through the Uniform interface, when to use PUT or POST and how to support non-CRUD operations.
    Related to that, here's 8 great tips/lessons learned for creating an API.

Sunday, May 24, 2009

Best of this Week Summary 18 May - 24 May 2009

Sunday, May 3, 2009

Best of this Week Summary 27 April - 03 May 2009

Sunday, March 15, 2009

Best of this Week Summary 09 March - 15 March 2009

  • A table-based quick review of the following RIA frameworks: GWT 1.5, Laszlo 4.2, pure Javascript and Flex 3.2.

  • A short introduction on how ActionScript 3 differs (and not) from Java.

  • A wiki constructed with over four dozen architects: 97 things every software architect should know. Also now available as a book. It includes advice such as:

    • Don't Put Your Resume Ahead of the Requirements (Nitin Borwankar)

    • Chances Are, Your Biggest Problem Isn't Technical (Mark Ramm)

    • Communication Is King; Clarity and Leadership, Its Humble Servants (Mark Richards)

    • Simplicity Before Generality, Use Before Reuse (Kevlin Henney)

    • For the End User, the Interface Is the System (Vinayak Hegde)

    • It's Never Too Early to Think About Performance (Rebecca Parsons)


  • An introduction to Object Oriented CSS.

  • Sample chapter from Thomas Erl's latest SOA Design Patterns book, and an interview with him. He "talks about the main benefits of having a pattern catalog, SOA and Web services, the current state of SOA, the difference between SOA and service orientation, and the role of patterns in SOA adoption".

  • A series of five articles on setting up a Java Wicket project and implementing a frontend with it.

  • Handy piece of (alpha) software to test IE8 RC1, IE7, IE6 and IE5.5 on Vista and XP. Note that it looks like Microsoft is releasing IE8 this coming week, so get ready...

Sunday, March 8, 2009

Best of this Week Summary 02 March - 08 March 2009

Sunday, March 1, 2009

Best of this Week Summary 17 February - 01 March 2009

  • A relatively new type of mashups are so called clipping mashups. Instead of building a mashup against some official API, a clipping mashup just parses the final content in the presentation, thus including CSS, Javascript etc. Links can be rewritten, new elements injected. The presentation doesn't have to follow for example portal JSR-168 standards.
    An example use case would be that you could use it to (temporarily) fix a bug in a system (not necessarily owned by you) until the official next release comes out.

  • Eight architectural styles described. Handy overview including which one could be when appropriate.

  • Summary of migration project from JDBC to Hibernate. Valid comment at the bottom is that iBatis might be a better solution when you have to work from an existing schema.

  • Additional tips and articles for the Wicket in Action book. For example this article on how to do a partial Ajax repaint of newly created repeater items (e.g adding 1 row dynamically to a table or list with a "+" button). This in contrast to rendering all rows in a table when repainting the WebMarkupContainer as in the example described here.

  • Nice step-by-step introduction to asynchronous processing in Java 5 using Futures, ExecutorServices, CompletionService, Callback interfaces and ThreadPools. Here's part 2 where it's being used in combination with Javascript to improve the user experience.

Saturday, November 15, 2008

Best of this Week Summary 04 November - 16 November 2008

Sunday, October 19, 2008

Best of this Week Summary 07 October - 19 October 2008

  • Having nice user-friendly bookmarkable URLs when you're using the Wicket web framework is not so trivial. Especially if you want those nice URLs when validation errors occur. As an example, on this Wicket based site enter "hello" in the end-date field. Now check the URL in your address bar just before you click Filter (http://online.ddpoker.com/leaderboard) and right after the submit when you see the validation error (http://online.ddpoker.com/?wicket:interface=:0:1:::). Here's the solution for those cases too!

  • Have you been clickjacked lately?

  • More clarification from Rod Johnson on the new maintenance policy for Spring.

  • As a side note, Microsoft is designing a new programming language "M", part of its new Oslo development and service-oriented strategy. Most likely it will be .Net based. Will it ever see the day of light? Much more concrete is this new open source Touchless SDK, which enables developers to create multi-touch based applications using a webcam for input.

Sunday, April 27, 2008

Best of this Week Summary 12 May - 18 May April 2008