Archive for the ‘Java’ Category

JRecordBind - (un)marshalling host files

Friday, August 1st, 2008

I’ve just received the approval email for my latest java tool: JRecordBind.

If you are familiar with JAXB, JRecordBind is just the same (from a functional point of view) but it targets host files, a.k.a. “fixed length text files“.

If you are not familiar with (un)marshalling tools, let me present you JRecordBind.

When you need to import some fixed length file, you usually have an extensive documentation about which field is where. Something like

  • from char 1 to 20 there are name and surname, filled with spaces
  • from 21 to 28 the birthdate in the format YYYYMMDD

and so on.

Speaking XML, this is the XSD, the definition of the structure of the data file, with the types of each field.

JRecordBind needs you to write this definition into a “.properties” file.
The RecordBeanGenerator will then create a java bean suitable for storing each line of the data file.
The Marshaller object will transform this bean into a text line: that’s useful when you need to export data.
The Unmarshaller will do the contrary, that’s transforming every single line into a bean: useful when you need to import data.

JRecordBind allows the developer to focus of the varying part of such import procedures: how to spread imported data into a database. JRecordBind will care about reading/parsing/validating.

JRecordBind is still in the incubator since I plan to add multiline support (beans defined in multiple lines) and multibean support (different types of beans defined in different lines)

Nonetheless, it’s quite fast: on my pentium-m, unit tests have unmashalled 100.000 lines in 5 seconds.

If you want to blame me for this tiny little piece of code, drop me an email at federico _Oo_ fissore.org

A final note

I must admit that JRecordBind is currently compiled with Java 6. But it could be easily ported to Java 1.4. Do you think I should? My ego says “Noo! Java 1.4 is dead. Long live Java 1.4!” but since host files are old, maybe old 1.4 software could benefit of this tool.
Uhmm, I’m at a crossroad.

7th of March: JUG Torino meeting with IntelliJ

Thursday, March 6th, 2008

Today we host Vaclav Pech, JetBrains evangelist, that will show us the functionalities of IDEA, the famous IDE.

IDEA has always been one step ahead when talking about refactoring: it will be great to have Vaclav himself speaking to us about his product.

So: don’t miss it!

JUG Torino January meeting over: thank you!

Wednesday, January 30th, 2008

Despite my deficiencies as a meeting organizer, the January meeting (the very first one this year) has just been closed and it was a good one.

I finally managed to study SoapUI and to briefly show its functionalities in the quickie, while Bruno showed us the new features of Java SE 6: scripting could be real fun… I have to look deeper into it, especially considering my previous post.

As always, all the bits (slides and code) showed and used during the meeting will be available on the JUG wiki page in the coming days.

Now come nearer the monitor, because I prefer to whisper this: next meeting we’ll probably have a new location! Sshhhh!!! Don’t tell anybody!

Will we ever have a Next Big Language? No…

Sunday, January 6th, 2008

Today I’ve had the pleasure to read InfoQ[0] and its comments about Ola Bini’s[1] opinion about the coming or not of a Next Big Language.

I share Ola’s opinion: no big language for your future, forget it.

Newer apps will be built with a mix of different languages, because each tool is born to solve one or few problems, and usually they are very good at it. Increasing software complexity will lead to a finer grained choice about which language best fits the problem to solve.

Question is: how do these languages communicate? Ola thinks they are all going to live on top of a JVM. That’s probably what will happen. Because that will make things easier.

That leads to the next question: will Java die? No. If we are going to stay in the JVM (and there is already evidence of it: JRuby, Groovy, Scala, Jython…) then we will gently move to these new worlds while keeping on using, developing, improving and investing on our solid code base.

I think no one can really predict the death of a language. We could only throw thoughts about what could change.

Language interoperability and polyglot programming could be good guesses.

Back from JavaPolis ‘07

Sunday, December 16th, 2007

Very good week, very good talks, very nice venue, wonderful croissants, very nice people, ugly photos! (photographer’s fault)

One nice note: a good number of talks was related to agile and there were always quite a crowd of people attending.

Going to Javapolis

Saturday, December 8th, 2007

Ready, set, go! In 6 hours from now I’ll officially start my trip to Antwerpen and get my week of professional vacation.

I’ve just set up my agenda (beta version, of course)

Day 1

09:30-12:30 The Zen of Agile Management by David J. Anderson
Open Source ESBs by Tijs Rademakers and Jos Dirksen
13:30-16:30 Google API’s with Dick Wall
Introduction to JRuby with Brian Leonard and Charles Oliver Nutter
16:45-17:15 SoapUI by Ole Matzura (Open-Source)
17:25-17:55 Hudson, a continuous integration system by Kohsuke Kawaguchi, Sun (Open-Source)
20:00-21:00 Agile development of distributed systems with Guy Nirpaz

