Posts filed under ‘Proyectos Mascota’

JSON Fan

Por experiencias recientes, me declaro fan de JSON. He aquí un pequeño resumen de sus cualidades:

  • JSON significa JavaScript Object Notation.
  • Es una notación amigable para humanos y para computadoras.
  • Representa estructuras de datos y arreglos asociativos.
  • Existen XSLTs para convertir JSON de/hacia XML.
  • Es posible generar un objeto JavaScript a partir de una cadena JSON simplemente evaluandolo, aunque se recomienda «parsearlo«.
  • Ejemplo de una cadena JSON:

Fuentes:

octubre 30, 2007 at 1:14 pm Deja un comentario

First release of my Google Maps App

As wordpress.com don’t let me insert any javascript or iframes here, this is an screenshot of my first release of my first Google Map App:

GoogleMaps screenshot

Here is how it works:

  • The polygon data is loaded using Dojo’s xhrPost.
  • The data is prepared on a C# WebService and formatted using JSON. The WebService serves only the polygons of the Google Map view port (using bounds.getNortEast and bounds.getSouthWest) .. and it’s not sending any data which is already sent to help a little the performance. To achive this, I used a table that «remembers» all the data already sent for a given session.
  • For every polygon received, a GMap Polygon objected is created (new GPolygon). As I am using the 2.x API version, I am attaching the «onclick» event to trigger a function to show the extended information:
     GEvent.addListener(polygon, "click", function(point) { } );
  • This triggered event calls another xhrPost for the polygon ID and retrieves another JSON string with the polygon details. This is formatted inside JavaScript and shown using openInfoWindowTabsHtml.

I have invested about 40 hours so far in this pet project. This is a «freelance» job for my ex employer.

I will add some functinalities and comment them here soon. 🙂

Thanks to the guys at Dojo for their excellent AJAX toolkit.

octubre 16, 2007 at 5:26 pm Deja un comentario

Google Maps + Dojo toolkit + .NET WebServices

Es de lo que se trata mi proyecto «mascota». Estoy usando el API de Google Maps para mostrar mapas, .NET Web Services del lado del servidor y todo unido con el kit de Ajax Dojo. 🙂 Extraña combinación, ¿verdad?

Este proyecto nació por que estoy aburrido de mi actual trabajo. (¿No tienes alguno mejor?) Y este proyectito salió por fuera.. así que una lana extra no cae nada mal!

Poco a poco subiré ejemplos y cosas interesantes de lo que me encontrado.

septiembre 25, 2007 at 4:23 pm Deja un comentario


Feeds