Eclipse Europa is here
Tuesday 17 July 2007 @ 3:52 pm
Filed under:

Two weeks a brand new Eclipse called Europa has been released.
This release is just as the previous one (Callisto; version 3.2) a combination a range of of Eclipse projects.
So this release is not only one for the Java IDE, but also the Web Tools Platform (WTF), Eclipse Modeling Framework (EMF), CDK, Eclipse Dynamic Language Toolkit (DLTK), Eclipse Business Intelligence and Reporting Tools (BIRT) and much more.

Since the whole Europa release is too large for the average developer, the best way is to only download it by starting of with the Platform Runtime which can be found here
and install only the desired stuff using the Update Manager from Eclipse (”Help -> Software Updates -> Find and Install..” from the menu bar) via the “Europa Discovery Site”.

After you installed your customized Eclipse IDE you can check New and Noteworthy from the Platform, Java Development Tools (JDT) and Web Tools.
To summarize the new and noteworthy in Europa, I personally found the following relevant items:

  • You can optionally use “Save Actions” (configured and enabled in the preferences) to perform all kind of actions when saving a Java editor in Eclipse. Possible actions are code formatting, adding missing @Override and @Deprecated annotations, Organize imports and removing trailing whitespace.
  • Support for the Java Persistence API
  • We can now finally benefit from a visual JSP / JSF Web-Page Editor
  • Full JSF 1.2 support including a visual Faces configuration editor
  • Long resource paths are now supported on Windows. Requires 1.5 or higher for it to work.
  • Improves refactoring like refactoring directly inside the editor (without a dialog) and no need anymore to save your editors before doing a refactoring.
  • Workspace relative paths are now possible for JavaDoc locations. This way it’s now possible to place a zip with the JavaDoc of a library inside your project and attach it to your library. The advantage is that each developer will automatically get the JavaDoc when the check-out the project from version control. This is especially helpful for commercial libraries for which you don’t have the source code.
  • CTRL + 3 will give you a quick access to UI elements such as views, commands, preference pages etc.
  • And finally for Eclipse is now fully functional for Windows Vista.

The items I described above are just the tip of the iceberg. This because Europa consists of 21 Eclipse projects, so I barely scratched to surface so to speak.

— By Emil van Galen   Comments (0)   PermaLink
javaone2007: JFX or rich clients revisited
Thursday 10 May 2007 @ 5:56 pm
Filed under:

Sun likes to call them ‘integrated rich clients’, a nice buzz word for reinventing user experience. Yesterday I visited two rich client related sessions. One about GWT, wich was more or less a copy of last years session, and one about JavaFX (formerly known as F3, nowadays already abbreviated to the better sounding JFX). Chris Oliver amazed the audience with really stunning effects and smooth looking user interfaces: Definitely an Oehhh! and Aahh! session. It is too early to make up conclusions yet but it seems the Sun developers have gotten graphical interfaces, and especially the way an interface gets set-up to meet the design made by a professional design team, finally right. JFX introduces a new scripting languages, called JavaFX Script. Which is, when you ask me, a little bit redundant but, due to tongue slippery, I think the script part of it will disappear in normal human to human communication. (We aren’t calling java, JVM Script or are we?) But despite the name, the scripting language itself looks promising. It’s statically typed, which can be subject of religious language battles but that is out of the scope of this blog-entry, and it uses a declarative building styling to declare UI components. When compared to the XML variants like XUL, SVG but also Flex and Laszlo, a breeze to read. And when compared to regular Swing (or SWT!) probably a breeze to write also. In other words, refreshing.

So, should we all make the move and forget Ajax or Flash? Maybe, but maybe not. (GWT is still pretty cool technology and as far as I have seen it, it is the best possible solution for rich browser apps. For example take a look at how the guys from Google crack performance issues. Nuff said).There are still some irritating issues to overcome. First of all there is no out of the box data binging support (for example to call a RESTful service and bind the results to user interface components). But maybe more problematic is the deployment model. Which is not there! Yes, Applets or Webstart but both need a ridiculous huge download for the latest JRE release. Not really user friendly. I have to admit, Sun has announced to work on this problem and promised to come up with a solution as soon as possible but in the meantime it is missing. And a bad deployment model at the moment there is a lot of momentum is marketing wise not really what you call handy. Missed opportunity?? Anyway, JFX is right here right now so for me it’s playing time.

