• Home
  • About
  • Sample Apps
  • Videos
  • Jazoon ‘09: Refactoring of Large Software Systems

    June 24th, 2009

    Session title: Refactoring of Large Software Systems revised
    Speakers:
    Sibylle Peter, Sven Ehrke – Canoo Engineering AG

    First observation: This is a very well attended session, which reflects the fact that refactoring, whilst not the most glamorous of tasks, is obviously very important to a lot of developers.

    The speakers describe the key lessons learned during a very challenging refactoring undertaking at a major bank. The project essentially involved trying to clean up software, the internal dependencies of which had gone out of control over time.

    One of the key lessons learned: Keep it Simple, Stupid.

    Options:

    • Do a huge refactoring at some point once it has been recognised that costs per features have sky-rocketed. This is obviously not the recommended approach, but it is often the only option available.
    • Do refactoring incrementally per release
    • Do refactoring constantly

    The costs of the project are pretty shocking: 6 persons for around a year. I could imagine this was a pretty sobering message for many members of the audience.


    Jazoon ’09: Wednesday Keynote from Danny Coward, Sun

    June 24th, 2009

    Title: Java SE and JavaFX RoadMap
    Speaker: Danny Coward, Chief Architect, Client Software

    Danny begins be showing the JavaFX roadmap…

    Towards the end of the timeline: “JavaFX.next”
    What on Earth could that mean?
    In any case: JDK 7 release due early 2010.

    Top 5 JDK SE 7 features

    1: Modularity
    Long overdue, the current JRE is around 14MB and contains a wide range of APIs. The average app only requires a small proportion of these. It also increases startup time.
    Danny points out a number of weaknesses in the CLASSPATH concept. This will apparently be addressed by a low-level modularilty system entitled Jigsaw.
    http://openjdk.java.net/projects/jigsaw/jcp.prg/en/jsr/detail?id=294
    The concept externalizes the package depenencies to a module file… which reminds me of Eiffel’s solution to this issue which is donkeys years old.

    2: Broadening the JVM to accelerate runtimes
    DaVinci Project should result in a new bytecode model, which enables dynamic invocation, lightweight method handles and a variety of other optimizations.
    http://openjdk.java.net/projects/mlvm

    3: Java Language Additions
    Project coin will result in a few small language enhancements:
    http://openjdk.java.net/projects/coin
    The switch statement will work with Strings.
    Multiple Exception handling
    catch (final IOException | ServletException e)

    Improved type interence will remove the need to double-declare generics so:
    List l = new ArrayList()
    Becomes:
    List l = new ArrayList ()

    Elvis operator eliminates a significant cause of Java’s verbosity:
    String s = mayBeNull?.toString() ?: “nothing”;

    Integer ival = …
    int i = ival ?: -1; // will be set if currently null

    Must confess, this is not what I understand by the Elvis operator, but it looks useful nevertheless.

    4: Four new I/O APIs
    These include: New filesystem API, File notifications, Directory operations, Asynchronous I/O. The latter permits an IO task to be defined using a Future, the Future delivering the result at a later point in time.

    5: New GC
    New garbage collector “Garbage First” should result in predictably low pauses, few full GCs and good throughput. Can be accessed in Java SE6 update 14 using:
    -XX:+UnlockExperimentalVMOptions –XX:+UseG1GC

    This will be switched on by default in JDK 7.

    Danny notes at this point that numerous other (small) features are also part of JDK 7.

    JavaFX 1.2 Top 5
    Danny begins by stating that Sun is trying to make up for lost time with JavaFX (as I have blogged in the past).

    More platforms
    JavaFX 1.2 runs on more platforms i.e. Linux and Solaris in addition to Windows and Mac. LG TV (purchasable in South Korea) incorporates JavaFX1.2. Finally, the HTC developer phone is also mentioned. Danny states that he hopes that phones will be available to consumers on the coming months. Don’t we all!?

    New features
    New widgets, charts, plus a new look and feel. L&F is possible via CSS, which is obviously a whole load easier than creating an L&F for Swing.
    Improved layout management
    Layout management: There are three new layout managers, but I know from experience these don’t yet cut it for non-trivial B2B apps.
    There follow a series of nice looking demos, which highlight that JavaFx is scenegraph based.

    Improved perforamance
    Performance up: Realtime streaming for media is now supported, which improves media startup significantly. Various optimizations in generated code and scenegraph. Bytecode footprint is down 30%.

    Improved data handling
    More and better ways to use data. RSS and Atom feed support. A simple asynchronous framework is also included, plus a simple data storage API.

    One final demo is really impressive: Using the bubblemark demo, Danny demos that JavaFX 1.2 performance is significantly better than Silverlight. Now that I would not have expected!


    Jazoon ‘09: Java Server Faces at Credit Suisse

    June 23rd, 2009

    Session: Jsf and Ajax in the Credit Suisse
    From: Benjamin Bratkus, Credit Suisse; Micha Kiener, Mimacom AG

    It will be interesting to see what CS has been up to with JSF. My last JSF project finished early in 2008. I look back to it with pleasure not primarily because we used JSF but because we really got to use all of the key JEE features under Glassfish – which worked sweetly. JSF (which included facelets), on the other hand…

    CS began with JSF in 2004. Corporations begin what they are, this resulted in a pilot (2005). Release 1 of their app took place in 2007. Since then CS claims to have one of the biggest JSF-based component libraries around.

     

     
    Framework must support:

    • Realtime data
    • Handle huge data sets
    • AJAX and JavaScript due to security aspects

    …and must achieve acceptance by various architects.

    The speakers also used ICEFaces to achieve the required level of interactivity and security. Specifically: Direct-to-DOM rendering (D2D), page level AJAX on existing components, AJAX Push capabilities.

    Key to achieving efficient push: Asynchronous server push, which will apparently become standardised in the next version of ICEFaces. This approach frees up threads on the server-side, which is obviously essential for scalability.

    Summary: Good talk, competent speakers. I still feel sorry for the average AJAX developer, who despite frameworks like ICEFaces is confronted with myriad non-trivial technical details. Plus, I imagine CS is not confronted with the other big pain for browser-based RIA: Multiple browsers.


    Jazoon ‘09: Experience with Rules Engines

    June 23rd, 2009

    Session title: Java Rule Engines (JBoss’ Drools, IBM’s iLog)
    From: Raed Haltam, WEGA Informatik

    Claim: Rules engines can reduce development time.

    Raed makes the valuable clarification that a usable Rules Engine needs to address storage, versions, security etc. and is therefore best described as a Business Rules Management System (BRMS). He also takes care to distinguish the Business Object Model (BOM) from the Execution Object model (XOM).

    Both iLog and Drools use the algorithm RETE. All rules follow the format:
    when X then Y

    Rules can be grouped into packages.

    Both iLog and Drools allow higher level business language descriptions of rules.

    Business rules can be made secure on various levels down to the statement level. In other words different editing privileges can be assigned to to different roles, which control the parts of a rule which can be edited under a given role.

    Both tools support Complex Event Processing, which amounts to responding to patterns of conditions in a predefined way.

    Raed presents a convincing sounding car financing case study from (JPMorgen Chase.) Rule deployment takes place at 8pm and are executed from 8am the following day.

    Conclusion: Quite a nice, objective short summary (it was a short talk after all) on business rules for those unfamiliar with the technology.


    Jazoon ‘09: RIA and Security

    June 23rd, 2009

    Session title: RIA Security: Broken by Design
    From: Joonas Lehtinen, CEO IT Mill

    IT Mill is the creator of Vaadin: A 100% Java tool for RIA.

    Joonas outlines a spectrum of complexity from Basic site to 3D games examples:
    Web Sites (Wikipedia), AJAX Sugar (Facebook), Full RIA

    He divides „Full RIA“ divide into client side vs. Server driven. Gives a crash course in GWT.

    Vaadin: Apparently 100% Java and server driven, which sounds an awful lot like ULC at this stage… But here’s a difference: It builds on GWT and relies on JavaScript on the client-side.

    He goes on to present a bunch of development rules:

    Rule #1: Don’t trust the browser
    Rule #2: Complexity is a hiding place for bugs
    Rule #3: Large surface give more opportunities for attack. This surface has increased with Web 2.0.

     

     

    Difference between GWT and Vaadin architectures is that GWT relies on the client invoking a server-side Web Service API, whereas Vaadin renders the client’s view on the server.

    Erm… he then offers the cures for the problems (Rules above)… which I miss because the explanation is compressed into around 5s.

    I’m starting to dislike this presentation at this point. Because here comes another artificial security issue scenario… which guess which product solves. And I thought product placement in Hollywood movies was irritating.

    The issues he raises are legitimate, but the lack of objectivity is obscuring the message. And as I write the presenter is debugging JavaScript which depends on analysing the DOM on the client side – I’m not sure if he’s now analysing the problem or trying to fix it!?

    I am formally declaring myself lost at this stage. At least I hope the other attendees are getting something out of this presentation, which has lost focus IMO.

    He continues with a discussion about attacking at the transport level, inserting new data on the fly. But come on: A secure transaction in this technical setting will operate under HTTPS, which in most instances will deal with this kind of attack. Unless, of course, that’s something else I missed.

    I think I need a coffee!!!


    Jazoon ‘09: iPhone development and Java

    June 23rd, 2009

    Title of this session: Development for the iPhone from a Java Perspective
    From: Software Architect Ognen Ivanski, Netcetera

    Note: Netcetera developed the wemlin app for the iPhone – a useful tool for navigating public transport in the Zürich area.

    Ah… it’s become apparent to me that Ognen will tell us about his personal experience with becoming an iPhone developer, having previously been a Java developer. I have gone through this process myself and so it will be interesting to compare notes…

    Ognen states that the first realisation was that performance, startup-time and UI were kind of new priorities for him. Not really the case for me, I must say. Canoo is known for its RIA experience and therefore these are issues we’ve been dealing with for some time. For the record: The issues which I found most difficult when switching to the iPhone SDK and XCode were:

    - No garbage collection: Clearly I’ve been spoiled by Java
    - XCode: Powerful but nowhere near as comfortable as a typical JavaIDE
    - SCM support: We managed to get Subversion working, but kept running into trouble with things getting out of sync anyway. Best to use the command line

    I certainly agree with Ognen’s observations on XCode: Like me, he missed features such as refactoring and the countless options for viewing, navigating and outlining code.

    Ognen notes that XCode’s visual builder is difficult to get used to but delivers in the end. Possibly like many Java/would-be iPhone developers, I shied away from the visual designer, opting to code from hand instead. Perhaps for my next iPhone app I’ll take a look at it again.

    I agree with Ognen’s observations on Objective C syntax. It’s got a “familiar and yet somewhat strange” feel to it. The behaviour around “nil” seems odd at first, but one quickly learns to appreciate that it pays not to have to check for null values all the time, as in Java code.

    There follows a lot of examples of Objective C Syntax.

    Patterns of note in the iPhone world: Delegate pattern, Target/Action pattern, MVC – which is perhaps truer to the original Smalltalk concept that what we typically see in Java swing, say.

    In summary: A good presentation, but no new insights for someone who’s gone through the process of switching from Java to iPhone development already.


    Jazoon ‘09: Patterns in dynamic languages

    June 23rd, 2009

    Speaker: Neil Ford, Thought Works

    Warning: This entry assumes knowledge of GOF patterns…

    Observation on the GOF (Design Patterns) legacy: Many of the patterns were really good at getting over C++ nightmares.

    Boy does the blogger agree with the following statement: UML is too technical for non-techies; not technical enough for techies.

    Iterator: Super-easy in Groovy using closures; requires a non-trivial interplay of interfaces and classes using the traditional GOF pattern. Lesson: What’s commonly needed will eventually be subsumed by language features.

    Command pattern: Modern languages implement this using closures. Java, for example, again requires a command interface, command implementations etc. Structure (e.g. adding undo/redo) can be easily added on an as needed basis.

    Strategy pattern: Using code blocks in Groovy instead of adding extra classes, as one would in Java.
    (Must see article: Execute in the Kingdom of Nouns from Steve Yegge)

    Template Method pattern: Traditionally declared using abstract methods in classes. In Groovy we can use variables that hold onto code blocks, thus eliminating the need for the abstract methods. Use Groovy’s null dereference operator to avoid null pointer exceptions when the code blocks are null.

    Interpreter pattern: Originally designed to overcome deficiency in language being used by creating a new language on top of the current language. Alternative: Groovy permits us to easily create new DSL using the “expando property” feature. Ford notes the fact that a new form of pattern is arising: Patterns of DSLs (Ford notes that Martin Fowler is going to release a book on this very subject in the coming months.) Ford notes that internal DSL’s amount to embedding an interpreter.

    Decorator pattern: Groovy’s invokeMethod feature can be used to achieve what requires Aspects in Java. Inline decoration is also possible. Ford goes on to explain a few other interesting aspects of Decorator… but I can’t keep up ‘cos I’m not familiar enough with Ruby!

    Adapter pattern: In Java we need to wrap existing entities to achieve interface compatibility. Ford shows a really interesting Ruby-based approach which involves dynamically changing the interfacing of an object at runtime. Notes that this can only be done with interpreted languages and that similar things can be achieved using AST transformations in Groovy. However, the latter is more difficult than in Ruby because of it’s nature as a truly interpreted language.

    Null object pattern: In Groovy null dereference operator can be used to handle the null object situation frequently. In Ruby this doesn’t work because even null (nil in Ruby) is also an object.

    Aridifier pattern: Avoid repetition. Ruby example shows how test methods can be created on the fly to reduce code footprint significantly.

    Ford’s Summary: Traditional DPs use a lot of structure to solve problems. Dynamic languages permit far more elegant solutions.

    I’m reminded of statements made long ago (in an online article, I recall) by OO grand master Bertrand Meyer to the effect that:Patterns? All well and good but there are no replacement for language features and reusable libraries.

    Ford’s presentation was absolutely first class in terms of both content and delivery.


    Jazoon ‘09: The King (aka König) speaks!

    June 23rd, 2009

    Session title: Groovy – seven usage patterns

    Dierk begins firstly by emphasising that Usage Patterns are not to be confused with (GOF) Design Patterns, secondly by stating that the intent of Groovy is not to replace Java but to make the life of the Java developer easier.

    Up front: I won’t attempt to describe all Dierk’s patterns here in detail, but will limit myself by noting the quintessence …

     

     

    Pattern #1 “Super glue”: Hook large components i.e. middleware, frameworks, widgets etc… together.
    Dierk now engages in an act which I swore I’d never attempt myself live and on stage: Live coding! And boy Dierk can type fast!!!
    Ah ha… naughty but amusing… The typing is being done by an app.
    Regardless: With just a few lines an RSS feed is shown in a Swing GUI including a table, a scroll bar. Very nice.

    Pattern #2 “Liquid Heart”: Externalise business models because they need to constantly reflect our changing understanding of the business problem. The “liquid” here is, for example, a rule that needs to be dynamically changed. In this case Dierk invokes Groovy from Java. The Groovy functionality can be exchanged at any time… even runtime.

    Pattern #3 “Keyhole Surgery”: Minimal invasive surgery “in vivo”
    Dierk shows how Java objects can be seamlessly addressed (in-line) in Groovy statements and expressions. This means that with very little code we can wrap existing code and add some additional functionality. Dierk mentions how this was recently used to great effect as part of a SAP mandate, saving days of work as a result.

    Pattern #4 “Smart Configuration”: Enhance configuration with logic
    This is a common pattern in Groovy. Whereas Java apps tend to use XML for configuration, Groovy makes extensive use of itself as the configuration mechanism. Dierk shows an example taken from Navis. Instead of having one config file per client, Navis now has a single config file (in Groovy) which handles all the desired configurations.

    Pattern #5 “Unlimited Openness”: Every line of code may be changed
    Dierk cites PlanetRIA (planetria.org) as an example of where vey little code change was required to create a new app based on an existing one – which in this case was groovyblogs.org.

    Pattern #6 “House Elf”: Delegate the housework
    Example: Use the Groovy ant task to introduce novel functionality to ant at the time the ant script is running!

    Pattern #7 “Prototype”: Feasibility study on the target platform
    Groovy is ideal for rapid prototyping. Dierk explains how Canoo uses functional prototypes as a partial replacement for a complex, static description of the application’s intent, such as is found in most tenders made to clients.
    A cool example involving prime numbers follows. Groovy’s category feature is used to introduce a count of the number of times the modular operator is invoked, which subsequently leads to a vastly improved algorithm.

    In closing Dierk mentions a couple more patterns which are in the pipeline: Lipstick, Ghost Writer. For more information on Groovy usage patterns: Wait for Groovy in Action 2nd ed.; out later this year.

    Just two question from the audience: What’s the best IDE for Groovy development. Answer: At the present time IntelliJ, but improvements are on the way for Eclipse. Next: How reliable and easy-to-use are AST transformations? Answer: A junior developer recently succeeded in developing an AST-based solution in just a few days, as part of the PillarOne project.

    Read a french Blog about Dierk’s talk!

     


    Jazoon ‘09 gets underway with James Gosling

    June 23rd, 2009

    Hi everyone and welcome to Jazoon ’09!

    At Sihlcity just a few tram-minutes away from Zurich’s city center, Jazoon ‘09 begins in the biggest auditorium (now full) with some very loud video sequences. Chris – from I don’t know where – tries his best to wake up a clearly very sleepy audience. He fails. More coffee for the audience please!

    Next up a rerun of the Monty Python-esque “Brief History of Java” featuring JG… who now takes to the stage!

    We’ve already seen James “the man thanks to whom I could purchase my first house” Gosling hanging around the exhibition center this morning. Title of his keynote: “Where we’re heading”.

    JG puts the network at the center of things; emphasises the ubiquity of Java (nice observation: more Java devices than humans on the planet!) Other rough estimates: 6M Java developers (most of them rubbish, I should note – OK I suppose that was a bit harsh) and 15M JRE downloads per week on average – not including the PC’s that are rolled out with a JRE!

    Some impressive examples of major Java apps: Brazilian healthcare, Large Hadron Collider (at the physics research institute CERN near Geneva etc. etc. This is indeed true: Java is everywhere. I don’t know how many JavaCards I have in my wallet.

    JG now emphasises the VM, giving it more importance than the Java language. I naturally think of Google’s Android and the completely re-architected VM called Dalvic.

    Next up: JG demos Glassfish V3 and in particular talks about the simplifications that have taken place since V2. Annotations and injections are basically the key to this. I’m reminded of a project I did on V2 a little while back. Other than the integration with MQ Series (which proved a little tricky) Glassfish turned out to be one of the most satisfying App Server experiences I’d ever had. Glassfish succeeds in combining the characteristics of being super-easy to install and configure, and yet it is clearly highly scalable; IBM please take note. I’m not on Sun’s payrole, I promise!

    JG now demos the Hudson integration server as well as Kenai, which he describes as a cloud service for development. Amongst other things, this allows development for hardware which one may not actually own or have access to.

    Next up: Java Real Time. The challenge: How to garbage collect (GC) deterministically. JG talks about the balance GC designers needs to find between performance and determinism. Rightly notes that there are even stock exchange apps, which require this level of control.

    Talking of “control”, JG describes Neal Young’s LincVolt car and the degree of control that Real Time Java has and how this leads to superior efficiency.
    And on the subject of efficiency, JG compares Java performance with C++ and is happy to note that in most everyday situations Java is way ahead.

    A subject close to my heart: JSR248, the Mobile Services Architecture which is designed to unify a bunch of individual JSRs. The motivation for this is that to-date mobile hardware vendors have consistently delivered different combinations of JSRs, which basically makes a joke of write-one-run-everywhere. The bad news from JG: MSA still has a way to go. Good news for Android?

    Changing direction, JG notes that the Web is now the face of the organisation. JavaFX will (apparently) deliver a Flash-like (to use JG’s expression) experience to address the expectations of the next generation of end-users.

    JG describes some of the basic JavaFX features and talks about the graphical design tool that was demo’d at JavaOne – but stresses that it’s a long way from GA. Back to what can be done today: Using Photoshop and Illustrator to create a static UI design, which can be subsequently programmed out by the JavaFX developer. This is precisely what I talked about at J1 a few weeks ago.

    Exit JG stage left to applause.

    Well, it’s now off to the sessions. Tune in later for some more live session blogging!!!


    Jazoon 2009

    June 12th, 2009

    At the Jazoon, the international conference on Java technology (Zurich, June 23-25), James Gosling, the father of the Java programming language, will deliver the opening Keynote. So if you missed JavaOne this year, just attend Jazoon’09 and benefit from inside information and updates, but also get latest news about the future of Java. 

    Besides James Gosling, Jazoon’09 features many other interesting speakers from the Java world including Neal Ford, Ivar Jacobson, Adrian Colyer and Danny Coward. As a special guest we are pleased to announce Linda Cureton, CIO of the National Aeronautics and Space Administration (NASA) Goddard Space Flight Center in the USA. She will deliver the Jazoon’09 closing Keynote.

    Moreover, as the first developer conference in Europe, Jazoon’09 launched a competition for young speakers aged 26 and under. Out of the several dozen submissions, an expert jury has selected the three most promising. The finalists of the Canoo sponsored “Jazoon Rookie 2009” are:

    João Arthur Brunet Monteiro - Brazil
    Bettina Polasek - Hungary
    Deni Lukmanul Hakim - Indonesia

    On 24 June 2009, the conference audience and the jury will vote on the winner. Canoo is very exited to be involved in such an event, as the contest is an opportunity for creative minds under the age of 26 to present their ideas to a broad public of experts. Facing the present shortage of skilled IT specialists, it was an obvious decision for Canoo to actively support the advancement of young professionals and new ideas.