Wednesday Aug 12, 2009

Good bye old blog

This will be a very short entry: I am moving my blog to a different site. You'll find some of my reasons in my first blog entry there.

Wednesday Jun 24, 2009

Jazoon 2009 - Day 2

My today's schedule was little bit more relaxed than yesterday. It started with a great keynote delivered by Danny Coward which evolved around new and noteworthy things we can expect in the coming JDK 7 and recently released JavaFX 1.2.

Maybe it's just me, but I allways eagrly await what's new in the upcoming JDK release. The things that I use to like most may sometimes seem subtle (such as new short syntax of a for loop introduced in JavaSE 5), but at the end of the day those are the things that really make my coding much more comfortable and my code shorter and thus easier to read.  So I guess my favorite features for the JDK 7 evolve around Project Coin, where "coin" stands here for a synonym of "small" or "subtle", and such are the changes in the Java language this project introduces. To mention few:

Using Strings in case statements

With JDK 7 you are (finally) able to use Strings in case statements directly:

    String color = "red"
    switch (color) {
        case "red" :
            // do red stuff
            break;
        case "green" :
            // do green stuff
            break;
        case "blue" :
            // do blue stuff
            break;
        default:
            // do default stuff
            break;
    }
  

Improved type inference

If you ever tried to really leverage generics in your code you soon ran into initializations like the one bellow:

    Map<String, List<ItemClassWithSomeLargeName>> mapOfItems = new HashMap<String, List<ItemClassWithSomeLargeName>>();

I always wondered why it is required to repeat the type information <String, List<ItemClassWithSomeLargeName>> in the constructor invocation. I was not alone aparently. Josh Bloch even suggested a possible elegant solution leveraging a factory method pattern.

Finally with JDK 7, the above code is a history, as JDK 7 lets us do the following:

    Map<String, List<ItemClassWithSomeLargeName>> mapOfItems = new HashMap<>();

The 'Elvis' operator

Are you tired of biolerplate code related to null checks such as the next one?

    public synchronized void countPageHit(String pageName) {
        Integer countVal = hitCounts.get(pageName);
        if (countVal == null) {
            hitCounts.put(pageName, 0);
        } else {
            hitCounts.put(pageName, ++countVal);
        }
    }
  

Well, call Elvis for help and he'll let you do this instead:

    public synchronized void countPageHit(String pageName) {
        Integer countVal = hitCounts.get(pageName) ?: 0; // if there are no hit counts stored in the map, use 0 as a current count value
        hitCounts.put(pageName, ++countVal);
    }
  

Of course, there are other notable changes coming with JDK 7, such as modules to solve current visibility vs. accessibility issues, more work on letting dynamic languages to run as efficiently as possible in the VM, new and extended I/O APIs (new filesystem API, file notifications, directory operations, asynchronous I/O) and new "Garbage First" Collector very suitable for a wide variety of applications, to name a few.

As for the JavaFX 1.2, this latest release brings support of more platforms (\* = new):

  • Desktop platforms (Windows, MacOS, Linux\* (beta), OpenSolaris\* (beta))
  • TV (a television from LG\*)
  • Mobile Phones (Apart from the existing developer emulator, there are commercially available developer phones with JavaFX runtime burned into them coming: HTC Diamond\*, LG, Sony Ericsson\*)

The new JavaFX 1.2 SDK also brings additional, fully skinnable (via CSS) UI components, full-screen mode, improved data handling (RSS, Atom support, ...) and greatly improved performance  - around 40%up for desktop, 20% up for mobile, code size 30% down in an average JavaFX application. The performace improvement is really signinficant - a favorite Bubblemark benchmark test delivered these results on the stage:

  • Microsoft Silverlight - ~90fps
  • Adobe Flex - 58fps
  • JavaFX 1.2 - 124fps

And this is just astonishing: JavaFX is 1.37 times faster than Silverlight and 2.13 times faster than Adobe Flex! I am pretty sure that with the new set of tools for designers, new APIs and components it will be driving even more attention of RIA as well as desktop application developers.

