Silverlight Data Access Layer Options Minus SQL Server
I’m focused right now on determining what DAL I should use for a new web mapping application I’m writing using the ArcGIS API for Silverlight. I quickly came across Shawn Wildermuth’s excellent post on Choosing a Data Access Layer for Silverlight 3 after Googling the subject. According to Shawn:
The three major candidates in Silverlight3 are Web Services (WCF/ASMX), ADO.NET Data Services and RIA Services. In any situation, any of these will work. But they are suited to different styles and requirements. Here’s the abridged differences between the stacks:
* Web Services: Interface-based Data Access
* ADO.NET Data Services: LINQ-based Data Access with change management
* RIA Services: Interface-based Data Access with change management
I’ve been over in Java land for over a year now and ADO.NET Data Services and RIA Services are new territory for me. After doing some research to get an architectural understanding of each service, I realized that both rely on the ADO.NET Entity Framework, an ORM for ADO.NET that’s equivalent to Hibernate on the Java side. Unfortunately, you can’t use the Entity Framework with Oracle unless you purchase a 3rd party driver from Devart or DataDirect. If you are running another RDBMS flavor other than SQL Server, refer to Microsoft’s full list of 3rd party ADO.NET Entity Providers.
I don’t plan to purchase any provider licenses since I can still utilize WCF web services without incurring extra cost or 3rd party software points of failure, but others might want to take that route if ADO.NET Data Services or RIA Services are valuable enough. I have to say RIA looked promising since it’s geared around line of business applications for Silverlight, and even provides a Visual Studio template. Finally, something to keep in mind before choosing the ADO.NET Entity Framework is the vote of no confidence movement.
Alt+F4
iPhone Maps New Feature: Ads!
Yeah, one of those new features everyone doesn’t care for unless you’re making money off the ads. Evidently though, it’s been reported that the iPhone Maps application is now displaying advertisements on iPhone OS 3.1. There is nothing shocking about the new advertisements, given the Maps application makes use of Google Maps.

Maybe even more interesting is Apple may be trying to replace Google Maps with their recent acquisition of Placebase. One can only speculate if the ads had a part in the decision. Apple does like complete control…
Enjoy the upgrade!
alt+F4

Map Me the Money
The government spending watchdogs are having a heyday thanks to the release of Where Is the Money Going, a new web map put up by the feds for tracking who and where Recovery Act monies are going. The application thematically maps out $13,060,137,875 by state, county, zip and congressional district. In addition, pushpins for contracts, grants and loans can be identified for recipient and monetary award. Other notables are export to KML.
Where is the Money Going was developed with the ESRI Flex API, and according to Programmable Web:
ESRI’s biggest advantage versus Google Maps and other mapping providers is that ESRI is seen as the platform to use if you’re serious.
Good thing I develop with Google Maps and ArcGIS Server, otherwise I’d almost take offense to that comment.
On the lighter side, I just had to find out who received the most dough from Uncle Sam (and of course the location). And the winner is…

I tried unsuccessfully to find some Cash for Clunkers ArcIMS replacement grants. I’m sure at least a tiny fraction of the $13 trillion will be spent on ArcIMS phaseouts even if they have to be replaced by Google Maps.
alt+F4

