Archive for February, 2009

Salesforce, server-side, cloud programming anyone?

February 25th, 2009 by Darin Herle

Salesforce (if you’re not familiar with Salesforce, it’s a hosted CRM that stores all of an organization’s customer information). We needed to do some fairly complex calculations involving products and currencies, that wasn’t possible with the base product.

salesforce-logoWe called a meeting that involved a number of Latitude stakeholders, trying to identify the best candidate to carry out the work – after some discussion, the room grew quiet, and I quickly realized all eyes were fixated on me. With internal resources tied up on customer projects, it seemed I made the best candidate to perform the work. (I knew my Computer Engineering degree would come back to bite me!)

Anyways, I dove into development and I must say, it was certainly refreshing to immerse myself back into the development world for a few weeks. Salesforce uses a server side programming language/environment called Apex, that is, of course, fully hosted in the “cloud”. It’s an object oriented, strongly typed language with Java-like syntax. Apex is designed to allow developers to extend the “out-of-the-box” functionality provided by the Salesforce CRM by building new functionality that goes beyond the scope of the core CRM product. (not unlike Geocortex Essentials!) Using the supplied documentation and user forum as references, I was able to deliver a production implementation of our calculating engine in a few weeks. Not bad for a rusty old software engineer!

Of interest to developers, was a curious (and welcome) requirement for test coverage. Apex requires test methods that cover a minimum of 75% of written code prior to production deployment. As a result, it made more sense to write the test methods first, (which aided in design) prior to implementing the calculating engine itself. Maybe I’ll see if our products team is hiring..

The Retirement of Warren Burns

February 24th, 2009 by Steven Myhill-Jones

Occasionally job seekers can get a little overzealous in their efforts to follow-up. After one too many “urgent” phone calls that pulled me out of a meeting, in 2002 we changed our employment page to request that applicants submit applications “Attn: Warren Burns”, which people infer to mean that a person named Warren Burns is in charge of HR. Thereafter, when anyone declared they had an urgent call for or (unscheduled) meeting with Warren Burns, we knew the true nature of their request. And so we could factually declare “Sorry, he’s not available right now” to a caller, we assigned the name to a Betta fish that lives in our office.

Brett&WarrenHowever, after many years, Latitude Geographics has decided to retire Warren Burns, our human resources fish.

First, his cover was blown back in 2006 after he got subpoenaed to testify as a witness in a court case (we think the fact that the defendant’s lawyer subpoenaed a fish speaks volumes as to his relevance/connection to the case) and he got profiled in the local media. Thanks to Google, many candidates started making references to the fact they were applying to a fish in their cover letters. We once even had a candidate show up to their interview with fish food.

Second, we’ve had an actual human being dedicated to HR for about a year, and Warren Burns just adds unnecessary explanation and work to Brett’s world. When Brett gets “urgent” calls, he’s got a good hunch what they’re about. Brett has also pointed out that he, on paper anyway, reports to a fish. Funny, but stuff like this get stale after a while.

Warren Burns will remain on board in an advisory capacity on the bookshelf in my office.

Handy Trick for JSON Serialization

February 17th, 2009 by Drew Millen

The Geocortex Essentials REST API (written for the upcoming 2.0 release) relies heavily on the ability to serialize objects to JSON (JavaScript Object Notation). JSON is used as a stateless response to an HTTP request for a REST resource; whether generated by the ArcGIS Server JavaScript API, Flex API, or other (Silverlight for example).

One of the interesting things about serializing server-side, .NET objects (to JSON or any format for that matter) is the way in which we determine which properties are serialized. Most automatic serialization mechanisms (implementing ISerializable for example) require that all components of a class are themselves serializable and simply convert the entire object into its serialized representation.

Sometimes; however, you may want two different serialized representations for the same object. For example, when serializing a Geocortex.Essentials.Map object, we may want to know the name and type of each Geocortex.Essentials.Layer within that Map; however, if serializing just an individual Layer we may wish to get a more “verbose” representation including its extent, visibility, or other properties.

Joel (Geocortex Essentials Product Developer) introduced me to a handy way of easily serializing an object to JSON for this scenario. Using the JavaScriptSerializer object (from the MS AJAX library), you can simply serialize a Dictionary containing key/value pairs and the result is a JSON string representing just those properties you wish to serialize. If the order of your properties is important, you could also use an OrderedDictionary.

Consider, for example, this “Person” object, containing an associating with an “Address” object.

PersonAddress

Now, if I want to serialize the person to JSON while explicitly selecting the components I’m interested in, I can create a Dictionary as follows (assuming I have a variable named “person” which is assigned to a Person object as depicted above):

