Friday, May 30, 2008
Posted on Friday, May 30, 2008 11:26:39 AM (Mountain Daylight Time, UTC-06:00)  Comments [0] | 
Categories: ASP.NET | DNN | Dojo | Virtual Earth

Starting in February we have been working with the Wildlife Conservation Society to create a map viewer for their Global Avian Influenza site (www.gains.org). This updated viewer launched a few weeks ago, and I thought I'd share a little bit about the project.

About the Project

The project is pretty straightforward, with only a few top level user stories:

- Map the scientific data that has been collected as part of the GAINS program.

- Allow users to filter the displayed this data by :

country,date range,species, and influenza subtype.

Also facilitate this functionality via Url parameters.

- Functionality to be delivered as a DotNetNuke module

- It has to be fast.

Technologies:

We used Virtual Earth for the mapping canvas since WCS needed a high-quality global data set, and this platform is free for non-profits.

For the UI, we dove into the Dojo Toolkit. This ended up working really well, with the exception of the tree view. It was just a huge pain to get the Dojo Tree to work the way we wanted it to, and dropping in the YahooUI TreeView solved these issues in minutes.

On the back end, it's we used ASP.NET. Since this was going to be a heavy Ajax site, we also leveraged the ASP.NET web services which are marked up so that they "speak" json (anyone know if there is a more graceful / concise name for this??? ASP.NET Script Services?). Behind that there is a SQL 2005 tabular database, ArcGIS Server and ArcSDE.

The main UI for the map can be seen below. The data points are clustered, and symbolized based on the match to the filter criteria.

 wme

Data Filtering

The points displayed on the map meet a set of criteria, which can be chosen on this UI. Not that the design is overly beautiful, but it's a mix of Dojo and Microsoft Ajax controls - using the best parts of both. Actually applying this criteria against the database and retrieving the points was non-trivial, so I'm going to write up another post about how we got all that working.

wme-criteria

External Data: Dynamic WMS Tile Caching

The module can be configured to pull in tile services from different WMS servers. This shows my favorite - the global poultry density map. If you are on the site, you can turn these layers on / off this from Map Data --> Manage Atlas Layers. Administrators have a UI to setup the WMS Services. Since mass poultry migrations are rare, most of this data is pretty static. Thus we dynamically cache the tiles on the WCS server so we get improved performance. We do see some offsets in the tiles at the lower zoom levels due to the variations between WGS84 and the Web Mercator projection of VE.

wms-atlas-layers

External Data: GeoJSON Features from ArcGIS Server 9.2

We also have the ArcDeveloper 9.2 REST API for ArcGIS Server 9.2 in the mix, pulling in flyway geometries. For species that have flyways, an extra item shows up in the identify tree. Here's a link to a map showing Calidris alpina, which has flyways. Mouse over a feature, click "View Details" in the pop-up and then expand the tree until you see "Show Flyway". This makes a JSONP call to the REST service running on a different server, grabs the geometries and drops them into the map. Since this species as multiple flyways, multiple polygons are drawn with various colors.

 flyways

It's been a great project to work on, and we are continuing to work with the Wildlife Conservation Society to add additional functionality into this application.

Tuesday, April 29, 2008
Posted on Tuesday, April 29, 2008 7:00:56 PM (Mountain Daylight Time, UTC-06:00)  Comments [3] | 
Categories: DNN

Just wrapping up a project that's built on DotNetNuke, and was using the built in module packager to create a nice zip installation. Great. Only problem is that it packs up all my Subversion "_svn" folders as well as the actual files I want. Doh! Initially I just exported from my Subversion working copy to a new location, added that as a virtual directory in IIS, and used that instance to create the package. But this is a real pain when you need to release small patches and bug fixes, so this being open source and all, I dove into the code.

