Posts

Showing posts from November, 2007

Java To AS3 on AIR

Image
Found this great project that enables me to convert Java code to ActionScript3 code, or at least get me close enough that I can do minor manual tweaks to get code to compile (granted that compiled code does not mean that it runs :-). However, in its current format, it was a laborious process as I can only process one file at the time, and had to copy and paste the generated code from the text area into a file. There must be a better way ! And yes there is a better way using Adobe AIR . AIR enables me to read from and write to the local file system. So, I took the core Converter class and wrapped it with the AIR File api. A user can now select the output folder and upon the selection of the input folder, all the java files will be read, converted and written to the output folder. In addition, you can drag and drop onto the output or input button the output or input folder. Download the AIR file from here . BTW - this is using the latest beta3 version :-)

Granite Data Services

I love Life Cycle Data Services . As a developer, IMHO, I think it is worth its weight in gold. However, I do get customers that want to do remoting with it :-( So...since HTTPService and WebService are first class citizens in Flex, I recommend that they SOAP enable their server side services, or come up with some kind of XML representation and XML over HTTP since XML is a native type in AS3. But the serialization/deserializtion is costly, and it would be great if we can use the flash native binary format (AMF) to transfer objects around. Thus enters Granite . Quoting from the introduction "Granite Data Services (GDS) is a free, open source (LGPL'd), alternative to Adobe® LiveCycle® (Flex™ 2) Data Services for J2EE application servers. It is not, however, a drop-in replacement: you won't be able to simply deploy a Flex 2 Data Services application into a Granite Data Services server without modifications. The main goal of this project is to provide a framework for Flex 2/EJ...

GeoRSS Support

AWX has GeoRSS support. So given for example the following feed (on my local machine I can access it as http://ccccmac/~mansour/geofeed.xml): <?xml version="1.0"?> <rss xmlns:georss="http://www.georss.org/georss" version="2.0">  <channel>   <title>GeoRSS-Simple Example</title>   <description>Example GeoRSS-Simple Feed</description>   <georss:box>38.373576,-122.854022,38.423121,-122.804327</georss:box>   <item>    <title>GeoRSS-Simple Polygon</title>    <description>A polygon describes an arbitrary geographic shape. The    format is a series of ordered latitude, longitude pairs. The last pair    must be the same as the first pair, closing t...

10000 Markers

Been wanting to blog about this for a while. Users been asking me "how to I plot thousands of markers without the overhead of a Marker (which is a subclass of UIComponent) but still get the benefits of Marker mostly for mouse over/out/click events ?". Back in the days when I was RAT (Rent-a-Tech), my friend Leo came up with a concept of TurboLayer for SDE, where you group in one feature all the geometries of a feature class. It was fast, but you could not get to an individual feature because it was all "blob'ed" together (SDE folks out there, you know what I mean :-) So I took the same concept and implemented it in AWX, but with an extra twist where you can get to an individual feature indirectly using an RTree class. An RTree enables you to efficiently index features spatially on the client side. cool, eh ? You can download this zip file that contains an application that loads 1000 random points and when you mouse over a point, a tooltip shows up with the id ...

DefaultProperty metadata

Looking back at the last post, yea... it is nice to MXML, but it is a bit ugly and verbose till I remembered the [DefaultProperty("xxxx")] metadata.   Adjusted my local copy and what you will get is this: <?xml version="1.0" encoding="utf-8"?> <mx:Application   xmlns:mx="http://www.adobe.com/2006/mxml"   xmlns:awx="http://www.arcwebservices.com/v2007/awx"   layout="absolute"   >   <awx:Framework/>   <awx:Map createDefaultLayers="false">     <awx:PolygonLayer>       <awx:Polygon>         <awx:PolygonShape>           <awx:GeoPoint x="45" y="45"/>           <awx:GeoPoint x="45" y="-45"/>           <awx:GeoPoint x="-45" y="0"/>          ...

Creating polygons in MXML

<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:geom="com.esri.aws.awx.geom.*" xmlns:arcwebservices="http://www.arcwebservices.com/2007/awx" > <arcwebservices:Framework/> <arcwebservices:Map> <arcwebservices:basemaps> <arcwebservices:PolygonLayer> <arcwebservices:Polygon> <arcwebservices:shape> <geom:PolygonShape> <geom:geoPoints> <geom:GeoPoint x="45" y="45"/> <geom:GeoPoint x="45" y="-45"/> <geom:GeoPoint x="-45" y="45"/> </geom:geoPoints> </geom:PolygonShape> </arcwebservices:shape> </arcwebservices:Polygon> ...

AWX 4.0 Is Released !

Check out the latest version 4.0 - lots of bug fixes - great documentation.   And if you are wondering what happened to version 3.0, well...it was an internal release.   Have fun :-) Blogged with Flock

IntelliJ 7 Rocks

I've been using IDEA since I do not remember when.   Just got a license to the latest version .  It has great Spring support, and now you can see your web.xml files in this wizard cool panes.  In addition, there is support of AS3, I mean with auto-completion and refactoring. Too cool ! Blogged with Flock

Cairngorm and the Framework

People have been asking me to show them how to use Cairngorm with the AWX Framework that is loosely based on OSGi. The interaction will most likely come in an ICommand implementation or a Delegate.  Here is an example that shows how to use the Find Service. First, make sure that you have registered with the Framework the FindActivator. <Framework apiKey="[your-api-key]">   <FindActivator/> </Framework> Next, since a Command is always created and executed by the CairngormEventDispatcher,  you can always get a reference to the Framework through its static function getInstance() and then get a reference to systemBundleContext which is an IBundleContext implementation. package com.esri.awx {     import com.adobe.cairngorm.commands.ICommand;     import com.adobe.cairngorm.control.CairngormEvent;     import com.esri.aws.osgi.framework.Framework;     import com.esri.aws.osgi.framework.IBundleContext; ...

What beautifui HTML code looks like

Found this great link ! Updating my html samples :-) Blogged with Flock