Now, I did spend lots of time and space writing about a single session, but for me as a Java developer it was simply the most interesting talk of the day. Still, I need to add that I attended several other great and interesting sessions today: a talk on OSGi and Java Modularity by Peter Kriens and Harold Carr's talk on Metro Web Services Security Usage Scenarios are the two talks definitely worth mentioning.

Now that the official part of today's conference program is over, I am looking forward to hanging around, talking to people as well as having some beers at tonight's Jazoon party.

Cheers!

Tuesday Jun 23, 2009

Jazoon 2009 - Day 1

I went to sleep really late last night so I had some troubles getting up today. And thus I missed the 15-minute opening session by Christian Frey. I arrived just in time for the James Gosling's keynote. James's keynote was really packed with information. He talked about lots of stuff what Sun is doing in the software and mainly Java field, including GlassFish v3 and its profiles, latest release of NetBeans, project Kenai - Sun's full-featured project and source repository that will soon reach its first final release. He also talked about Real-time Java, Java for cellphones, mentioned coming JavaSE 7 release and touched briefly JavaFX platform. Looking back, I really wonder how he was able to cram so many topics into a 60-minutes presentation. Actualy, if you want more details on the James's keynote, please, take a look at my notes.

 After the two keynotes a series of technical sessions have started. Obviously, I could not attend all of them (I am really very bad in being in two places at the same time by design), so the next lines give a short look at those that I attended.

 The first technical session was done by Kirk Pepperdine from Kodewerk Ltd. on Concurrency and Performance in Java. The main premise an motivation for the presentation was - the Moore's law. A common mistake people often do is they confuse speed with frequency and put this law into connection with a CPU frequency, but in fact it is number of transistors in the CPU that is supposed to double once every 18 months. Latest evolution in the CPU field confirms that. What may be less obvious, at present, Moore's law basically suggests that currently we can expect new processors with doubling number of cores approximately every 18 months, which inherently poses questions on how to effectively leverage such parallelism and brings us eventually to concurrency issues. After a short intro into the problem area,  Kirk introduced some of the new concurrency-efficient data structures he has been working on for some time. I have to say that I got little bit lost several times during the talk as I was missing some more context that would connect the slides and pieces of Kirk's talk together. Nevertheless, I left the room with an impression that Kirk's data structures may become pretty useful soon. And even though Java already provides a very useful library of concurrency-efficient classes developed by Doug Lea, it's still a pitty that Kirk's structures didn't make it into JDK (yet). Hopefully we'll see them in JDK in some later release.

Last morning session by Neal Ford of ThoughtWorks, Inc. on "Design Patterns" in Dynamic Languages was really refressing. I am not an active user of dynamic languages such as Groovy or Ruby yet, but after the initial denial phase I am getting more and more excited about them, especially Groovy. In his talk Neal touched several standar patterns know from the "Gang of Four" book (iterator, command, strategy, template, interpreter, decorator and adapter) as well as introduced two patterns specific to dynamic languages, namely "null object" and "arridifier" patterns. Probably the two main messages of the talk were that modern dynamic languages can significantly reduce the amount of the bioler-plate code a deveoper needs to write. That makes the code both faster to write and easier to read and understand. The second main thought is that it does not make sense to use standard design patterns in the GoF book as recipes that have to be followed precisely. This of course applies to statically typed languages as well, but is greatly emphasized when one starts using a dynamic language. Also, all aforementioned standard patterns can be adjusted to fit a dynamic language in a way that their implementation requires less code and feels more natural in the dynamic language environment.

