Alan’s Blogometer

Alan Gutierrez blogs on software, social networks, and himself.

Subscrive Via RSS Feed
« GNU Mailman How To Use EditGrid to Create a Database With A Slick User Interface With Zero Lines of Code »

A Programmer’s Notebook on the EditGrid API

My Tchotchke Boxes

My Tchotchke Boxes by 1213 1982.

I created a series of online spreadsheets of every building, construction and demolition permit issuesd in Orleans Parish since January 2005. These spreadsheets are available at Think New Orleans.

The EditGrid API can automate the creation of reports and act as an easy use and share database for light data collection applications. I’ll write about my experience with EditGrid and why you should consider EditGrid at the back end for your next data collection task.

This is my programmer notebook on my getting to know you time with EditGrid.

I wrote my program in Java. Here are the three gotchas that I encountered.

For Java, You Must Use Apache Axis

Apache CXF (nee XFire) wouldn’t generate classes carping about some version of something. It said, “WSDLToJava Error : Rpc/encoded wsdls are not supported in JAXWS 2.0″ It’s something that it is said.

So, I used Apache Axis. I created the EditGrid classes with the following incantation.

java -cp lib/wsdl4j-1.5.1.jar:\
  lib/saaj.jar:lib/jaxrpc.jar:lib/commons-discovery-0.2.jar:\
  lib/axis.jar:lib/commons-logging-1.0.4.jar \
  org.apache.axis.wsdl.WSDL2Java \
  --package com.thinknola.wsdl.generated.editgrid \
  --output ~/Desktop/Inbox/WSDL \
  http://www.editgrid.com/static/EditGrid.wsdl

The output was identical to the classes used in the EditGrid API documentation except that the class EditGridPort was generated as EditGridPort_PortType. I rolled with it.

There Is a API Call Limit

When I showed Matt McBride the 2008 permits, he turned right around and asked for every permit since 2005. That’s 50,000+ rows. At some point EditGrid told me to give it a rest.

I didn’t much mind, because the import was slow anyway. The city website took 7-10 seconds to respond to a permit request. I was importing 500 permits an hour per process, I was running six processes to fetch all that data.

I gave it rest. 24 hours later I resumed and finished the import.

There is a Size Limit

Initially I created one workbook with a sheet per month. This triggered an internal limit when I went to export to Excel. The solution was to create a workbook for each year.

RTFM: Read the Flipping Menu

You can learn all about the EditGrid API using the straightforward documentation. The objects and methods are well-documented.

The EditGrid API does pretty much everything you can do from the EditGrid menu. You can muck around with your spreadsheet in EditGrid to get the way you want it look. You can then map the menu and cell clicks to get your desired output to EditGrid API calls.

Which is an interesting aspect of the programmable web. It is much easier to learn an API when you have an interactive menu to the API calls. Not much questions as to what the API calls will produce.

One Response

comments feed

  1. Alan’s Blogometer » Blog Archive » How To Use EditGrid to Create a Database With A Slick User Interface With Zero Lines of Code says:

    [...] Alan’s Blogometer Alan Gutierrez blogs on software, social networks, and himself. « A Programmer’s Notebook on the EditGrid API [...]

Leave a Reply