P2P Tools Target Microsoft Office Data Sharing, Integration

Moves by Microsoft and competing ISVs seem to be setting the stage to bring web services-type data sharing to desktop applications. Learn more about the latest P2P sharing technologies to help enterprise developers build programs enabling end users to more easily access and share Microsoft Office files (in Word, Excel and Access).

Tags: Developers, Open Source, Ross, Sharing, BadBlue, Web Services, Technology,

A new peer-to-peer sharing technology has cropped up to help enterprise developers build programs enabling end users to more easily access and share Microsoft Office files (in Word, Excel and Access).

Atlanta-based BadBlue is shipping an upgrade to its ShareOffice library for its Open Source-based P2P packages. With these upgrades, PHP and Perl developers have a simple-to-use data sharing toolset that makes it easier to access Microsoft Office data through lower level data. Developers can download a free Personal Edition from BadBlue.

BadBlue's CTO Doug Ross told Integration Developer News that early reception of BadBlue Enterprise Edition product has been strong between both Open Source and traditional commercial developers -- mainly because the product intends to bridge the worlds of free/Open Source with traditional commercial software.

"We have a peer to peer web server, and one of our early audiences was Open Source developers who had adopted our package for PHP and Perl development on Windows," Ross said. But, as the product has matured to embrace Word, Excel and Access, BadBlue has attracted mounting interest from corporate developers.

"Those corporate developers looking for ways to unify their desktop audiences for creating reports were not sold on Open Source, per se, but were just looking for ways to get at the data without expensive or complicated integration projects."

Release of BadBlue's latest release comes at desktop sharing is becoming more a focus of Microsoft. As BadBlue was shipping its latest version, Microsoft announced it had acquired XDegrees, another P2P software firm bent on making it easier for enterprise users to share files and data. XDegrees consists of a naming system and a distributed database that allows peers to resolve resource names. XDegrees manages these services for customers on its own hosts, and sells its software to enterprises so they can define and run their own namespaces on in-house servers.

Building Desktop Web Services
"This is web services for the desktop," Ross told IDN. With BadBlue, a PHP developer can go out to 25 desktops running Excel and call via web services from all the spreadsheets, he said, but the complexity of enacting the web service is hidden.

BadBlue's latest version the ability to read Word documents or portions of them, including Excel or Access files, into your PHP variables in a single function call. The ShareOffice library comes with all PHP source-code and can retrieve files on your local or remote PCs running BadBlue. The 300K package also supports functions like SOExcel, SOAccess, and SOWord, and even SOHTTPGet that allows you to get a document/web page from a remote source. Add-ons make it completely SOAP compliant and BadBlue is tracking methods to improve interoperability with XML RPC.

In ShareOffice, an easy single call can be used to open all the desktop spreadsheets, read out the data, put the data into an array and then close the spreadsheets. The array indexes the data by spreadsheet cell, so it creates a type of object with attributes even though the data itself is flat file data, according to Ross.

ShareOffice, which runs locally on each PC intended to share data, lets a user mark a spreadsheet, denoting the data for sharing and share it over the web. The data is automatically displayed in the browser and rendered into HTML. But BadBlue's ShareOffice lets developers do much more than simply view data.

"More and more, developers tell us they want to warehouse, model or analyze their data," said Ross. Even more ambitious, Ross said some IT departments actually want to access data from multiple applications across multiple desktops and re-assemble that data into a single report or document..

As developers become more familiar with the capabilities of BadBlue, Ross said he sees signs that corporate developers are warming up to Open Source options. This is especially true where Open Source can offer support for data sharing, integration and the building of "smart portals" that offer users live updates of certain data from a central web server/web page. When users are expecting a structure, they can build objects from it. Users can also reassemble data objects into new documents, such as building patient records from a medical report or an invoice from multiple line items.

One BadBlue user is www.partnumberplease.com, an online inventory management portal. This "peer-to-peer" inventory search engine application allows for real-time searches for parts across multiple sites, part numbers, SKUs and other similar information. The data is captured from multiple sites and locations and then dumped into an array, which in turn allows developers to create a multi-site inventory summary in HTML, PDF or any other format.

Desktop Sharing -- Code Up Close
The key is a two-step process for extracting and rendering the data. "The first part of the rendering to HTML flattens the two dimensional matrix of cells," said Ross. "Then we've built upon that a very simple-to-use library which lets you take advantage of that flattened array. So, it's not just an object, its an item from an array."

The program is COM-based technology, and developed at the C++ level, so the idea of objects, characteristics and attributes is implicit in the program, but developers don't need to know OLE (Object Linking and Embedding), COM (Common Object Model) or even much about PHP to accomplish the sharing.

Traditional Open Source technologies had not been able to support lower-level access to Windows-based applications such as Microsoft Office. "Open Source support for OLE or COM really hasn't been that strong in Open Source offerings," Ross told IDN. "There simply was a gaping hole in integrating a popular server side technology with the fundamental building blocks of the Office file format."

In a Q&A from BadBlue's website, Ross added this insight about the company's use of Open Source for data sharing: "In PHP, we've got a scripting technology designed expressly for markup language and the web," he said.

In a single function call, a developer can read an entire block of cells from a spreadsheet, update a spreadsheet, read an Access table or query, and even capture a data set from a Word document or a web page. Here's an example of how easy the ShareOffice library can remotely read an Excel spreadsheet [This example reads a set of cells, (A1 through K35) and then displays the contents of two cells (A3 and D17):]
   $arrayExcelData = array();

$errmsg = SOExcel("", "path3", "Invoices.xls", 1,
$arrayExcelData, "A1", "K35");
if (strlen($errmsg)) {

echo("SOExcel Error: ".$errmsg);

} else {

echo("Cell A3: ".$arrayExcelData["A3"]);

echo("Cell D17: ".$arrayExcelData["D17"]);

Pushing the P2P Envelop
We asked Ross if developers weren't skeptical about the "hidden" aspects of BadBlue technology and whether they want to see the code and how it works. As it turns out, the answer is no. "At the end of the day, people aren't worried about the object models being used, or SOAP envelops and XML-RPC," Ross said. "If they can make a very simple program that gets the data they need, and be able to share that data as a web service, that's what gets their attention."

In fact, Ross said he thinks the developers' growing interesting in finding what works as opposed to being wedded to a special technology will bolster Open Source for data sharing moving forward.

"There are many Open Source options that are cropping up in the type of desktop sharing space now targeted by commercial products such as Lotus Teamspace workflow product," Ross said. "Altogether, you've got a powerful case building for the use of all sorts of PHP-based tools for commercial collaboration and data integration."