In the first afternoon session Ognen Ivanovski from Netcetera presented his 1-year experiences with development of iPhone applications from a perspective of a Java developer. Overall nice intorductory session. I had very similar feelings (a mix of frustration, confusion, joy and amazement) when I first put my hands on Objective C and Apple's iPhone SDK. Ognen's comparison of  Eclipse (evidently his beloved IDE) to xCode (Apple's IDE) and NetBeans (well, my preferred Java IDE) really startled me though. In the comparison, Eclipse came out to be far superior to both xCode and NetBeans. The problem is that Ognen's arguments used in favor of Eclipse over NetBeans are not valid for several years now. I don't want to go into argument which of these IDEs is really better. I guess the lesson to learn here is just that if you actually don't know enough about something (or haven't seen/used it in the last couple of years), don't try to compare it... :)

The next session I attended was about build and collaboration tools, presented by Jason van Zyl. This talk evolved around Maven, OSGi repositories and tools folks in Sonatype develop around them. Interesting thing was that, among other things, they are developing also plugins for Hudson because they would like to see Hudson to become a standard open-source tool for build & release process and development collaboration.

One more interesting talk I saw today was from SAP guys on exposing devices and sensors in a RESTful way. As part of the presentationt they were demonstrating SunSPOTs with an embeded web server that was capable of handling REST request and producing json responses. The SunSPOTs were accessible via something they called "Smart (or was it Intelligent?) gateway", which was essentially just an HTTP proxy. With this RESTful API it was possible to browse all registered SunSPOTs and retrieve all the data about each particular SunSPOT's status using HTTP GET. Also it was possible to control the devices and do things like lighting the LEDs, changing colors etc. Thinking about it, it would be a nice project to try to embed Jersey into a SunSPOT and do something similar.

Last two talks (1, 2) of the day were without a question the cherry on the top of the cake. Very, VERY interesting and entertaining at the same time. Because of their topics it does not have any sense to try to condense them into few sentences. But I am sure that everybody who stayed there to see them would agree that they were more than worth it. ...btw. did you know that there are armed military robots deployed on the North-South Korean borders that are supposed to shoot people without a valid RFID on sight?

Monday Jun 22, 2009

GlassFish Day in Zurich, Switzerland

Today I presented project Metro at GlassFish Day event which took place in Zurich, Switzerland as part of the larger Jazoon 2009 conference. From what I can say the event was very successful. We had great speakers and I think that the whole event was very well attended and received.

Alexis did a great introduction by providing insight into where we are with GlassFish at present as well as where are we heading. In the second session he showcased clustering with GlassFish and the GlassFish Enterprise Manager - a really nice and useful tool that lets GlassFish administrators monitor various aspects of GlassFish instances and presents the collected data in a very comprehensible graphical ways - an ideal tool for all customers who "have more money than time".

The third morning session was dedicated to Roberto and his preview of the new features in the upcoming JavaEE 6 release. I think the guys in the JSR expert group did a really good job in making the enterprise java developer's life MUCH easier. The coming APIs seem to be very flexible and easy to use and learn. From what I can tell, this isn't "yet another update", this is probably the first JavaEE release where I have a good feeling about its completeness, flexibility and maturity. Great thing also is that this JavaEE release not only adds new stuff but it also recognizes obsolete technologies, which will be pruned and eventually removed from the specification. Among technologies currently on the prune list are JAX-RPC (hurray!), Entity EJBs (is there anyone brave enough still using them anyway?) and few others. These technologies either never really caught up or have already been practically replaced by their modern counterparts anyway. As for the features which I am particularly interested in and happy about are dependency injection specified by JSR 299 (Web Beans) and Servlet 3.0. Also I am very glad that JAX-RS - Java API for RESTful Web Services (JSR 311) made its way into JavaEE 6 as well.

The last session before lunch was my Metro talk. I provided a short overview of Metro, its features and architecture and dedicated most of the session to practical demonstrations including development of simple SOAP web service and client as well as few other demos showcasing advanced Metro features, such as message-level security, reliable messaging and streaming large data over SOAP web services.

After the lunch Alexis did his "GlassFish Survival Guide" talk focusing on installation, profiles, most useful administration commands as well as other useful tips which are good to know when starting with GlassFish. Those are the tips which can help you to avoid something I call unnecessary "aha!" moments and which can save you a lot of time.

In the next session, Jerome went through the new and noteworthy stuff coming in the planned GlassFish v3 release. This release, which is planned for September this year, is getting closer and closer and truly brings the next-generation GlassFish AS. The new application server - or "application container" would be probably more accurate - will be OSGi-fied, highly modular and extensible and will bring support for additional languages and frameworks, such as Ruby on Rails or Groovy. Those of you, who are interested in trying it out right now, you can download the latest GlassFish v3 Preview release - a really fancy name for a beta release, isn't it :-).

After the interesting talk on the tooling support for JavaEE 6 features presented by Ludo and Roman came the last talk of the day - the one that I was eagerly awaiting - the talk on JSF 2.0 presented by Ed Burns. If there was ever an API that needed a major update it would definitely be JSF - this is not my sentence, I read it in some materials to the talk, but I absolutely agree :) And once again I was very pleasantly surprised by the new prospects that lie ahead of us in the space of this UI framework. The new single-file component definition which resembles Objective C object definition or revamped and standardized Ajax support are only few notable changes to mention.