Komodo Kode Kompletion for Mapping APIs
The goal of this post is to show how JavaScript code completion can be achieved in Komodo Edit, which is a free code editor provided by Active State. I’ll specifically demonstrate how to get set up with ESRI (dojo/ArcGIS API for JavaScript), Google Maps and Bing Maps code completion. Once you learn these, you’ll have the know-how to incorporate any JavaScript API.
Why Komodo?
I recently switched to Komodo Edit from Aptana Studio for the following reasons:
- Needed a lightweight JavaScript editor
- Wanted better code completion
- Aptana is built on Eclipse
- Komodo Edit supports vi
Visual Studio isn’t an option yet for me, as I’m doing development on my new MacBook Pro. Eventually I’ll get Windows 7 running virtually in order to reap VS benefits. In the meantime I’m satisfied with Komodo Edit, which also has a paid version called Komodo IDE providing extra goodies.
So let’s roll…
General
- Download your desired flavor (Win, Mac, Linux) of Komodo Edit and go through the typical install.
- Launch it.
ESRI Setup for Dojo\ArcGIS JavaScript
I’ll include adding code completion for both dojo and ArcGIS JavaScript APIs since they are intimately tied.
- Open the Preferences dialog through the menu. If you are running Windows, go to Edit–>Preferences. For Mac, Komodo–>Preferences.
- Select Code Intelligence in Category, then check dojo_v130 under API Catalogs. Note the other libraries like Ext, jQuery, Prototype and YUI.
- Close and reopen Komodo.
- Create a new JavaScript file for testing. Type ‘dojo.’ and away you go. Don’t forget to try dijit and dojox too.
- To add ESRI’s ArcGIS JavaScript API, you’ll need to grab the source and stick it in its own js file. The API is online at http://serverapi.arcgisonline.com/jsapi/arcgis/?v=1.4. Type this url into a browser and copy the entire last line (it’s a long one) highlighted below.
- Create another js file in Komodo Edit and paste the source that was copied in the previous step. When you save the file you might get a warning that some of the characters can’t be saved with the current encoding. Go ahead and force the save and ignore other warnings that you may get. It’s all good.
- Go back into Komodo Preferences, and select Languages–>JavaScript. Add the directory to where you saved your ArcGIS JavaScript API source js file under JavaScript Directories and click OK.
- Go back to the test javascript file created in step 4. Type ‘esri.’ and you’ll see the code completion take effect. If you run across any issues simply close and reopen Komodo.
Google Maps
Because Google obfuscates their Maps API it’s useless to try and grab their source and use it like we did with ESRI. Luckily somebody out there stubbed out the Maps 2.0 API for us, which you can grab at http://www.codeplex.com/GMapJS/Release/ProjectReleases.aspx?ReleaseId=19490.
- Download GMAPJSHelper_Release.js.
- If you save GMAPJSHelper_Release.js to the same directory as the ArcGIS JavaScript source in ESRI step 6, close and restart Komodo. Otherwise, add the directory you saved GMAPJSHelper_Release.js to Komodo’s JavaScript Directories like ESRI step 7 (might still need to restart Komodo) .
- Test the code completion.
Note GMAPJSHelper_Release.js is for version 2.x, and does not cover 3.0 or the Static Maps API. Another tidbit is version 2.x uses globals, so you have to know the names of all the classes when using code completion. You can’t, for instance, type ‘esri.’ and get all the types like you did with the ArcGIS JavaScript API. However, Google Maps 3.0 thankfully introduces namespaces. Unfortunately, I couldn’t find a helper js for version 3.0.
Bing Maps
- Go to http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2 and copy the last line starting at ‘this.CreditsFor=function(a,i,j,h)‘.
- Create another JavaScript file in Komodo Edit and paste. Put a semicolon at the very end of the line, and save it. You’ll get the same warnings you did with ESRI, but keep on ignoring them.
- Add the new js file to the JavaScript Source Directories like ESRI step 6, if needed.
- Close and reopen Komodo.
- Open up your js file used to test code completion.
- Type ‘VEMap.’ and you should be golden. Bing also lacks namespaces similar Google Maps 2.x. Gotta love the old ‘VE’ prefixes!
Bonus
There are additional add-ons besides code completion that are useful for your JavaScript experience. On the tools menu, select Add-ons and you’ll get the familiar FireFox dialog for searching and adding add-ons/extensions/plugins. Do a ‘browse all‘ and you’ll find some gems like kJSLint, core javascript library, htmlKit, etc.
Conclusion
I’ve shown how to set up Komodo code completion for three of the most popular mapping APIs. However, there is no reason you couldn’t apply the same techniques to add Yahoo Maps, Open Layers, or any other web mapping kit.