Day 2

09:30-12:30 Swinging RIA with Richard Bair, Jeanette Winzenburg and Chet Haase
NetBeans and Java EE 5 development by Ludovic Champenois and Lukas Hasik
13:30-16:30 Guidelines and Hints to EJB3 and JPA development with Linda Demichiel and Kenneth Saks
16:45-17:15 A gentle introduction to dependency management with Apache Ivy by Xavier Hanin (Open-Source)
17:25-17:55 Easy GUI testing with FEST by Alex Ruiz & Yvonne Wang Price (Open-Source)
Task-focused programming with Mylyn by Wayne Beaton (Eclipse, Open-Source)
19:00-20:00 Great Java Desktop Apps - can it be done? by Eivind Throndsen
20:00-21:00 OpenLaszlo, From RIA to Ajax and Mobile with Geert Bevin
21:00-22:00 Clustering a Real World Enterprise Application by Ugo Landini and Sergio Bossa

Day 3

09:30-11:30 HOLE
12:00-13:00 Guice by Bob Lee
OpenJDK - The First Year by Mark Reinhold
14:00-15:00 HOLE
15:10-16:10 JSR 316 - Java Platform Enterprise Edition 6 Specification by Roberto Chinnici
Java persistence - a Heretic’s demonstration by Olivier Caudron
16:40-17:40 JSR 318 - Enterprise JavaBeans 3.1 by Kenneth Saks
Scrum in practice for non-believers by Jannik Persoons and Darek Krzywania
17:50-18:50 The Future of Computing panel with James Gosling, Neal Gafter, Joshua Bloch and Martin Odersky
20:30-21:30 The Closures Saga continues with Neal Gafter

Day 4

09:30-11:30 HOLE
12:00-13:00 Scala by Martin Odersky
14:00-15:00 HOLE
15:10-16:10 ServiceMix by Bruce Snyder
16:40-17:40 Close Customer Collaboration - the BMW case by Johan Lybaert
GlassFish - Bringing *you* a better application server in three steps by Alexis Moussine-Pouchkine
17:50-18:50 The Java Puzzlers by Joshua Bloch and Neal Gafter
JSR 311 - JAX-RS The Java API for RESTful Web Services by Paul Sandoz
21:30-22:30 New Java Language Features with Neal Gafter and Joshua Bloch

Day 5

09:30-10:30 A Kanban System for Software Engineering by David J. Anderson
10:30-11:30 Evolving Agile by Scott Ambler
12:00-13:00 Real Options in a nutshell by Olav Maassen and Chris Matts
OSGi, the future of Java? by Peter Kriens
13:00-14:00 Test Driven Development, Beyond the Acronyms by Lasse Koskela

See you next week!

Javaday Wars

Wednesday, December 5th, 2007

The Javaday 2007, roman edition, is over


To be continued…

Javaday banner

Saturday, October 6th, 2007

Can you see it on the right? (lower right actually)

All you need to do is to import the following script:

javadaylink.js

I’ve edited the sidebar.php page of my wordpress theme in order to get it as I wanted

Thanks to Fabio!

Javaday 2007: Turin setup is almost over

Sunday, September 30th, 2007

I don’t think I should talk about that now, but since it’s a common marketing practice to introduce things while they are “almost” done (the mythical beta!) here you can download the draft of the brochure and here you can get to the website. Do not bookmark it as in the following days the official web addres will pop up: http://www.javadaytorino.com

ITA: JUG Torino Meeting di Settembre

Wednesday, September 5th, 2007

Quando sono tornato a Torino, mi sono ripromesso di non perdere i contatti con il JUG di Milano (dove è nata la mia passione javista e per le cose fatte bene).

Purtroppo i tempi non sempre permettono di fare tutto ciò che si vuole: fu così che mi persi uno speech molto interessante su Google Web Toolkit (interessante perchè, avendone tenuto uno su Echo2 ed essendo l’approccio di quest’ultimo opposto a quello di GWT, non volevo perdere l’occasione per qualche domandina provocatoria!)

Ma se Maometto non va alla montagna, sarà ben la montagna a raggiungere Maometto!

E allora, il 21 Settembre, presso la sede della CSP in Corso Svizzera, ci sarà il meeting del JUG Torino con in scaletta, insieme ad Hudson (Bruno Bossola), GWT (tenuto dallo stesso Gian Carlo Pace che allora tenne quello a Milano).

Maggiori dettagli sul wiki del jug.

E’ un venerdì, quindi possiamo fare tardi :)