jsonPart1

Serializing the dictionary is accomplished easily with this line of code:

jsonPart2

And the result is a nice JSON string which is exactly what I was looking for:

{
    “name” : “Smith, John”,
    “address” : “123 Main St., New York, NY”
}

Note; however, that the same handy conversion “trick” is not available when using the DataContractJsonSerializer (from the WCF library in .NET 3.5):

jsonPart4

The DataContractJsonSerializer creates a much more explicit representation of my Dictionary (an array of key/value pairs) which isn’t as useful when using JavaScript to parse and evaluate the JSON:

[
   {
        "Key" : "name",
        "Value" : "Smith, John"
    },
    {
        "Key" : "address",
        "Value" : "123 Main St., New York, NY"
    }
]

In case you’re interested, the JavaScriptSerializer was deprecated in .NET 3.5 (which is odd since it was made available in MS AJAX 1.0); however, it has been de-deprecated in .NET 3.5 SP1.

Our Scandinavian Experience

February 16th, 2009 by Darin Herle

Geodata AS, ESRI’s distributor in Norway (and newly minted Geocortex reseller) held its annual user conference in the Norwegian capital of Oslo two weeks ago. Latitude Geographics was invited to attend and help introduce Geocortex technology to this burgeoning Scandinavian nation.

oslo-bigThis conference was fun! The primary social event consisted of a gala diner and entertainment by two well-known Norwegian comedians. The amusing thing for me was that I had no idea what these guys were talking about. I simply followed the lead of the crowd, laughing when everyone else did. My companions from Geodata were good enough to translate bits of the show for me as the night progressed. Other highlights included the tour of Geodata’s new office building and the gourmet lunch freely available to all employees, everyday… Oslo is an amazing city. It has enough people living in it to be big, but is compact enough that it feels small. It is well worth visiting, even in January – but be sure to bring a hat and gloves, it can be cool. (Steve’s understatement for 2009). My suggestions for a cold winter’s day in Oslo: Nobel Peace Center, Oslo City Hall (where they award the Nobel Peace Prize), Vigeland sculpture park and Aker Brygge, topped off with a warm drink at one of Oslo’s many excellent cafes.

It will be exciting to watch Norwegian implementations of Geocortex Essentials and Optimizer come on line.

(As written by one of our Account Managers, Steve Maddison, on the road in Europe).

Sharepoint and Geocortex Essentials?

February 13th, 2009 by S Woods

Just the other day, I was asked if Geocortex Essentials can work with Sharepoint. To be honest, I don’t have the answer – so far, we’ve primarily used Sharepoint as a CMS and data-integration tool. I can imagine a case for data linking of Sharepoint Lists into Essentials or perhaps some combination of a Web Part filter to pass a value selected on a List to an Essentials Web Part.

I’m curious to hear ideas from people using Geocortex Essentials – how would you like to see it work with Sharepoint?

Geocortex Essentials 2.0 Moves to .NET 3.5

February 6th, 2009 by David Stevenson

I want to make everyone aware of a technology decision we’re planning on moving ahead with for Geocortex Essentials 2.0. We’ve decided to increase the minimum .NET Framework for Essentials from 3.0 to 3.5, the latest .NET version. There are a number of compelling reasons for the move, the primary one being our customers’ interest and our own interest in leveraging the powerful new features in the latest .NET framework. The Essentials installer will ensure that the necessary prerequisites are installed before installing Essentials 2.0. Also, applications targeted at the 2.0 and 3.0 versions of the .NET framework should remain fully compatible with 3.5.

Please let us know if you have any questions about this.

Handy Arc Fixes

February 3rd, 2009 by Stephanie Blazey

I have a “how to” folder on my computer desktop which I fill with little snippets of information over time. It’s handy for those moments when you need to solve a problem but you can’t quite recall how you did it last time.

Here are a couple of tips that I find really useful for ArcMap and ArcCatalog:

Tip #1. Three things to try when ArcMap hangs on “add data”

- Try connecting to the VPN you were last connected to. It may be looking for a connection that you can no longer reach.

- Start the “Advanced ArcMap settings” in the Utilities Folder (the default location is along the lines of “C:\Program Files\ArcGIS\Utilities”) and click “reset all values to default”.

- Go get a cup of coffee. Sometimes waiting helps – if it is looking for a connection that doesn’t exist any more, you may just need to let it time out.

Tip #2. How to make ArcCatalog open faster

- Disconnect folders you are not using anymore

- Clear out the Toolbox history:
click the results tab in the Toolbox menu
remove all tool results from previous sessions

toolbox_clear