It was a great session to end with the day full of new information. Overall today's GlassFish Day was a realy great kick-off for the Jazoon 2009 Conference that starts officially tomorrow. Looking forward to it - stay tuned for more details!

Tuesday Dec 09, 2008

My first blog entry written in OpenOffice v3

This is a test blog entry with a picture. I wrote this blog entry to see how easy/dificult it is to write blogs using OpenOffice v3. One of the things that keeps me from blogging more often is the amount of work associated with every attempt to include pictures in my blog entries. So let's have a look whether the Sun Weblog Publisher plug-in for OpenOffice v3 that I have just installed would make the task of writing and publishing blogs any easier for me.[Read More]

Wednesday Mar 26, 2008

Interoperability Plugfest in Redmond

I have spent the last week in the rainy Seattle area together with Harold, Jiandong and Rama. We've attended a WS Interoperability Plugfest event organized by Microsoft and focused on testing interoperability of WS stack implementations from different vendors. This time we focused on testing our Metro implementations of standard versions of WS-\* specifications as well as validating backwards compatibility with their older counterparts.[Read More]

Monday Jan 14, 2008

The new Policy project on java.net

Last week Fabian was busy putting togehter web pages and content of the new Policy project on java.net. Now the work is almost finished.[Read More]

Friday Sep 14, 2007

Using file templates in NetBeans 6.0: Customizing author in generated files

Whenever you ask NetBeans to create a new file (such as Java class or interface or an XML file) for you, it internally uses respective file template to generate the file content for you. This is particularly useful as it relieves you from a need to write boilerplate text, that may in case of Java files include things like package name, class definition, basic documentation (including author name) or a license text.[Read More]

Friday Jun 01, 2007

WS-Policy the main force behind WSIT

These days we are focusing on fine-tuning quality of WSIT 1.0 that will be released soon. If you want do play with it, feel free to download the latest build. As there are no open issues in policy engine, I found some time to create a screencast (actually this is my first screencast ever!) about the WS-Policy and how it is used in WSIT. Enjoy!

Technorati: , , , , , ,

Thursday Apr 19, 2007

Got a question about WSIT? Ask the experts!

Hi there! It has been some time since my last entry on this blog. In my blog entries I usually describe topics I want to. Now I would like to let you know, that if you have a question about WSIT that you would like to ask, please send it to us during the week of April 30 at the next Ask the experts session dedicated to WSIT and project Tango. Your questions will be answered by Harold Carr, Arun Gupta and me.

Technorati: , , , , , ,

Friday Feb 23, 2007

What Is Web Services Policy And How Does It Work? [Part 2]

In my last blog entry about WSIT project, I tried to explain WHAT policy means in context of web services. In this follow-up I will try to bring more light to the question HOW does it all work.[Read More]

Thursday Feb 22, 2007

What Is Web Services Policy And How Does It Work? [Part 1]

