Ok, just had to share this because I think it's so darn cool. I've posted about our internal tool "ArcDAL" in the past (follow that link for details), but the quick review is that we have created a set of code-generated data access classes which wrap the geodatabase API. These classes fully support data binding, and because they are code generated, we can change the geodatabase model with limited impact to our code base.
Anyhow - while I was involved with the design and initial template generation, this is my first time actually using it in a project (This is the second major project using ArcDAL). It's just so fun to see this all come together, I thought I'd share...
So - here's how we make Object Inspectors (little UI's that "snap" into ArcMap's Attribute Editor)...
1) Create an inherited user control in the project. We created a base control to ensure consistent look and feel, so that simplifies things. Here's the new control...
2) Create an object data source from the ArcDAL List related to the feature class of interest - in this case ForestDistrictList
3) In the data source window, Set the display style for the ForestDistrictList data source to "Details"
4) Set the Display Style of fields we do not want visible to "None"
5) Drag the List data source onto the user control... and watch it layout the controls for you
Once the controls are on the form, you're almost done. For all the fields that are automatically populated, set the control to Read-Only. While this example does not have domains, those are handled and will automatically be dropped in as dropdown lists. Once the form is all laid out, we just have a minor bit of coding (~20 lines) to convert the inbound IObject into an ArcDAL object, and add it to the binding list, and handle some eventing so that changes are automagically saved.
I may have to create a little screen cast because it's just too cool to have it lay things out for you.
From a productivity stand point, this is amazing. And since it's data bound and code generated, even substantial changes to the geodatabase schema are relatively painless propogate up through the application.
I'm Dave and this is my blog. I'm usually writing about .NET Software Development, ArcGIS, or Agile Practices, but other stuff does creep in from time to time. I hope you find something of use, and feel free to contact me if you have any questions. You can also check out my profile on LinkedIn
dojo.DTSAgile.com is our technology preview / demo site. As I and my team cook up cool things we post them here.
ArcDeveloper.net is a site that hosts a set of open source projects related to ArcGIS. This includes Tile Cache for .NET (TC4N) and Feature Server for .NET (FS4N). Come over and check it out!
Assembla is a free service that provides Subversion source control, wikis and work Tracking. The ArcDeveloper project is run from here. It rocks. Check them out today.
Agilistas is a LinkedIn group focused on discussing and promoting Agile practices. Everyone is welcome to join in the conversation as we evolve the process of creating software to make it more enjoyable for all involved.