And there is a simple fix... assuming you have the entire source tree laying around ( you can download it from www.dotnetnuke.com if you don't have it)

The module packager is the PaWriter class, which is in the DotNetNuke.Library project, under the Components/Modules path.

All you need to do is add two snippets of code to the two ParseFolder private methods:

Change:

Dim subFolders As DirectoryInfo() = folder.GetDirectories()

For Each subFolder As DirectoryInfo In subFolders

   If Not subFolder.Name.ToLower().Contains("_sgbak") Then

      ParseFolder(subFolder.FullName, rootPath)

   End If

Next

to:

'Recursively parse the subFolders

Dim subFolders As DirectoryInfo() = folder.GetDirectories()

For Each subFolder As DirectoryInfo In subFolders

   If Not subFolder.Name.ToLower().Contains("_sgbak") And Not subFolder.Name.ToLower().Contains("_svn") Then

      ParseFolder(subFolder.FullName, rootPath)

   End If

Next

Once you've made this change, re-build the DotNetNuke.Library, and copy the DLL into the bin folder of your DNN instance (if you are working directly in the full source tree, just build the website).

Given that Subversion is so very widely used, it would be nice if the DNN team would add this (and .svn) to the "core" code for the packager.

Friday, February 29, 2008
Posted on Friday, February 29, 2008 4:49:16 PM (Mountain Standard Time, UTC-07:00)  Comments [1] | 
Categories: .NET | Ajax | ArcGIS Server | DNN | Dojo

I've been diggin in deep this week - at 4:30pm on Friday this was my desktop...

desktop

(click to view full res -500k)

I've got the ArcDeveloper REST project up, a testing site where I'm furiously mixing the Dojo Framework with MS Ajax, and a DotNetNuke module where I'm bringing it all together...

wme1

This is just the start, but I've got Virtual Earth in a Dojo Split Container, (there will be a Dojo Tree in the lovely light blue area) with a Dojo Toolbar (icons to be changed). Not shown but also working are some Dojo dialog forms. The orange blob is a feature brought into VE via the ArcDeveloper.net REST service. I still have to wire in some point clustering, and the tree view, but given it's been a productive week.

Thursday, January 05, 2006
Posted on Thursday, January 05, 2006 7:03:25 AM (Mountain Standard Time, UTC-07:00)  Comments [1] | 
Categories: DNN | .NET
Over the last few months I've been building DNN 3.x module for a local non-profit. I've built a couple of DNN 2.x modules, and armed with the Wrox Press DNN book, I dove in. These are some things that really stuck with me from this experience...

Page Caching
Its not obvious that your module is cached by default. Thus if you create a module that has dynamic content, it's pretty confusing to see that it works as expected when logged in as Admin or Host, but does not work when logged in as some other user (or anonymous). The caching can be changed in the module definition, or when the module is added to the page (Settings -->Page -->Advanced), but if you know your page is gonna be dynamic, then it's best to set in the module like so:
MyBase.ModuleConfiguration.CacheTime = 0
Unit Testing
I tried a bunch of things to get some unit tests to work for my Data Access Layer. In previous experience with DNN, I've found that a lot of time was spent trying to sort out the DAL (even using templates - more below). Thus adding in unit tests would be a great way to validate that the DAL is working correctly. I was a while ago now, but I tried all kinds of stuff to get it working, and eventually found a post on the DNN Forums about this. I had ended up doing something similar, and then tried to reproduce what was outlined on the thread. No luck. And some others have also tried without luck. Anyhow, I hope someone can help sort this out because it would really help all of us who are developing for DNN.

Code Smith Templates
First off, thanks to all who have worked to create the DNN Jungle Code Smith templates. I would say that they are pretty handy for getting to know the DNN provider model, and can easily be used for very simple database schemas (1 or 2 tables for your module). However, if you are dealing with 1-M or M-M relationships, or more than say 5 tables, it's more of a pain to code using the output of the templates than it is to roll your own.

For example - if I have a 1-Many relationship in the database, I want my DAL class for the "1" table to contain a typed collection of classes from the "Many" table. Trying to manually maintain this sort of relationship using a set of other "controller" and "info" objects is a real pain. It also makes the DAL model more complex to use. This in turn makes it difficult to have a team made up of various skill and experience levels.

And finally (and this is likey personal preference) - I like having a single Controller for all the 'Info' classes - makes it easier to know what you're working with, and you have to create fewer objects.

MyGeneration
More recently David Wright left a comment over on ArcDeveloper suggesting I check out MyGeneration. Turns out that AppTheory has created some DNN 3 templates for it. I have not had a chance to look at how these work, but I'm thinking we're going to start using MyGeneration (free) rather than buying into CodeSmith ($400 / developer). In the little playing I've done with MyGeneration, I think that I'll be able to create templates which more closely meet my needs outlined above.

Another thing - (this could be my inexperience with CodeSmith), but all the templates I've seen deal with one table or one database at a time (think this is related to the interaface options in CodeSmith) - I'd like to be able to select a group of tables (i.e. all the tables related to my module) and have it do all the code gen at once. From reading in the CodeSmith forums, it sounds like people run the tool once for each table, export the settings and then run it in a batch mode. This seems a little long winded to me, but if it works, it's great. However, just doing a little playing around with MyGeneration, it looks very easy to select groups of tables within the default interface.

Another interesting option is to create your own database connector - and what comes to mind for me is a geodatabase connector. That would allow us to create feature class extensions / multi-version view DAL / wrapper classes via code gen. Since this would be a big boon for us, I'll be looking at this in the coming weeks.
Tuesday, November 29, 2005
Posted on Tuesday, November 29, 2005 10:41:07 AM (Mountain Standard Time, UTC-07:00)  Comments [0] | 
Categories: .NET | ArcIMS | DNN | ESRI | General
We're looking for a motivated person to join our cutting edge geospatial development team. Located in Fort Collins, this tight knit team is focused on building cutting edge GIS application using both ESRI and OGC technologies. This position is focused on web development using ASP.NET and AJAX, to build dynamic geospatial portals. We have a number of on-going large scale projects which require these skills, and we'd love to have you join our team.

Must Have Skills:
  • ASP.NET (C# or VB.NET)
  • Cross-browser Javascript +Ajax essential

Other skills:

  • Experience with Ajax.NET
  • Background/Experience/Interest in GIS, and/or spatial technologies
  • Good design skills (Photoshop + CSS)
  • Experience with DotNetNuke
  • Experience with ArcIMS / OGC WMS
  • Database skills (MS SQL, Stored procs etc)
Some sites you'll be working on...
Kentucky Landscape Census
Built on DotNetNuke 3.x, and utilizes a distributed set of OGC compliant map servers to generate maps. The mapping module utilizes Ajax.NET, along with some open-source vector drawing libraries. Further work will extend this mapping module to use the OGC WFS and Catalog services. Add-on contracts will extend the functionality of the framework to include land cover change detection.

City of Emeryville Redevelopment Site
Buit on DotNetNuke 2.x, this site is bringing together the power of ArcIMS, and a Real Estate listing system to provide the user with an integrated toolset to locate properties for re-development. The map module utilizes Ajax.NET to retreive maps and data from ArcIMS. Further work will include integration of spatial queries into the real estate module, and enhanced query tools.

In addition to these two on-going projects, Sanborn has a number of other enterprise GIS clients, for whom we will be building large scale systems integrating ArcGIS Desktop, ArcGIS Server and ArcIMS. So, if you're interested in an exciting change from the same old same old, send your resume to employment@sanborn.com. The official job posting is on the main Sanborn Site.
Monday, May 30, 2005
Posted on Monday, May 30, 2005 5:06:34 PM (Mountain Daylight Time, UTC-06:00)  Comments [0] | 
Categories: DNN

Since it was a rainly Memorial Day out here in Colorado, I thought I'd do some work on my personal site. I logged into my WebHostForLife console, and found that they now supported DNN3. Not being one to be "behind" the times, I decided to upgrade my site. Great. This went pretty smoothly, as I had pretty much zero content to move. It went so well, that I wanted to pop over here to post about it. When I went to this url (www.davebouwman.com/blog) I got a nasty error related to DNN3's URLRewriter.

The URLReWriter is a nice addition in that it changes the old DNN urls (/Default.aspx?TabId=23) into something a little more human readable (/Products/Demo.aspx). The downside is that it seems to decide to translate all incoming requests for /BLAH into a request for a DNN page. The problem is that /blog is NOT a part of my DNN site - it's another application!

After a lot of searching, I found this post (http://forums.asp.net/910124/ShowPost.aspx) where someone else had a similar problem running IssueTracker inside a DNN3 "root". The solution in this post is to setup the DNN3 "root" directory as a peer to the other apps you want to run. Then use IIS Admin to set the actual root (www.davebouwman.net) as a redirction to a URL, which is the DNN3 folder. This likely works great where you have access to the full IIS admin - WHFL does not have this.

I solved this by putting a META Refresh redirect page in my root (www.davebouwman.net) which points the browser over to the DNN3 folder (www.davebouwman.net/dnn).

So - if anyone has any idea how to do this more elegantly, PLEASE let me know.

[UPDATE] -- Just when you think things are working, it all blows up. I think that the steps described above will work, but my DNN install and database got all jacked up as WHFL connection timed out a bunch. I think I'm going to see alternative hosting or host my site at work rather than fight with WebHostForLife's system.

Saturday, February 12, 2005
Posted on Saturday, February 12, 2005 6:19:22 PM (Mountain Standard Time, UTC-07:00)  Comments [0] | 
Categories: .NET | DNN

Ran into an REALLY confounding problem today - my localhost DNN sites stopped rendering module content. No errors, just no modules.

After digging around in Default.aspx, I found my way into the injectModule method of Skin.vb. After tracing around in here for a while, I found that the visibility of the module was being controlled by a cookie...

If Not Request.Cookies("_Tab_Admin_Content" & PortalSettings.PortalId.ToString) Is Nothing Then
   blnContent = Boolean.Parse(Request.Cookies("_Tab_Admin_Content" & _ 
      PortalSettings.PortalId.ToString).Value)
End If

Somehow the cookie for http://Localhost/dnn had been set so that it had _Tab_Admin_Content set to false. The net effect is that no modules would be rendered.

I'm not sure how this cookie got set, but it was a dog to track down.