JavaOne starts next Monday

If nothing goes wrong I’ll be next week in San Francisco "attending" JavaOne. "Attending" means I’ll just go to the RedMonk Unconference on Monday CommunityOne and networking at the evening parties (as usual)

I’ll drive from LA to SF on Friday or Saturday and back the next weekend, hopefully doing some sightseeing, anyone around for a drink during the weekend ?

Q for Eclipse 0.6.0 released

A new release of Q4E is out, 0.6.0, with WTP support and the ability to do a exclude all/force version from the dependency analysis UI. I particularly like the exclude all because if you had to do it by hand you would go to each dependency and add the exclusions. This way you select the dependency you don’t want and Q4E will add all necessary exclusions for you.

At last, the long awaited WTP support
is present on a public release. Enhanced support for resource
processing and fine-grained control of the incremental builds is also
supported, along with dependency management features available right
from your favorite dependency analysis view.

What’s new

  • Welcome Mike Poindexter as a new q4e committer.
  • Web Tools Platform (WTP) support, see the demo video
  • Ability to choose which goals get executed during the incremental build.
  • Profile view displays the available and enabled profiles.
  • Files generated by maven are marked derived in eclipse.
  • Dependency management functions (Force Version and Exclude All) available from the dependency analysis view.

Installation instructions.

 

Pictures from EclipseCON

For those considering goign to next EclipseCON, this is the kind of people you’ll find there 😉

EclipseCON 2008

EclipseCON 2008

EclipseCON 2008

would you buy anything from this guy?

EclipseCON 2008

McLovin from SuperBad (or not)

EclipseCON 2008

Fertilizacion cruzada

EclipseCON 2008

Love is in the air

EclipseCON 2008

Everybody wants a picture with Lynn

EclipseCON 2008

Spanish table

Slides from EclipseCON

You can get now my talk slides from the official EclipseCON page for Q4E, Maven integration for Eclipse and Maven, Eclipse and OSGi working together. Here are the direct links:

Update: fixed links

Q4E has WTP support, from today!

Abel has been rushing to get WTP support working just in time for my talk at EclipseCON. Nice job!

