Oops! The input is malformed! Web 2.0 and Business Intelligence – How Do They Fit Together? Part 2 by Mike Ferguson - BeyeNETWORK UK


 

Web 2.0 and Business Intelligence – How Do They Fit Together? Part 2

Originally published 9 January 2008

Declaration of Independence
Within this article, I will occasionally refer to products and use screenshot examples of various products as an aid to communicate specific points. These examples are chosen at random and in no way represent any endorsement on behalf of the author for any product in the marketplace.
End of Declaration
 
My first article of this series highlighted several Web 2.0 technologies, including:

  • RSS and ATOM feeds

  • Web services

  • Javascript and AJAX

  • PHP/Perl/Python scripting

  • JSON

  • Folksonomies

  • Mashups

  • Programming frameworks (e.g., Adobe Flex, DOJO, Ruby on Rails, OpenLaszlo and many others)

  • Blogs

  • Wikis

In part 1 of this Web 2.0 series, we looked primarily at web feeds such as RSS and ATOM and how they can be included as data sources in data integration to add additional data into a business intelligence (BI) system. In addition, we looked at how BI content (e.g., reports, metrics, alerts) can be rendered in RSS or ATOM feed format for consumption by other applications, portals and browsers. In this second part of my discussion on Web 2.0 and how it can impact business intelligence (BI) and performance management, I will look at more of these technologies. In particular, I want to look at the world of web services, JavaScript, AJAX, JSON, PHP and programming frameworks so that we understand how these can enhance existing business intelligence and performance management investments. Let’s start first by looking each of these, and then I’ll look at them in the context of business intelligence and performance management.

Web Services

With respect to BI web services, we are now at a point in time where the majority of major suppliers of software for the BI and performance management marketplace are offering web services support as part of their BI platforms. This means that artefacts such as queries, reports, cube slices, predictive analytic models and data integration jobs are all capable of being published as web services. Indeed, I have written extensively about this in my article, Developing a Service Oriented Architecture (SOA) for Business Intelligence. Clearly, publishing BI services means that any process, operational application and portal can request BI on-demand as part of a process or application.

JavaScript, Asynchronous JavaScript and XML (AJAX) and PHP

When you look at web applications or even web enabled BI tools, many of them have been built using a traditional architecture such as that shown in Figure 1. In this kind of setup, the application (which could be a BI tool) is server side with the user interface being made up of entire web pages dedicated to that single application. Typically, these web pages are Java server pages (JSPs) or active server pages (ASPs), depending on whether you have developed the application in Java or Microsoft .Net. For many, this way of building applications presented a problem. This problem was the fact that web applications were less functional than “fat client” desktop applications that had drag and drop and other intuitive interactive capabilities.

In the last 2 years or so, we have seen new technologies such as AJAX enter into the developers’ toolboxes to provide them with a way in which to enrich the user interface of web applications to make them more on a par with what is capable on the desktop. With AJAX, web applications can be constructed with web page user interfaces that have multiple visual components accessing multiple back end services.


Figure 1

With AJAX based applications and BI tools, we a dealing with client-side scripting, server-side scripting and either XML or JavaScript object notation (JSON) to move data between server and browser. I will discuss JSON and XML in a moment. Examples of client-side scripting languages include JavaScript, VBScript and ActiveScript. JavaScript is therefore a scripting language primarily used for client-side web development. Its standardized name is ECMAScript. It has nothing to do with JAVA, which is a different programming language. JavaScript is interpreted and compiled at run time in the browser and can be used to dynamically control the display of a web page by altering elements of a page at run time without refreshing the entire page. It can also be used:

  • Inside Adobe Acrobat PDF files to control the display of PDF file pages and make PDF files interactive

  • Outside the browser in Desktop widgets (e.g., Yahoo! Widgets)

  • Server side using JavaScript engines (e.g., SpiderMonkey, Rhino)

An example of basic JavaScript is shown in Figure 2.

Figure 2

JavaScript runs in the browser primarily, so you can see in Figure 2 that it is embedded in an HTML page. When the page gets to the browser, the JavaScript is executed. In this case, is gets the data, changes the background colour to green and then displays my name and the date. Of course it could have done much, much more than that. For example, it could have called a back end BI server and requested BI content on demand without the need to refresh the web page. This is essentially the basis of how AJAX works.