— By Okke van 't Verlaat   Comments (0)   PermaLink
javaone2007: just a meme
Wednesday 9 May 2007 @ 6:05 pm
Filed under:

After visiting Neil Ford’s excellent and inspiring presentation about domain specific languages, I was wondering if a DSL is actually nothing but a kind of computer instruction slang?

— By Okke van 't Verlaat   Comments (0)   PermaLink
javaone2007: it seems the sun is shifting
Wednesday 9 May 2007 @ 6:03 pm
Filed under:

JavaOne 2007 is only just one day on its way, the first couple of 81 hours have been past, and my maximum information observing level has been reached already: Too much to check out the coming weeks. Too many high impact announcements. Too many cool new technologies, too many new tools and too many new paradigm shifts.

Thou shall open up everthing you got, except for some key strategically important technologies, and thou shall spread the words to open up everything. Under the safe covers of being a community is more important than being a regular old company, open source is the new paradigm. Open opportunities as Sun is like to call it. Great move I think! And its paying off already. Except for the JDK, which is conceptually a big step to open up but practically nothing but a small give-away, goofy things are seing the light under Sun’s GPLv2 umbrella.

But Sun is making more, not unexpected but also not foreseen, movements. Where, in my very humble opinion, Sun was traditionally not very well doing in the area of user interaction (Does the term metal look and feel still rings a bell?), they seem to have been paying more attention and energy on this topic. Possibly driven by competition, Sun (just like Microsoft by the way) is following the vision of MacroMedia (indeed, not Adobe’s vision unless vision can be bought) and has been moving into the direction of rich internet applications (or integrated rich clients as they tend to call it). Form follows function has become JavaFX: A stunning way to re-implement applets. Hopefully marketing can handle it this time.

More news? Yep Real time java has finally been born so JSR-1 can be removed from the todo-list. Blu-Ray is currently hot topic. And Glassfish V3, the reference implementation of EE5, only needs a 100Kb bootstrap and starts up in less then half a second unless some serious applications have been deployed. (By the way, glassfish seems to have a pretty slick architecture for an application server and another by the way seems to be the question whether we want to use commercial available application servers from the old pre-ee5-era if this thing is really as good as the five minute demo has shown us.) Oh, and before I forget, everyone should sheck out NASA’s project World Wind, google earth as a swing widget. And in the tradition of the new openness completely free to abuse!

Finally, and this could be experienced during last years conference already, other languages than Java are not ‘wrong’ or ‘dirty’ anymore. Ruby has been adopted as a first class citizen of the virtual machine and the JRuby team has not been hired to implement a funny scripting language, but seems to be hired to jump on the bandwagon not as a an ignorant passenger but more as fully armed musketeers. It is very impressive to see how Sun is dealing with the shift from java to other languages. And it is also very impressive to see the progress that has been made in tool support. Last years netbeans hype was a bit overdone but this year there are enough reasons to promote the upcoming version 6. As far as I could see, changes are fair Netbeans will become the platform of choice to develop Ruby, and especially Rails, applications.

— By Okke van 't Verlaat   Comments (0)   PermaLink
Very interesting blog about J2EE performance
Tuesday 1 May 2007 @ 10:36 am
Filed under:

Hi all,

Vincent Partington from Xebia has been blogging about J2EE performance problems he and his colleagues have encountered.

They have compiled a top 10 list. It is a very interesting read, as it is all very recognizable :-)

See http://blog.xebia.com/2007/04/30/ejapp-top-10-countdown-wrap-up/

(and TheServerSide.com as that is where I stumbled across the link to Vincents blogposts)

— By Ruben Sprangemeijer   Comments (0)   PermaLink
javaone2007: coolest session title
Thursday 19 April 2007 @ 4:16 pm
Filed under:

