[an error occurred while processing this directive] [an error occurred while processing this directive]
Arc User, The Magazine for Esri Software Users Design Intelligent Applications With MapObjects

by Mark Pearson, Principal
GeoNorth, Inc.

photo of Mark Pearson Who really cares what GIS is? Obviously we as GIS professionals care, but if you talk to people in mainstream corporations or many governmental agencies, you find these people aren't interested in GIS. What they are interested in is ready access to information that will allow them to work faster, more intelligently, and more efficiently. More than ever before, desktop GIS applications, especially MapObjects-based applications, are the tools that make people in a wide variety of occupations more productive.

Products such as MapObjects and MapObjects Internet Map Server (IMS) represent the next great advance in GIS on the desktop. Predictions of "GIS for the masses" can now be realized. While GIS applications are nothing new, the difference is that lightweight inexpensive desktop applications can be easily written for use throughout an organization. Perhaps most importantly, these applications can be developed in a manner that shields the casual user from needing to know GIS terminology and concepts.

GeoNorth, Inc., has been developing computer applications, including GIS applications, for years. The MapObjects applications GeoNorth has developed have generated more excitement among users and managers than any other type of application work. Why? There are several reasons.

First, MapObjects applications help users retrieve information quickly in a graphical manner that is easy to comprehend. Second, these types of applications make heroes of our clients because the application and data can be delivered to a larger audience to make maximum use of the significant investments organizations have made in GIS technology and data. Last, applications can be designed to let the end user perform incredibly complex GIS tasks without requiring the user to know even the fundamentals of GIS technology or terminology.

With all of the tremendous advances from this technology resulting in easier, faster, and more cost-effective applications, there must be a downside, right? Well, sort of. In designing and implementing MapObjects applications, there are a number of technical issues that must be considered and addressed. The next section will address issues and point out pitfalls to avoid when developing MapObjects applications. Most of these issues are not unique to MapObjects--they are relevant to developing any modern Windows application.

Psst! Buddy! Want a Nice App?
One of the most common mistakes is underestimating the experience and skill level necessary to develop real, deployable, and maintainable applications. Many people believe that because they or a member of their staff are reasonably intelligent they can purchase a copy of Visual Basic and become proficient Windows developers overnight. The truth is that there is a lot more to application development than just producing code.

Clackamas County, Oregon, screen shot as described belowIntelligent Development
Microsoft has sold millions of copies of Visual Basic. With each copy sold there seems to be at least one more person who considers himself or herself a programmer. We have found that there is at least a tenfold difference in efficiency between an average or beginning programmer and a truly good and experienced one. With reusability of code and the added capabilities of object-oriented languages, these differences become even more pronounced.

With inexperienced and/or untrained programmers hacking code for your project, all of the usual and predictable problems arise: uncommented code, branching and looping problems, inconsistent or undecipherable variable names, inadequate error handling, and all manner of bizarre methods. Suppose you gave two million people a pencil and instructed them to draw a picture. The result would be quite a bit of forgettable and possibly strange scratching with occasionally some very creative and effective work. This holds true in the programming world as well.

As a general rule most people need training in order to become effective programmers. While this statement might cause many programmers to bristle, we find that without a good and thorough foundation, many undesirable and less than optimal programming traits tend to surface. A running program is not necessarily a good program. Confusing spaghetti code, poor error handling, nonstandard user interfaces, and other less obvious inefficiencies can create long-term maintenance headaches.

Make sure that you or your staff have some basic training and experience before starting on any serious application development. Programming is an art and science: even with training, some very intelligent people just do not have the aptitude to be good programmers.

Professional consultants and programmers are available to help develop quality applications. These professionals can provide a spectrum of services from help with specific tasks to turnkey solutions. Often consultants can be instrumental in building expertise within an organization quickly while helping to keep projects on schedule.

There are other things to consider when deciding if your application is to be developed by your staff or with the help of a consultant. The pros and cons of each approach include cost, personnel availability, project support, and the level of complexity required for the application. Managers often overlook the real cost of their staff when comparing it to the hourly cost of a consultant. Often professional developers can produce an application in a fraction of the time required by an inexperienced in-house developer who must often divide time between application development and other job duties.

Planning and Design
Whether you decide you have sufficient resources to develop your application in-house or opt to hire a consultant, initial planning and design is necessary for a successful application. Functional specifications, user requirements, performance requirements, and data handling issues need to be considered and agreed upon. At one end of the spectrum, some developers spend months refining specifications and prototypes. At the other end of the spectrum, some folks immediately start hacking code without addressing key issues. The happy medium falls somewhere between these two extremes and depends to some degree on the size and complexity of the project.

The Virtues of Prototyping
Prototyping helps ensure that the application will meet your needs. Prototyping involves the rapid development of screens and reports that have the look and feel of the final product. This lets end users evaluate the application more effectively and provide you with better feedback than showing users entity-relationship diagrams or conceptual data models.

Code and Data Maintenance Considerations
In the rush to develop applications, issues of code and data maintenance are often overlooked. These issues are critical to a successful application and need to be addressed early in the development process. Code should be modular and optimized to reduce redundancy that degrades performance and creates maintenance problems. Identifying discrete code modules early in the development process will help eliminate these issues.

Data handling is equally important. Data that will be used on a query only basis by the application should be identified, as well as data that will be maintained from within the application. Often it is not possible for the application to access live data from other sources due to network connectivity or preprocessing requirements. For example, an organization might store GIS data in ArcInfo map libraries. For security reasons or performance considerations a mirrored data set might need to be created using shapefiles. Determine how and when the mirrored data will be refreshed after deployment, and who will perform the refreshes.

Creating indexes is another often overlooked aspect of application planning. Applications that use large data sets need indexes for both attribute data and graphical data to perform at optimal speed. A method to refresh each index in the event that the data changes must also be engineered.

As with any Microsoft Windows applications, careful attention has to be paid to the installation program used to deploy your application. Gone are the DOS days when you could just copy an executable file, or the early Windows days when you could just copy a subdirectory to install an application. In the current Windows environment, there are a plethora of DLLs, ActiveX controls, INI files, registry settings, and other critical elements that must be installed in the right location with the correct settings so that your application will run properly.

Fortunately, some great tools are available for creating installation programs. Tools such as InstallShield and Visual Basic's Application Setup Wizard take much of the pain out of creating installation routines. Even with these tools, it is often necessary to get "under the hood" in order to solve problems. We have had some particularly onerous problems occur due to versioning of components. For example, when Microsoft released a new version of Office, its installation program installed some newer versions of basic Windows DLLs that caused our programs to stop working. In order to find and fix these types of problems, it is often necessary to become intimate with many of the support DLLs and files that you had been able to conveniently ignore in the past.

Start Planning Your Application Today
Whether you decide to use in-house staff, hire a consultant, or some mix of the two approaches, don't be intimidated by the above-mentioned issues. While it is best to begin any project fully aware of the key points that will need to be addressed, the benefits of a successfully implemented MapObjects application far outweigh any technical problems that must be overcome.

You may contact Mark Pearson at mpearson@geonorth.com or visit the GeoNorth, Inc., Web site at www.geonorth.com.

About the Author
Mark Pearson is a principal and cofounder of GeoNorth, Inc., a company specializing in GIS application development and system implementation. Pearson's areas of specialization are database and Internet applications, ARC Macro Language (AML), Visual Basic, and the MapObjects tool set.

GeoNorth, with offices in Anchorage, Alaska and Portland, Oregon, deployed the first MapObjects application and the first Web site implementing . They have developed many MapObjects applications in use throughout the United States and abroad.

[an error occurred while processing this directive]