Check the screencast. You will need the development verson of Q4E 0.6.0 until it is released (using the update site at http://q4e.googlecode.com/svn/trunk/updatesite-dev/)

The talk went well, not much to do it 10 min though. Will be posting the slides soon.

Letters from EclipseCON

Yesterday’s Maven, Eclipse and OSGi working together tutorial went fairly well, I thought I would have plenty of time but had to rush through the end. The room (small one) was packed, with aournd 50 people, and the feedback collected by the Eclipse Foundation was 17 positive, 0 negative, so not bad, considering that the tutorial was pretty hardcore stuff and some people were definitely not expecting it (next time I need to make that more clear). I’ll post the material online soon.

Tomorrow I’ll be giving a short talk about Q4E, more user oriented, at 16:50, room 209/210.

Monday ended with the usual suspects (and recently joined ones) like Lynn Gayowski (Eclipse Foundation) and Adrian Mos (Inria), having some beers (free of course), and deciding to make a t-shirt for foreigners (US foreigners) with sentences like "Smart people thinks in Celsius" or "Smart people use colored bank notes" 😀

Seems that today is going to end the same way as yesterday, having some beers during the receptions. Come around and say hi 😉

Update: fixed links

See you Monday at EclipseCON

Monday 8:00 Maven, Eclipse and OSGi working together tutorial

Wednesday 16:50 Q4E, Maven integration for Eclipse short talk

Show up or find me at the bar 😉

Q for Eclipse 0.5.0 released

A new release of Q4E is out, 0.5.0. Thanks to all the people involved for making such a quick turn around and keep a constant release cycle.

Besides many bug fixes and small improvements, the main changes are:

  • Ability to import pom projects
  • Maven execution can now be canceled.
  • New dependency analysis view! It is now possible to
    display the project dependencies and analyze them to assess where the
    actual dependencies and versions come from.
  • Improved handling of resources:
    • If filtering is configured for resources, it is honored.
    • Inclusion/Exclusion patterns for resources are honored. Now
      it is possible to share a folder for java sources and resources.
    • Note that resources are no longer added to the build path as source folders.
  • The dependency graph is no longer a pop up window. It has its own Eclipse view.
  • Allow maven goals to use artifacts in the workspace when launched
    from q4e, even if they are not installed on the repository

An example of the new Dependency analysis view

AJAX with Yahoo UI components and DWR

I’ve been playing lately with YUI, the Yahoo User Interface library. So far I’ve used the autocomplete and treeview components, and I have to say they are quite easy to use and very complete. I had used Script.aculo.us autocomplete before, but YUI autocomplete has a lot of configuraiton options and all of them really well documented, like caching or being able to easily use it as a normal dropdown when the user just clicks on the field without typing anything. Event handling is also pretty easy.

DWR in the other side is a really easy way to expose your service interfaces through javascript. It is included in Appfuse if you want to see examples.

This is an example configuration that uses Spring to get the myService bean and exposes its getEmployeesByPartialName method. You can also use DWR with Spring namespaces from Spring version 2


<dwr>
  <allow>
    <create creator="spring" javascript="MyService">
      <param name="class" value="com.acme.MyService" />
      <param name="beanName" value="myService" />
      <include method="getEmployeesByPartialName"/>
      <convert converter="bean" match="com.acme.Employee"/>
    </create>
  </allow>
</dwr>

Cool, isn’t it? now prepare to be scared. If you expose a method in your service through javascript users can do all kinds of nasty things. If the user needs to be logged in, not too bad, but still you will most likely need some security framework that can secure java objects and not just http request. Spring Security AKA Acegi can do that using the AOP MethodInvocation interceptor, you just need to configure what permissions needs each method.

A tricky part was integrating YUI with DWR, at least for me that haven’t done much javascript in my life. Here you can see how the html looks like for a employees dropdown that lists the ones that match what you type in the input box, querying the service for the values. The values received can be any object, not just strings, in populateArray you can see how the values to display and the ids are stored for later retrieval.

<input type="text" id="employeeList" />
<div id="employeeListAutocomplete" class="autocomplete"></div>
<script type="text/javascript">
     <!-- populate suggestions array -->  
     function populateArray(dataFromServer, dataFromBrowser){
      for (var i = 0; i < dataFromServer.length; i++) {
       <!-- each employee object has a firstName and lastName property -->
       dataFromBrowser.push([dataFromServer[i].firstName + ' ' + dataFromServer[i].lastName, dataFromServer[i].partyId]);
      }  
     }  
       
     <!-- call dwr remote method and returns suggestions --> 
     function getEmployees(sQuery){
      var aResults = [];
      var callbackProxy = function(results){
          populateArray(results, aResults); 
      }; 

      <!-- disable async req ! --> 
      var callMetaData = { callback:callbackProxy, async:false}; 
      <!-- Call remote method --> 
      MyService.getEmployeesByPartialName(sQuery, callMetaData); 

      return aResults; 
     }

    var managerAutoComp;

    YAHOO.example.ACJSFunction = new function(){
        <!-- Instantiate JS Function DataSource -->
        this.employeesDS = new YAHOO.widget.DS_JSFunction(getEmployees);
        this.employeesDS.maxCacheEntries = 50;
   
        <!-- Instantiate Employee AutoComplete -->
        this.employeeAutoComp = new YAHOO.widget.AutoComplete('employeeList','employeeListAutocomplete', this.employeesDS);
        this.employeeAutoComp.minQueryLength = 0;
        this.employeeAutoComp.maxResultsDisplayed = 50;
        this.employeeAutoComp.prehighlightClassName = "yui-ac-prehighlight";
        this.employeeAutoComp.useShadow = true;

        <!-- autocomplete on employee field focus without typing anything -->
        this.employeeAutoComp.textboxFocusEvent.subscribe(function(){
            var sInputValue = YAHOO.util.Dom.get('employeeList').value;
            if(sInputValue.length === 0) {
                var oSelf = this;
                setTimeout(function(){oSelf.sendQuery("");},0);
            }
        });

        <!-- handler for employee selections -->
        this.employeeAutoComp.itemSelectEvent.subscribe(function(sType, aArgs){
            var aData = aArgs[2]; <!-- array of the data for the item as returned by the DataSource [value,id] -->
            var selectedId = aData[1];
            alert('you have selected id: ' + selectedId);
        });

        <!-- Preload content in the container
        this.employeeAutoComp.sendQuery("");
        -->
    };
</script> 

Happy AJAX coding!

Update: fixed the code listing, I hate Roller!

Maven at EclipseCON

I’ll be next March 17th-20th at EclipseCON in Santa Clara, California, giving two talks. if you are going to be attending and you want some specific topic to be covered please leave a comment and I’ll try to make your time worthwhile.

Q4E, Maven integration for Eclipse short talk

"Q for Eclipse" (Q4E) is a new Open Source project that integrates
Apache Maven and the Eclipse IDE for faster, more agile, and more
productive development.
The plugin allows you to run Maven from the IDE, import existing Maven
projects without intermediate steps, create new projects using Maven
archetypes, synchronize dependency management, search artifact
repositories for dependencies that are automatically downloaded, view a
graph of dependencies and more!
If you are a Maven and Eclipse user join us to discover how to take
advantage of all these features, as well as how they can help you to
improve your development process. 

Maven, Eclipse and OSGi working together tutorial

With the growing popularity of Apache Maven, Eclipse, and OSGi, the
most frequently-asked questions are: "Can they work together?" and, "Do
they fight for the same space?"
This tutorial will cover the strengths and weaknesses of each, explains
where they overlap, and how they complement each other so you can get
maximum productivity. It pays special attention to the build process,
dependency management, collaboration, repository management, and
available tools, as well as the future direction of the technologies.
The solutions proposed will be based on the work done in the Apache
Maven and Apache Felix projects, along with several Eclipse Foundation
projects like Eclipse PDE
and Eclipse Buckminster.