Jazoon, Day 2: XWiki
24. June, 2009 at 13:18 | In Conference, Software | Leave a CommentTags: Database, Groovy, Java, Jazoon, MediaWiki, MoinMoin, Velocity, wiki, XWiki
I’m a huge fan of wikis. Not necessarily MediaWiki (holy ugly, Batman, the syntax!). I dig MoinMoin. I just heard the talk by Vincent Massol about next generation wikis. Okay, I can hear you moan under the load of buzzwords but give me a moment. XWiki looks really promising.
Wikis basically allow to publish mostly unstructured data. I say “mostly” because wikis give them some structure but not (too) much: You can organize it in pages and put it into context (by linking between the pages). Often, this is enough. But recently, MediaWiki has started to add support for structured data. See that infobox in the top left corner? But that’s just half-hearted.
XWiki takes this one step further. XWiki, as I understand it, is a framework of loosely coupled components which allow you to create a wiki. The default one is pretty good, too, so most of the time, you won’t even get into this. The cool part about XWiki is that you can define a class inside of it. Let me repeat: You can create a page (like a normal text page) that XWiki will treat as a class definition. So this class gets versioned, etc. You can then add attributes as you like.
After that, you can create instances of this class. The instances are again wiki pages. You can even use more than a single instance on a page, for example, you can have several tag instances and a single person instance. Instances are versioned, too. Of course they are, this is a wiki!
Now you need to display that data. You can use Velocity or Groovy for that. And guess what, the view is … a wiki page. So your designers can create a beautiful look for your the boring raw data. With versions and comments and everything. While some other guys are adding data to the system.
In “normal” wiki pages, you can reference these instances and render them using such a template. The same is true for editors. With a few lines of code, you can create overview pages: All instances of a class or all instances with or without a certain property or you can use Groovy to do whatever you can think of.
Now imagine this: You have an existing database where your marketing guys can, say, plan the next campaign. They can use all the wiki features to collect ideas, filter and verify them, to come up with a really good plan. Some of that data needs to go into a corporate database. In former wikis, you’d have to use an external application, switch back and forth, curse a lot when they get out of sync.
With XWiki, you can finally annotate data in your corporate database with a wiki page, with all the power of a wiki and you can even display the data set in the wiki and edit it there. Granted, the data set won’t be versioned unless your corporate database allows that but it’s simple to do the versioning in the data access layer (for example, you can save all modifications in a log database).
Suddenly, possibilities open up.
Jazoon 2009, Day One
23. June, 2009 at 21:08 | In Conference, Software | 1 CommentTags: Design Patterns, Gradle, Groovy, Java, Jazoon, Maven, OpenJDK
It’s late, so only a very short summary of today.
James Gosling gave a broad overview what is currently happening at Sun. Nice video but little meat. I asked about what happened to closures but I’m not sure whether I can repeat his answer here. My feeling is that, behind the scenes, there’s a lot of emotions and that’s bad. Oh well, maybe some will simply implement something reasonable in the OpenJDK. Otherwise, Closures are probably dead in Java which is a bit of a pity.
Dirk König showed a the most common use cases for Groovy in a Java project. Nothing really new for anyone who had been in contact with Groovy for nicely packaged and showed some cool stuff you can do with this mature language.
After that, Neal Ford explained how Design Patterns started to disappear. We didn’t really notice but things like Iterators or Adapters have become features of the language itself. In Java, you still have to query a container for an iterator, in Groovy, you just container.each { … do something with each item … }. Really nice talk, as usual.
Missed most of the next talk because I talked to Dirk König but if you’re using Maven or Ant as a build system, you should have a look at Gradle. It fixes most of the issues with Ant and some of the ones with Maven. Later that day, Hans Dockter (a Gradle developer) and I tossed a couple of ideas back and forth how the build could be improved. If any of these could be implemented, we’ll see a new way to build software.
At 15:00, Jason van Zyl told us what is happening in and around Maven. His talk was so full of information, it was impossible to follow the slides and him. Maven 3.0 is due early 2010 and it will solve a lot of the issues in M2. One of the most important features: You get hooks to run stuff before and after a lifecycle phase. Ever wanted to calculate a build number? Now you can.
M3 is based on SAT4J, just like Eclipse p2. Now, if you followed my blog, you know that I hate p2. p2 is a piece of banana software, delivered green, ripes at the customer. Which is a pity. p2 solved a lot of the issues with the old installer and it could solve all the other issues but apparently, there are forced behind the scenes which make this almost impossible. So when you meet Pascal Rapicault next time, don’t blame him for all the misery he has caused you. He has to solve a mission impossible and that only works in movies.
Later that evening, Thomas Mueller talked about Testing Zen. Nothing really new but I’ll probably have a look at H2 next week or so. It could replace my favorite in-memory Java database HSQLDB.
The closing session was by Neal Ford again. I wish I could create slides that were only a fraction as great as his. *sigh* Anyway, he drew a large arc from how technologies can become obsolete within a few years (as we all know), how good intentions pave the road to hell, about our responsibilities as software developers which go beyond what’s in our contract and predicting the future. Well, Terminator is probably not a good example but everyone knows it. Still, I find it troubling that the military is deploying thousands of automated drones for surveillance. You don’t? How would you feel about a robot equiped with a working machine gun that is programmed to automatically fire on any human that isn’t wearing an RFID tag? Samsung installed a couple of them along the northern border of South Korea two years ago. Skynet, here we come!
What they don’t teach you about software at school: Be Smart!, the last talk of the day, was disappointing. I’ll give Ivar that he had to compete against Neal but … The topic was okay and what he said was correct and all but the presentation could use some improvement. ‘Nuff said.
Jazoon: The Closures Controversy
26. June, 2008 at 21:24 | In Conference, Software | 3 CommentsTags: Java, Jazoon
If you ever wanted to know if it is possible to go through 60 information-packed slides in 50 minutes: Yes, it is. I’ve been there and Joshua pulled it off in from of about 100 people, so it’s not a delusion of mine, either.
In his talk, Joshua presented a host of reasons why the BGGA proposal is a really bad idea. The key information here is “BGGA”. We all want closures and Joshua is no exception, it’s just that the BGGA proposal is like Generics on steroids and if you can’t wrap your brain about Generics wildcards, then you won’t understand BGGA closures as well.
The code in the proposal doesn’t look too bad at first glance:
{int x, int y => x+y}
Unless you try to use an array. If you did “int[] x”, you’d get an error because closures are based on generics and generics can’t handle arrays or primitives.
But the next example is better to understand why BGGA will add a new level of hell to Java which will be worse than generics:
{int,String=>Number throws IOException} xyzzy;
is translated into
interface Function1 { // system-generated
R invoke(int x1, A2 x2) throws E;
}
Function1 xyzzy;
Doesn’t bother you because you’re never going to see this? Well, think again because if you try something that the generics type system doesn’t understand, you’ll get a generics error message like this one:
NewtonWithClosures.java:26: invoke(capture#418 of ? super {double => double}) in {capture#418 of ? super {double => double} => capture#928 of ? extends {double => double}} cannot be applied to (double)
The reason for this is that the closures are implemented using generics and without any high level support in the compiler so the compiler can’t generate a more useful error message. And this was a simple example. We all know how quickly generics get message and for me, that means that any implementation of any new feature that is based on generics is a threat to the future of Java.
Again, I’m for closures and I use them as often as I can in Groovy but the current proposal is just a new way to make Java harder to use. Why don’t they simply change the compiler to allow to access field and method objects (from java.lang.reflect) via the class? Like so:
collect(list, Math.class.min)
If we could use Method objects like first class citizens (instead of via the horrible reflection API with it’s horde of checked exceptions), we could use Method objects as simple closures. Then, all we would need is a set of util classes for single mutable primitives and we’re done. Sure, the syntax wouldn’t be as compact but every normal Java developer would be able to understand the concept and how it’s supposed to be applied in a few hours.
If you care, here is a link to the whole set of arguments by Joshua Bloch. Read it, keeping in mind that Joshua is pro closure, he just wants to avoid a second generics debacle.
Jazoon: One Year Of Groovy
26. June, 2008 at 21:20 | In Conference, Talk | 2 CommentsTags: Groovy, Jazoon
That was my talk. Attendance could have been better but I guess with Joshua Bloch presenting Java Puzzlers, Cédric Beust with “A quick guide to modern languages and interesting concepts for the busy Java programmer” and Adam Bien with Glassfish at the same time, it wasn’t so bad.
Here is the link to the presentation as OpenOffice document. Feel free to post any comments or questions below.
Jazzon: Weblog in 15 minutes II
26. June, 2008 at 21:09 | In Conference, Software | 1 CommentTags: Java, Jazoon
I wish I could link that presentation because it was the best I’ve seen in the whole show, both visually and how it was presented. So here is the link to the abstract. There is something to be learned by this talk for anyone who wants to demo a software: One human being can’t talk and use a computer at the same time. While David explained things, Bertrand wrote the code. Thumbs up!
And in this case, the visual candy didn’t distract from the fact that these guys were really showing off something that ought to have an impact. They showed agile web development with Apache Sling.
A sling gives you range and power and Apache Sling does just that. With just a few pieces of JavaScript added to an existing static HTML web site, they built a blog in roughly 10 minutes. Impressive. I’ve got to try this out myself, probably this weekend.
Jazoon: Thursday Keynote
26. June, 2008 at 21:01 | In Conference | Leave a CommentTags: Java, Jazoon
Thursday’s keynote was “Effective Java Reloaded” by Joshua Bloch where he presented a few key points from his new book.
The examples showed how to replace bit fields (or rather int constants which are used a bit fields) with EnumSet and EnumMap, and how to do lazy initialization for various cases effectively and correctly. If you’re a Java programmer who does more than “Hello World”, this book is a must have because it explains not only how to do things but how to do things elegantly and why.
Jazoon: Web Tests
26. June, 2008 at 20:50 | In Conference | Leave a CommentTags: Jazoon, Testing
In his talk, Dierk König showed ways to test a web applications with canoo webtest. There are several way to come up with a test script: Recording the user actions with a browser plug-in or by writing the script directly, for example.
He also explained the best ways to test an old application (just test what you can, look for NPE’s, for example, load all pages, make sure some properties appear). Of course, since the app wasn’t designed to be testable, you’ll be limited in what you will be able to test.
IFRAMEs, on the other hand, are not a problem, as are AJAX requests. The main issue with AJAX is that while they are still asynchronous, the test framework has some limitations as to what it can test (permutation of request order). Testing special code for IE and FF is not a problem, the framework supports some browser bugs, too. Also, you can have special code to login or to get the app into a certain state and use this code as a kind of “subroutine” in several tests to avoid code duplication.
Internally, webtest will use htmlunit to examine the HTML returned by the app and execute the JavaScript in it. So DOM manipulations can be tested, too.
It’s not really suitable for load tests, though, since it lacks the features to run concurrently on several computers at once. Use JMeter for that.
If you need to prepare the DB before the tests, use dbunit.
Jazoon: Distributed Client/Server Persistence
26. June, 2008 at 20:43 | In Conference | Leave a CommentTags: Hibernate, Jazoon
In his talk, Alexander Snaps presented a framework called Hölchoko which allows to cache objects from the server on the client. This is a bit like Gears but for Hibernate. No magic bullet, just a layer over the OR mapper to push objects over the wire, cache them in a local DB and make the merge with the server more simple once you’re connected again.
See his blog for more details.
Jazoon: Spring and Maven 2
26. June, 2008 at 20:37 | In Conference | Leave a CommentTags: Jazoon, Maven2
After some technical difficulties (the only ones I saw during the whole show, well done Jazoon!), we got a short company placement. One or two sentences, next slide, that’s how it’s ought to be (if at all; I mean if I was interested in your company, I’d look at the web site and not at the presentation but I digress).
They presented the EL4J project which is the result of several years of developing web applications. From what I gathered, it makes it a bit more simple to wire web apps together using a bit of convention over configuration and Maven 2. It also has some Swing support in it.
Jazoon: Overview of Jazz and GWT
26. June, 2008 at 20:31 | In Conference | Leave a CommentTags: Jazoon
After spending an hour talking to Ted and keeping him away from the work he had to do, I attended the presentation of Jazz. Another talk that would have benefited greatly from a live demo. Walked out after a few minutes to see the GWT presentation. The presenter of that one had the same problem. *sigh*
Guys, we’re developers, not managers. Show us code and an IDE with a “Run” button.
Still stayed till the break so I could ask some questions.
Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.
