Design Article

Data-centric software design speeds development of handset apps

Eugene Buechele, Encirq Corp.

10/24/2005 5:00 AM EDT

Developing software for mobile handsets can be challenging. Different CPUs, operating systems, mobile platform environments, and JVM implementations create time-consuming porting and testing issues. Supporting different displays can force painstaking changes to multiple modules and applications. System resource limitations put a premium on developing code that optimizes resource-usage efficiency in terms of CPU performance, memory, storage, bandwidth, and power. Despite these many challenges, development timelines are shrinking and mobile service operators and consumers demand a high-quality user experience.

These challenges are well-known and have been partially addressed by handset makers, mobile platform providers, and other software vendors. They've invested many years of effort to create various software abstraction techniques to shield developers from underlying hardware and software platform specifics. Furthermore, J2ME and the emergence of the Mobile Information Device Profile (MIDP) have provided additional abstractions to ease handset applications programming.

Unfortunately, mobile application platforms and prevailing development approaches using C, C++, and Java provide little if any abstraction for application data. Data management code for the acquisition, processing, and integration of data stored in or flowing through the handset is treated simply as part of the application and is hand-coded using the data structure and manipulation capabilities of the chosen development language. In addition, to increase performance and efficiency, developers must often access low-level functions and hardware features directly in C. Today, data-management code typically makes up 50% or more of all application code. And unless they've built it themselves, rarely is there a data abstraction layer to isolate data-management code from low-level data-management implementation details or handset platform idiosyncrasies.

Complicating matters is the fact that C, C++, and Java are procedural languages. Their structure leads developers to implement applications in terms of control-oriented or event-driven functions. Core applications such as GUI infrastructure, contacts lists, and messaging, as well as entertainment and productivity applications are therefore implemented using procedural logic that puts emphasis on drawing boundaries or interfaces between objects or modules and focusing on the internal object/module code. This results in relatively brittle applications and time-consuming integration issues as various modules and applications are combined to run on different handset configurations.

Given that the goal is to accelerate development of efficient, high-quality applications that can run across many handset platforms, software design approaches and domain-specific tools that provide additional abstraction capabilities can deliver significant benefits. This is particularly true for data-management code. If developers analyzed the code in their current applications, they may be surprised to find that 50% or more of all applications code is data-management code. In addition, they'd likely find that data-management code is at the heart of unpredictable application and data integration issues.

Data-centric software design
A promising approach to the challenges facing handset application developers is data-centric software design. In contrast to traditional approaches where functions are treated as central and the data structures as support for the functions, data-centric software design puts data at the center with code in support of it. Data-centric software design emphasizes data (i.e., data definitions, structures, relations, and manipulations) over procedural functions and interfaces. It lets developers create more robust and portable applications with less effort because applications can be largely data- or table-driven. Among other advantages, this lets changes to applications be driven more simply by changes to data rather than changes to functions and interfaces that may de-stabilize the overall application.

Putting it into practice
To leverage a more data-centric approach, developers need a way to describe their data effectively and to operate on it efficiently. To do this, they typically need:

  • a way to use a higher-level, more expressive data-management language like Oracle’s PL/SQL that abstracts underlying implementation details and platform-specifics
  • a data-management services layer or system to handle the underlying data-management details; one that meets the performance needs, resource constraints, and varying storage requirements of targeted handset platforms
  • an easy way to integrate data-centric applications and components with existing applications and platforms/li>
Data-centric software design practices allow developers to more easily conceive and define the optimum data model for handset applications. This can be done by initially defining the different data (both static and streaming) for the given application in terms of how data sets should be aggregated, transformed, or filtered. These aggregation and filtering methods become the operators on application data. The operators can then be defined in terms of functions or objects, and the data structures in terms of tables or classes. Trying design applications this way in C, C++, or Java can be time-consuming. It's more easily done with a domain-specific programming language like PL/SQL, a language that's designed for defining and managing data.

A data-management services layer is needed to handle the underlying data-management details for a particular handset platform, including data acquisition from, and storage to, various sources, including persistent media. From an application perspective, it can provide a uniform data abstraction layer to simplify data-driven application development by isolating applications from platform-specific details.

When it comes to a data-management system, many developers think of an embedded database. However, embedded database technologies are generally a poor fit for mobile devices. They typically consume more computing power and memory than is acceptable in a typical device. They provide no model for data sources other than tables, ruling out their use on arbitrary data streams from network connections and other I/O sources. Plus, they typically come in just one of two flavors—in-memory only or disk-based. This limits their usefulness in mobile devices that must also store and operate on data in flash memory or SIM cards.

Fortunately, a new class of high-performance data-management technologies has emerged that provides ultra-efficient relational data-management services. These are designed specially for resource-constrained environments and employ a services architecture that allows them to be extremely compact and to operate on data streams as well as static data. The service architecture also lets them store table data in the many different types of storage media found in mobile handsets.

Using a higher-level language to ease data-centric design and a suitable data-management services layer, the final element needed is a way to integrate data-centric applications and components with existing applications written in C, C++, or Java. Few developers have a "green field" start and zero legacy code, and most can't afford to scrap and re-do large bodies of existing code. What's needed is a way to convert the data definitions and operations expressed in the higher-level language into code that can be easily integrated with existing applications. Fortunately, new embedded data-centric application frameworks have emerged that do just this. They take statements in a language like PL/SQL and generate code in a common format such as ANSI C. This code can then be compiled along with the existing application code and linked with the appropriate services libraries to form a single executable.


Next:




Please sign in to post comment

Navigate to related information

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)

Feedback Form