2012 Developer Summit must watch videos 25. April 2012 Shawn ArcGIS (0) If you haven’t heard, the videos for the 2012 ArcGIS Developer Summit are now finally available. The day one plenary was available the very next day so I have no idea why it took a month to get the session videos out. The videos I’m going to recommend are from the perspective of someone who has worked with ArcGIS Server for more than 4 years. My team built the very first custom Server Object Extension (SOE). I helped redesign the Telvent Silverlight SDK, and and I see a strong need for more mobile apps. These videos are ordered. Sesions I attended Building Web Editing Applications with ArcGIS 10.1 for Server-by Gary MacDougall and Ismael Chivite Hands down the best session in terms of content. I was floored to see all of the new editing functionality within ArcGIS Server. I had been working with ArcGIS Server 10.1 the first week that Beta 1 went out, but I had never been able to test or investigate the new editing. ArcGIS Server for Administrators-by Ismael Chivite and Jay Theo... [More]
Using extension methods to iterate ArcGIS COM collections 9. March 2012 Shawn ArcGIS (1) I’m a big fan of .Net and all the glory that it offers. So when I’m developing against ArcGIS COM objects I cry a little inside. Working with COM objects in .Net is not fun. C# 4.0 made this a little better by improving the code generated by interop. Example code to get an indexed property within .Net from a COM object with VS2008 int fieldIndex = 2; IRow row = cursor.NextRow(); object value = row.get_Value(fieldIndex); Example code to get an indexed property within .Net from a COM object with VS2010 int fieldIndex = 2; IRow row = cursor.NextRow(); object value = row.Value[fieldIndex]; Notice the difference? It’s in the last line where we get the value for the field. Not only do you not need the get_XXX prefix, but you use square brackets. It’s actually an indexed property now! Small things like this make working with ArcObjects a little better, but there is still a lot more that can be done. One area that always ... [More]
Using the Repository Pattern with ArcObjects 31. October 2011 Shawn ArcGIS (3) The Repository Pattern is well known to everyone that needs to access a database. That is unless you access a database through ArcObjects. A repository is easy to use, easy to inject, and easy to unit test. Doing anything with ArcObjects is very complicated. Especially unit test. Wrapping ArcObjects in a layer of abstraction usually helps simplify things. By wrapping a few simple operations within a repository, your code no longer needs to start or stop an edit operation, no longer needs to worry about creating a QueryFilter (something that cannot be done within unit tests), and no longer needs to worry about all of the little details of accessing ArcObjects. Let’s start with a simple repository using ArcObjects. We’ll need the normal CRUD operations. interface ITableRepository { IRow GetById(int id); IEnumerable<IRow> GetAll(); IEnumerable<IRow> GetByWhere(string whereClause); void Delete(IRow entity); int Save(IRow entity); void BeginTransa... [More]