Teotihuacan, Mexico

Pictures from the Teotihuacan pyramids close to Mexico City. Really impressive.

Teotihuac�n was, at its height in the first half of the 1st millennium CE, the largest pre-Columbian city in the Americas. The city during its existence was larger than any European city of the same era including Rome.
Teotihuacan, Mexico City

Teotihuacan, Mexico City
Teotihuacan, Mexico City
Teotihuacan, Mexico City

Teotihuacan panorama, Mexico City
Teotihuacan panorama, Mexico City
Teotihuacan panorama, Mexico City

Teotihuacan, Mexico City

Restaurante La Gruta, Teotihuacan, Mexico City

Mexico City

Museo Arqueologico, Mexico City

Museo Arqueologico, Mexico City

Palacio de Bellas Artes, Mexico City

Mexico City

Mexico City

Mexico City

Mexico City

Casa Frida Kahlo, Coyoacan, Mexico City

Coyoacan, Mexico City

Mexico City

Coyoacan, Mexico City

Coyoacan, Mexico City

Limpiabotas, Coyoacan, Mexico City

Coyoacan, Mexico City

Coyoacan, Mexico City

UNAM, Mexico City

Mexico City panorama

Mexico City

Basilica, Mexico City

Basilica, Mexico City

Basilica, Mexico City

Basilica panorama, Mexico City

Basilica, Mexico City

Chapultepec Panorama, Mexico DF

Palacio de Chapultepec, Mexico DF

El Zocalo en Navidades, Mexico DF

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

Travel: Santa Monica sunset, Dia de los Muertos in Los Angeles

Some pictures from last year Dia de los muertos (Day of the dead) and sunset from Santa Monica during the California fires last October.

Santa Monica sunset during California fires last October

Santa Monica sunset

Santa Monica sunset

Dia de los muertos (Day of the dead) in Los Angeles

Dia de Los Muertos

Flamenco dancer corpse

La Katrina

Katrina with baby
Paying attention

Dia de Los Muertos

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!