In addition to JavaScript, there are also server side scripting languages. Examples include Perl, PHP, Python and many others. PHP is probably the most popular. In a PHP script you can do a number of things. For example you can:

  • Query a DBMS and files and invoke web services to acquire data while dynamically generating content for a browser. This includes invoking BI web services.

  • Dynamically create XML or JSON documents (data) that are sent to the browser for processing by client side JavaScript & XSLT.

  • Dynamically generate HTML web pages & HTML snippets containing JavaScript which is then sent to the browser.

  • Generate JavaScript to be sent to the browser in order to:
    • Provide a rich interactive application (RIA) user interface experience.

    • Call an AJAX engine to access enterprise services to get data for parts of the web page without the need for whole page refresh.

    • Use client side XSLT to transform received XML before rendering.

    • PHP scripts can also be published as web services. This makes them easy to call from JavaScript running in the browser.

Based on what we have discussed so far, AJAX works as shown in Figure 3.

Figure 3

In Figure 3, the user requests a web page that has JavaScript embedded in it. When the web page reaches the browser, the JavaScript is executed client-side (most browsers can execute JavaScript). The JavaScript then issues a request to the AJAX engine for server side content. This request invokes a server side PHP script, which then requests the data from a back end system on behalf of the client. In the context of BI, the PHP script could invoke a BI report or query to run in order to access the required BI. The data is then sent back to the PHP script which then packages that data in XML or JSON format and sends it back to the browser. Note that the PHP script could have generated further JavaScript that would accompany that data on its way back to the browser. Upon reaching the browser, the JavaScript uses extensible stylesheet language transformation (XSLT) to dynamically (on the fly) change the parts of the web page the user is viewing.

In the context of BI, that could be changing a dashboard visual component, updating metrics or updating alerts. If a BI tool is built this way, then it can clearly offer a rich interactive experience for a user. Note however that more is possible with AJAX in that JavaScript can access other services over and above BI. Therefore, it could access collaborative content, and even collaboration services such as instant messaging for web chat and presence awareness. This means that you could do this from inside a BI report. In other words, the BI report could offer the user collaborative capability from inside the report if the BI tool leverages AJAX. More and more BI vendors are doing this today to enrich the user experience.

JSON

I mentioned JavaScript Object Notation (JSON) earlier. JSON is a lightweight data interchange format based on a subset of the JavaScript programming language. JSON represents data only and is far more compact than XML which means better performance than sending XML over the wire. This is because it takes up less network traffic, and data returned from server calls in JSON format can be parsed faster. In order to support this, scripting languages need to be capable of JSON encoding and decoding. If you don’t want to do it yourself, there are other tools to do this for you (e.g., Zend-JSON, PHP JSON). PHP (5.2 and onwards) scripts can encode data in JSON format and JSON data can be parsed and converted to JavaScript objects client-side. Figure 4 shows JSON versus XML. You can see that JSON is more compact. In the context of BI being passed back to the browser, JSON effectively speeds this up.

Figure 4

Programming Frameworks

In the midst of all this Web 2.0 hype about technologies like JavaScript, AJAX, JSON and PHP, so-called “web frameworks” are popping up all over the place. A web framework is often used to speed development by making it easier for developers and business analysts to build components. Frameworks attempt to alleviate the overhead associated with common activities used in Web development. Examples of these common activities include database access, user interface templates and session management. The way they do this is by providing libraries of pre-built components that allow you to get going rapidly in web development because most of the hard work is already done for you. A web framework consists of a number of components. Typically these are:

  • An XML file to describe visual web components

  • A script to manipulate data and control the layout of data within each component

  • A class-library of pre-built functions that can be called from the associated script logic. This may include pre-built functions for:
    • Calls to server side databases, applications and web services (e.g., BI web services)

    • Security

    • XML parsing

    • Content aggregation (e.g., RSS feeds aggregator)

    • Popular dynamic HTML (DHTML) manipulations to provide rich user interaction

Web frameworks may be written for specific languages (e.g., ASP.NET, Java, JavaScript, PHP, Perl, Python, Ruby). There are lots of web frameworks (as many as 60 or more AJAX frameworks) available for download on the web. A few examples include:

  • AJAX frameworks (e.g., AjaxAspects, Backbase, Dojo, Google Web Toolkit, Qooxdoo, Tibco General Interface)

  • Adobe Flash frameworks (Adobe Flex, OpenLaszlo)

  • Windows frameworks (e.g., Microsoft .Net 3.0 Framework)