This years javaone conference is about to happen and since my conference pass has been ordered it is time to wrestle myself through the program in order to find the most optimal schedule in terms of quality and time. Meaning a lot of reading, shuffling, weighting and head-scrabbing. A process which probably will last untill the last session of the conference. But some sessions are a definitive certainty. And one of these sessions tagged whith the coolest session title of the conference:

Java™ Puzzlers, Episode VI: The Phantom-Reference Menace/Attack of the Clone/Revenge of the Shift

After last years ‘Tiger Traps’, changes are big this session will end up high in this years top-10!

— By Okke van 't Verlaat   Comments (0)   PermaLink
Two-0-Four, Twelve times faster
Thursday 19 April 2007 @ 12:09 pm
Filed under:

Last week the latest release of the Spring frame work was announced on the springframeworkdotorg website. Nothing special, just an .0.x bugfix and enhancement release, actually nothing exiting. So why is it worth a blog entry? Because of the curious announcement that spring bean creation has gone through tremendous performance improvements. Let me Quote: “Regarding the performance improvements, repeated creation of Spring bean instances is up to 12 times faster in this release than previous versions of Spring 2.0. AspectJ-based weaving performance has also increased by a significant factor. “.

Wow, twelve times! That is a pretty precise and accurate number! So not ten, not eleven but exactly twelve times faster! But to bad, my manager asked me to speed up bean creation time by a factor thirteen so I think I need to switch to Guice instead.

The problem in this statement is not the number itself but the fact a number is used to express improvements in an area the expresser has no full control. Currently I’m downloading both the 0.3 and 0.4 releases of Spring2 and my first conclusion is the 0.4 release is about 1.01 times bigger in terms of megabytes (off the record, 62.2 MB for a framework download is pretty fat). My second conclusion is the 0.4 release got downloaded 1.3 times faster. Both are facts, (it’s happening straight in front of me!) but the last fact does not express anything! There are too many factors that are influencing this magic number. Same with the 12 times faster statement. I won’t argue about the fact 2.0.4 has improved bean creation and I immediately believe there situations the number is matched by the comma. But personally, it says nothing to me: I’ll wake up when someone tells me the startup time of all my spring based apps have been square rooted. And even then I’ll point to the useless sleep statements in my constructors which are sitting there only to invalidate bold performance claims.

Note I’m not trying to nitpick on anything; every improvement is more than welcome, as long as my beans see the light, but this kind of statements are besides hollow, technically completely insignificant. Why not give insight *what* has been done to improve performance. Like:

  • AbstractAutoProxyCreator caches advice information per bean, for efficient prototype creation with auto-proxying
  • AnnotationAwareAspectJAutoProxyCreator caches Advisors for singleton @Aspect aspects, increasing performance
  • BeanWrapperImpl mimimizes bean name parsing overhead and caches parsed property path tokens
  • DefaultListableBeanFactory caches pre-converted property values as far as possible
  • ConstructorResolver caches the resolved constructor or factory method, for faster re-creation of prototype instances
  • ConstructorResolver caches converted argument values, to avoid conversion overhead for re-created prototype instances

(As one can see, ‘grep “cache” changelog.txt’ clarifies everything)

Nevertheless, I’m pretty happy with this release and I’m only writing this down as an advice for the upcoming 2.0.5! And now the changelog is still open on my desktop, I can end this blog entry by probably the most important enhancement:

By the way, JRuby 0.9.8 claims IO sometimes to be 6.5 times faster ……

— By Okke van 't Verlaat   Comments (1)   PermaLink
Differences between C++, Java and C#
Wednesday 4 April 2007 @ 9:04 pm

Bjarne Stroupstrup, the inventor of the C++ programming language, has an interesting technical FAQ about C++. He has an example in the FAQ that inspired me to try this out in C++, Java and C#. Have a look at the following C++ code. What do you think this prints?

(NOTE: The C++ code looks a bit weird. I had to replace the angle brackets with ‘[’ and ‘]’ because the WordPress editor does not let me enter angle brackets properly, even if I edit the HTML code manually…).

 

 #include [iostream]   // NOTE: Use angle brackets here