WSIT project Milestone 3 was just released. And that is a great opportunity for me to try to share some thoughts that should help you to find the answer to the question from the title of this blog. Lets apply a divide and conquer strategy so that we can address the two topics the question contains separately. In this blog we would find out what the term web service policy actually means.[Read More]

Wednesday Jun 07, 2006

XSD vs. RelaxNG - what do YOU think?

Today I had a longer discussion on solving one problem that involved applying some XML schema/type definition technology. We ended discussing two possibilities - XSD and RelaxNG. I was a proponent of XSD just because I believe it is more accepted by a developer community and - of course - because I am much more familiar with it :)

However I am pretty interested if I am right - if the XSD is really more known and accepted by a developer comunity compared to RelaxNG. So I would like to hear your opinion on that subject. The comments section bellow is ready for you...

Thursday May 18, 2006

A role of WS-Policy in WSIT

In my last blog I discussed the rise of a new era in SOA development with the use of Java Web Services technology powered by the implementation of WS-\* specifications. Today, I would like to write few lines about policy metadata - the real core of these new technologies.

Policy language and its usage is described in two separate specifications (which have already been submitted for standardization by W3 Consortium):

These two specifications bind all other WS-\* specifications together into one complex solution.

The main goal of the WS-Policy specification is to introduce a flexible and extensible way of expressing and understanding the capabilities, requirements and general web service properties. In other words, WS-Policy provides a web services policy language together with domain-neutral rules as to how to process and interpret these policies. To complement the WS-Policy specification - which is strictly focused on defining policy language - WS-PolicyAttachment completes the whole picture by defining the means of attaching actual policy expresions to policy subjects to which these expressions apply. This second specification also describes the way how to use policies in the context of web services description mechanisms – WSDL and UDDI.

WSIT introduces its own policy engine and I am a part of a team working on its design and implementation. We do our best to make sure the implementation is interoperable and - of course - fully compliant with WS-Policy and WS-PolicyAttachment specifications. Currently, we are still in a development phase and there's much to be tested and polished yet. But we have already achieved success in supporting all main use case scenarios as well as having demonstrated our ability to interoperate with policy engines from other vendors at several Interoperability workshops.

...and if you want to know even more about policy, don't forget to check the blogs of Jakub and Fabian - my project Tango team-mates.

Technorati: , , , , , ,

Introducing Web Services Interoperability Technology (WSIT)

I recently joined Sun Microsystems, Inc. to work in the exciting field of Java Web Services technologies. Thus it is not surprising that I am going to touch on this technology here.

As many of you probably know, web services play an integral part in SOA driven design and development nowadays. This technology emphasizes interoperability and platform independence, which makes it a very important part of most enterprise integration solutions today.

However until recently - in order to set up and deploy a web service and successfully configure its client(s) - lots of duplicated manual administration was required on both sides when configuring all those "extra" features, such as atomic transactions, secured communication, reliable messaging etc. Another issue one had to consider with such advanced web service communication channel configuration was a possible loss of interoperability. Many people working in this area could feel this strong need to change it: to automatize configuration of communication channel as much as possible, so that both - client and service - just need to agree on a set of applicable communication policies and express those in a commonly understandable and widely accepted language.

But this is changing right now! A set of WS-\* specifications was introduced to address these issues. Today I am a part of project Tango where we, together with other Sun's Java Web Services engineers involved, are focused on addressing these issues. One of the main goals of this project is to bring to life the new generation of Web Services Interoperability Technology (WSIT) - an open source java implementation of WS-\* specifications that enables all this cool stuff to happen while also ensuring interoperability with other vendors.

So are you interested? If yes, the development version of WSIT is there ready for you to download and play with. And don't forget to try it out together with new 5.5 beta release of NetBeans™ IDE and its WSIT modules.

...and - of course - if possible, you should definitely come and join our Java One sessions, where you can

Java One conference is indeed a great place where you can get lots of new information about our work and of course, about Java.

Technorati: , , , , , ,

About

potociar

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today