What has all this got to do with business intelligence? These frameworks can impact on BI systems in two main ways. The first is that any of the business analysts within your organisation may choose to download any of these frameworks and start using them to rapidly develop new Web 2.0 applications and mashups that need to access BI. If the framework is an AJAX one, they will no doubt want to do this using AJAX calls to BI services on your business intelligence system. This means that even without the IT department knowing it, this may well be happening in your organisation. The second is that BI vendors are also starting to exploit these frameworks. To give you an example, look at Figure 5. Here you see an example of a Business Objects BI report in Adobe PDF format that has been built using the Adobe Flex framework.

Figure 5

Here you can see that the content in the report is made up of a number of visual components some of which are BI related and others are more unstructured content (the text on the left) and collaborative in nature (the people and interactive chat happening on the right).

With Web frameworks you build multiple visual components that can be assembled on a web page (or indeed on a document such as a PDF). The following steps are typically taken by a developer (bearing in mind that the developer could be a business analyst).

Step 1: Define the visual component(s) you want using the standard XML schema provided by the framework.

Step 2: Define the script to manipulate the contents of the visual component.

Step 3: Package the XML definition, the script and the library functions into component files (often these have a suffix of .SWF).

Step 4: Embed components in an HTML page (typically between an OBJECT or EMBED tags).

Step 5: Place HTML page on the web server and invoke it from the browser.

Figure 6 shows what happens at run time. Here, the web page created using the framework is accessed by the user. The web page is downloaded into the browser and then it operates like a classic AJAX application as described in Figure 3.

Figure 6

An example of such a framework is Adobe Flex (see Figure 7).

Figure 7

With this framework, you define visual components in something called MMXML and can also define ActionScript for client side logic. The ActionScript is executed using Adobe Flash. Well over 95% of the browsers running on the internet support Adobe Flash. Adobe also provides a development tool for people to use to rapidly create Flex web applications. This is called Flex Builder which is used to quickly build and deploy visual components on a web page, configure them in terms of look and feel and to develop ActionScript to access remote services and manipulate returned data prior to display in the browser. To make it easier to connect to web services, Adobe provide Flex Data Services that has pre-built connectors to many different sources of information. At run-time the visual components are downloaded into the browser on a web page that contains ActionScript and the ActionScript is then executed in the Flash player to access remote services such as BI via Flex Data Services. You can see the run time architecture of Adobe Flex in Figure 8.

Figure 8

In addition to web frameworks, there are also Desktop frameworks that can be used to quickly build desktop visual components (also known as widgets). Desktop visual components do not run in the browser. Instead they run on the desktop. Examples here include:

  • Apple Dashboard

  • Microsoft Windows Vista Sidebar

  • Google Desktop Gadgets

  • Yahoo! Widgets

These also can be used with business intelligence. To cite an example, I was on the Business Objects (recently acquired by SAP) website a few months back and discovered that Business Objects had built a Business Objects Labs product called BI Desktop. BI Desktop is built using the Microsoft .Net 3.0 framework that allows parts of a report (e.g., a bar chart) to be dragged out of the report viewer and onto your desktop (see Figure 9). This is possible because the framework is also running on the desktop operating system (in this case, Windows). Ideally, you would like to develop these visual components once and have them work in the browser or on the desktop. For that to happen, the framework would have to be available in both places. This is the case with the Microsoft .Net framework which, in the case of Vista, is part of the operating system. Hence the reason why we have Vista Gadgets.

Figure 9

In conclusion, JavaScript, AJAX, PHP, JSON and Web frameworks are now all being used to enhance the usability of business intelligence tools and even BI reports. What we are seeing is additional content and services also being added to BI reports to make them easier to understand and to share with others. Such technologies can exploit business intelligence by making use of BI web services to get at content on BI systems. While there are many frameworks available on the internet, several are unlikely to survive while others will start to dominate. It is therefore recommended that if you are planning to support web frameworks within your organisation, you should attempt to standardise on what frameworks you are willing to support by announcing these to your business users. In this way, you are encouraging innovation but within a controlled and governed environment rather than fuelling Wild West chaotic development on the back of Web 2.0 hype.

In my next article as part of this series, I will examine the remaining Web 2.0 technologies mentioned in this article and see how these apply to business intelligence and performance management.

SOURCE: Web 2.0 and Business Intelligence – How Do They Fit Together? Part 2

Recent articles by Mike Ferguson

 

Comments

Want to post a comment? Login or become a member today!

Be the first to comment!