class Super {
public:
    void method(int i) {
        std::cout [[ "method(int): " [[ i [[ std::endl; // NOTE: Use angle brackets here
    }
};

class Sub : public Super {
public:
    void method(double d) {
        std::cout [[ "method(double): " [[ d [[ std::endl; // NOTE: Use angle brackets here
    }
};

int main(int argc, char* argv[]) {
    Sub obj;

    // Which method is called for each of these statements, the int or the double version?
    obj.method(10);
    obj.method(3.2);

    return 0;
} 

Here is the Java version. What do you think this prints? Do you think Java works the same as C++ or not?

 

 class Super {
    public void method(int i) {
        System.out.println("method(int): " + i);
    }
}

class Sub extends Super {
    public void method(double d) {
        System.out.println("method(double): " + d);
    }
}

public class Main {
    public static void main(String[] args) {
        Sub obj = new Sub();

        // Which method is called for each of these statements, the int or the double version?
        obj.method(10);
        obj.method(3.2);
    }
} 

And lastly the C# version. What do you think - does C# work the C++ or the Java way, or is it the same - or different?

 

 namespace Example {
    class Super {
        public void method(int i) {
            System.Console.WriteLine("method(int): " + i);
        }
    }

    class Sub : Super {
        public void method(double d) {
            System.Console.WriteLine("method(double): " + d);
        }
    }

    class Program {
        static void Main(string[] args) {
            Sub obj = new Sub();

            // Which method is called for each of these statements, the int or the double version?
            obj.method(10);
            obj.method(3.2);
        }
    }
} 
— By Jesper de Jong   Comments (3)   PermaLink
Javacard introduction
Friday 23 March 2007 @ 10:21 am
Filed under:

A couple of weeks ago I joined a project that involved javacard technology. A search for ‘javacard’ on this site returned the rather disappointing ‘Sorry, no posts matched your criteria.’ on my screen. Today, there are literally billions of smartcards on the market and a large portion of them are javacards! Reason enough to add a javacard blog to this site, starting with a quick introduction into smartcards.

A smart card is nothing more than a chip (the ’smart’ portion) on a piece of plastic (the ‘card’ portion). Usually it doesn’t have a power supply, keyboard, mouse or display attached to it. To communicate with the outside world, it is placed in or nearby a ‘card acceptance device’ (CAD) that is connected to a computer. This setup creates all kinds of business opportunities like: identification and physical access (event- and travel ticketing), financial transactions, discount card, membership card, pre-paid cards, etc.

Enter java card. Java card technology enables programmers to write software for smart cards in the java programming language. The javacard programming environment, - virtual machine and - runtime environment can be looked upon as the light versions of their big brothers. Among other things, javacard technology doesn’t support garbage collection, threads, ints, longs, doubles, floats, strings and multi-dimensional arrays. Yikes! Programming javacard applications (applets) made me count my blessings. The normal, well-known java programming environment is really quite fancy! A simple task like subtracting € 3.25 in a javacard e-wallet applet already forces you to juggle with a couple of shorts. No floats or doubles, remember!

javacard application architecture 
Figure 1 - javacard application architecture

However, expressing yourself in a much more primitive environment isn’t so bad at all. It’s amazing how fast you can get used to an environment that lacks the common tools. For example: the java card communicates with a CAD using a byte oriented protocol. The CAD sends a command APDU (Application Protocol Data Unit) to the card and the card sends a response APDU in return. Figure 1 provides the reader with an overview of the components of a typical javacard application. So instead of calling a simple method like ’subtract(3.25)’, you could be sending the lovely APDU byte array ‘80 01 AE 0D 04 00 03 19 05′. When I was demonstrating an applet to a colleague I heard myself saying: ‘You see: the card returns 03 FF 4C 00 19 90 00; it works!’. Of course he thought I had taken leave of my senses, but the point I’m trying to make is that ‘the human mind’ gets used to these circumstances pretty quickly. Maybe a debug file would be nicer, but when necessary, ‘03 FF 4C 00 19 90 00′ will do.

Taken together, programming with handicaps isn’t so bad. And because there’s such a huge market out there, the next time you feel like surfing the web, I suggest you skip youtube and take a look at some nice introductions into smartcards and javacards. Programming with more tools isn’t always necessarily better, and programming with less tools can be a nice challenge. Remember Maslows quote ‘When all you’ve got is a hammer, every problem starts looking like a nail’. It sure does!

— By Maarten Metz   Comments (3)   PermaLink
NLJUG gives away free Spring courses
Monday 26 February 2007 @ 1:53 pm
Filed under:

On my new job all Java consultants have a NLJUG membership. So when I joined the party I was given a NLJUG membership too. The name did ring a bell but a very faint one, so I decided to check out their website. NLJUG is a Dutch community of java developers. The first thing that caught my eye on their website was a Spring course given by or at least sponsored by NLJUG. The Spring framework caught my attention some time ago, but I never got around getting familiar with it. I decided that it was time to get acquainted with the Spring framework. This was a great opportunity and one other advantage of the course was that is free of charge.  

There are a few things they would like to know about every possible participant, like how many years of Java experience you have and how much time you have for exercises. After I send them an email telling them I had lots and lots of time and that I was really interested in learning Spring I had to wait and see if the would take the bait. After two week I got an email from NLJUD in which they congratulated me with my enrollment in the Spring course. I was told that I was very lucky with my enrollment, because there was a lot of response for this course. I think the exaggerated a bit but the important thing was I could participate and I was looking forward to it.
The course was given by two experienced Spring developers who would lead us into the world of Spring. Our teachers had there work cut out for them. The entire course consists of four study sessions followed by a session in which we would get our certificate, something like a graduation day. Every study session would treat one specific subject.

  • Day one:    Power to the POJO.
  • Day two:    Spring for the Web.
  • Day three: Connecting your database.
  • Day four:   Remoting.

Every study session has three or four exercises attached to it. Because there the study sessions are two weeks apart there’s enough time to finish the exercises and send them in for evaluating.
There is a website for everybody who participates in the course. Here you can download the sheets shown on the study sessions, view the exercises and afterwards view the solutions. There is even a page where you can view your progress and that of everybody else. It shows your score for every solution you have provided and a big red cross for every exercise you failed or forgot to turn in. Some exercises are not mandatory and it turns out hardly anybody provides solutions for them. I don’t know if it is just a lack of time but at the end only three of us have provided solutions for almost all exercises.  

According to the teachers the first exercises should take about eight hours. Maybe it’s my inexperience with a XML configurable frameworks but it took me a bit more. After a little fight with Tomcat and Eclipse I’m ready to go. The first exercise is about configuring and wiring Spring beans. It turns out the sheets shown during the first day do not contain enough information to make the exercises. Luckily someone advised me to buy “Java Development with the Spring Framework” and after reading the first chapters the exercises were a piece of cake.  

This course of action seems to work very well for me. In the two weeks in-between courses I read the chapters that are covering the subjects of the next study session. It makes the study sessions easy to follow and it gives me the opportunity to ask questions about parts I did completely understand. Another advantage is that the exercises are not as abstract as they were the first time. It still takes quite some time to make all the exercises, but after the first exercise of the week is complete, the other exercises are more or less easy going.  

The final session was a more of a meeting. Most participants took the time to come together in Hilversum to conclude the Spring course. We discussed the last exercises for a short time and then it was time for drinks and snacks. The rest of the time was spent on talk about our experiences in general and with the course we just finished. Most people we quite satisfied with the sessions that were provided. After we thanked them for there time and effort it was time to go home, with a certificate telling us we know something bout Spring.  

Looking back at the Spring course I think it was worth my time. The exercises gave me insight in how to use Spring. The study sessions were a bit too long for my taste, especially because they were three hour evening sessions in Utrecht. If you planned to participate in the next course somewhere in spring 2007, you should ask yourself if you are willing to spend some time making exercises. If not I suggest you get yourself a good book, cause the study session alone are probably not worth your time.  

— By Jan Peter Ruiter   Comments (0)   PermaLink
Next Page »

Menu


Blog Categories

Browse by Date
July 2007
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031EC

Upcoming Events

Monthly Archives

Recent Comments

Links


XML Feeds Option


Get Firefox  Powered by WordPress

code validations
Valid RSS 2.0  Valid Atom 0.3
Valid W3C XHTML 1.0  Valid W3C CSS