Agile.Net / Equity One Case Study

Agile.Net & Equity One

Altova partner uses XSL to create modern Web-based reporting system.

Equity One is a publicly traded real estate investment trust that principally acquires, develops, and manages neighborhood and community shopping centers around the United States. Early in 2004, they approached Agile.Net, an Altova partner focused on software development and project management, for help creating a solution that would allow the geographically dispersed Equity One staff to generate and retrieve property operating reports from their centrally-located ERP (enterprise resource planning) database.

In an effort to avoid prohibitive costs and logistical complications, Equity One requested a solution that did not rely on additional ERP licenses, new software on desktop machines, or a large amount of new training. As a public company, they needed to ensure the highest levels of security and accuracy, including compliance with the Sarbanes-Oxley legislation, which calls for well-documented processes, adding a requirement for transparency in the creation and modification of the intended system.

The Challenge

Equity One required a new reporting framework that would allow users to select report criteria, to save and reload their selections, and to save and reload the report results. It was important that each report be available online in one or more print-friendly formats and in an analysis format based on Excel. They needed a system that was versatile enough so that once a user determines which report to run, he or she can choose to display the report results on the screen and/or save the results as Web pages, PDF documents, or Excel files.

Although Joel Aufgang, CTO of Agile.Net, and his development team felt that these requirements were tailor-made for XML and .NET, the reload requirements meant both the query and the results would have to be saved in the database in XML format. For a query object, Agile.Net would need to generate XML data and later be able to reload the query objects from the XML at a user’s request.

The Agile.Net team selected Altova XMLSpy, Altova StyleVision, and Microsoft® Visual Studio®, as their primary development tools for the project.

Agile.Net also applied the test first development process to ensure reports were generated accurately from the ERP data. Unit test sets were added to each page where the code was written, with test results accessible on a page in a special section of the Web application.

The Solution: Separate Content and Presentation

Since a reporting tool is all about providing end users with information in a format they can understand and use, the core of the development effort was in creating and managing XML stylesheets that determine the presentation of the reports. Agile.Net simplified this work by leveraging Altova StyleVision to visually generate presentation stylesheets.

In order to define the stylesheets, the development team first needed sample XML files, which they created with Altova XMLSpy based on the report specifications from Equity One. A stylesheet requires an input structure – an XML Schema, DTD, or relational database – so the application developers generated XML Schemas from the sample XML files using XMLSpy's built-in Generate DTD/Schema tool. Then the XML files and Schemas became references to build the sample reports using actual data from the customer’s database. XSLT (Extensible Stylesheet Language Transformations) was used to transform the reports from XML into the required output formats.

Creating a schema in XMLSpy
The XMLSpy Generate DTD/Schema menu selection makes it easy to create a schema from a sample XML document.

To provide a uniform look and feel, the same CSS (Cascading Style Sheet) properties were used across the entire project. As new report formats were requested by Equity One, new stylesheets were designed in StyleVision by dragging and dropping elements defined in the XML Schemas generated for the reports into appropriate places on its design canvas. In the background, StyleVision automatically generated the output stylesheets necessary to run reports matching the visual designs.

The requirement that users be able to view the report on screen while simultaneously creating any of the available output file formats required a unique solution. XSLT technology uses different transformations for HTML, tabularized text (for import into Excel), and PDF files, but because this reporting system would connect all the remote offices over the company intranet, the developers wanted to avoid any unnecessary overhead.

Agile.Net developers crafted the application so that once a user specifies the report data and preferred output format, the system processes the request and returns the desired result via HTML. The report content is transformed into HTML on the server then transmitted to the user formatted for display in a browser, as a table for importing into Excel, or as text for printing to PDF. This approach only requires one XSL file per report (instead of three) and thereby reduces associated data transfer and storage requirements.

The XSL file for each report was structured in StyleVision to perform conditional HTML formatting depending on a format parameter with the value "web," "excel," or "print." This parameter is passed to the XSL file by the application when a user chooses to view a report in a particular format.

The conditional logic is applied in the XSL file using XPath statements that were constructed using StyleVision’s XPath expression builder. The XPath expressions are processed at run time by the royalty free AltovaXML XSL processor that Agile.Net embedded into the reporting application. Within the stylesheets, conditional sections provide different outputs depending on the result of evaluating these XPath expressions.

StyleVision XPath Builder
StyleVision helps you build XPath expressions for use in your stylesheets quickly and easily using a simple point and click interface.

Because each report had a unique specification, each uses its own XSL file and each XSL file is created to account for every option that a user can select when running a given report. While this one-to-one relationship between reports and stylesheet designs required more development work than might be necessary in some scenarios, StyleVision significantly accelerated the process. Agile.Net felt their strategy also significantly improved efficiency at run time.

The Results

When many different reports are needed, the old method of individually crafting each report and hard coding the data and layout is inefficient. The model Agile.Net used for Equity One defined an overarching framework for all reports and then applied the framework to each new report. This method also ensured that a change in one place cascaded to all appropriate instances across the system.

"The test cases we created up front gave us confidence to make sweeping changes to Equity One’s reporting methodology," stated Agile.Net’s Aufgang. "We confirmed the data integrity of the reports instantly by running the tests. The Altova XML tools were vital to the new system. Leveraging them provided us the most efficient way to design and maintain the reports over the long term."

Of course, the success of any project is best measured by the client. Comments from Equity One’s vice president and CIO, Ilan Zachar, validate Agile.Net’s efforts: "Most of our leasing and property managers do not need to access our database application anymore," Zachar said. "They can run reports and get access to the data they need from our intranet. This process is much easier than the one we used before. The platform is extremely stable and allows us to modify the reports with great ease as well as add new ones. We are looking forward to adding many more to our list of reports."

Find out how StyleVision can help with your data integration challenge... Download a 30-day trial now!

Note This project was also covered in more detail and with code and XML examples by asp.netPRO magazine.