Welcome!

Microservices Expo Authors: Elizabeth White, Derek Weeks, Mehdi Daoudi, Don MacVittie, John Katrick

Related Topics: Microservices Expo, Machine Learning

Microservices Expo: Article

Corporate Mashups: Composite Applications Simplified Through AJAX and SOA

Real-World AJAX Book Preview: Corporate Mashups: Composite Applications Simplified Through AJAX and SOA

This content is reprinted from Real-World AJAX: Secrets of the Masters published by SYS-CON Books. To order the entire book now along with companion DVDs for the special pre-order price, click here for more information. Aimed at everyone from enterprise developers to self-taught scripters, Real-World AJAX: Secrets of the Masters is the perfect book for anyone who wants to start developing AJAX applications.

Corporate Mashups: Composite Applications Simplified Through AJAX and SOA

In this chapter we'll look at rapidly implementing an AJAX Rich Internet Application that leverages various XML and SOAP Web Services while using the visual tools and application objects from TIBCO Software's AJAX toolkit: TIBCO General Interface. Download TIBCO General Interface at www.tibco.com/mk/gi.

What's Old Is New Again
Corporate mashups? The idea of putting information stored in various application systems on a single screen for the end user isn't new. When Yahoo! first popularized the Web portal, people suddenly had the experience of seeing information from different places on one screen and businesses quickly caught on to the portal concept.

Not surprisingly, providing composite views of data is often central to business operations. More than ever composite views of information are core to securities trading, shipping and logistics, telecommunications, customer service call centers, and other industries' primary operational activities. Of course providing this capability has been technically challenging to achieve atop previous generations of application architectures that were largely monolithic systems generally incompatible with one another. And so the integration software market came into being - an entire industry segment dedicated to getting the heterogeneous landscape of business information technology systems to work together.

Then as now the leading strategy for breaking down the barriers between systems has been "decoupling" - separating the production and consumption of information in systems intermediated by an independent information exchange protocol. This idea is perhaps the simplest definition of a service-oriented architecture (SOA). The key to the success of such systems is the extent to which producers and consumers can communicate using the independent information exchange protocol and be connected on a network.

Various technical approaches such as EDI, CORBA, real-time and queue-based messaging have been promoted over the years as popular ways of integrating systems. Interestingly it was in part a vision of composite views of stock exchange data that led to the creation of TIBCO Software's messaging technology in the 1980s as a way to get real-time information from disparate systems into composite view applications on securities traders' desktops.

While messaging remains at the core of enterprise integration implementations today, the global adoption of HTTP via the Web has led to XML and SOAP as prime standards for SOA implementations as well. Today XML, RSS, SOAP, and other forms of HTTP-based services, combined with the AJAX capabilities of the Web browser, provide a way to create a new generation of rich Internet applications that "mash up" information into a new lighter-weight and lower-cost class of composite applications.

Where Is This AJAX/SOA Approach Applicable? One of the things that AJAX affords is the ability, at least in part, to manage state on the client. This is advantageous since many Web services are implemented as stateless. The RSS feed you request doesn't remember what it gave you last time. An XML or SOAP service typically gets a request message and provides a response. Since these services aren't going to maintain state for you, you can now do it at the client. So implementing simple workflows at the client is feasible. Creating dashboards where portions of the screen update asynchronously is possible. Providing 360-degree views of customer information from multiple services becomes an easier task even so far as to merge data from one service with data from another service at the client.

Managing 100% of the end-user state on the client wouldn't be appropriate if you have long-running workflows, typical of Business Process Management systems, or sophisticated business logic that requires access to session and state. There's already plenty of infrastructure out there for that in Business Process Management (BPM) suites, rules engines, and Web application server products.

In cases where managing some state on the client makes sense, you can achieve remarkably highvalue solutions in just a little time mashing up Web services into AJAX rich Internet applications.

Let's take a look at how.

Anatomy of a Typical System
Figure 13.1 shows a typical implementation of a system with an AJAX application running in an HTML page served by a Web server asynchronously communicating back to that server when certain client-side events happen. The view in the browser is updated by JavaScript commands that manipulate DOM and CSS. JavaScript event bindings to DOM and CSS capture mouse and keyboard events invoking other JavaScript commands.

In the browser, the XMLHTTPRequest (XHR) object, which puts the "asynchronous" in the AJAX acronym, restricts communications to the sub-domain from which the HTML page it contains was served. Therefore, to the extent that various Web services reside in the same sub-domain as the Web server, no special server configuration is necessary.

When Web services reside in a remote domain or other sub-domain, those services must be proxied through the sub-domain from which the AJAX application was served. Since the Web server provides a gateway to services, it's also an opportune point at which to implement authentication and security policies.

Some AJAX implementations use iFrames or JavaScript Object Notation (JSON) to access information beyond the sub-domain directly from the browser. From a security point-of-view, such multisecurity domain access forces authentication policies to become distributed and so may represent more implementation challenges. Of course if you're not authenticating or securing services, then these methods may be easier. However, in business applications the security of information is more critical than in "mashup" solutions, like Google Maps and all the various overlays that combine public information. In business some information has to remain private, even compartmentalized to various groups of users. Accordingly, a central place for administering these policies becomes useful over time when creating corporate mashups. While a Web server can provide the basics, we've already seen multiple successful uses of AJAX and SOA where a more robust portal infrastructure provides the middle tier for application provisioning, personalization, and access control to both the AJAX applications and Web services. But that discussion would be grounds for a whole other chapter...so let's keep on moving towards our baseline implementation.

Use Case: 360-Degree Customer View
Figure 13.2 shows the application we'll build: a 360-degree view of a customer in a personal banking scenario. In this case a financial advisor needs rapid access to a broad range of current and historic customer information to provide service.

The primary use case consists of these basic steps:

  1. The user finds a customer through a modal dialog configured to talk to an HTTP GET-based service that returns customer information in a basic XML document.
  2. When a customer is selected, the customerID is broadcast to the GUI, data, and communication objects in the AJAX application.
  3. Objects subscribing to the customerSelected event subject receive the customerID triggering asynchronous calls to various services, some of them SOAP-based, others RSS and miscellaneous XML.
  4. As data from the services arrives, it is transformed into a Common Data Format (CDF is explained below) and put into the client-side data cache. Each time this happens a "success" event for that service call is broadcast.
  5. Objects subscribed to the success event for that call, handle it by repainting their onscreen view, using the new information in the data cache.
Implementation Strategy
We'll implement this case using TIBCO General Interface (GI), which provides multiple features that help implement more robust AJAX/SOA applications faster. With TIBCO General Interface, speed to implementation is achieved by minimizing the amount of coding required. First is through an extensible set of out-of-the-box components that are ready to use so you don't have to create them from scratch in DHTML and JavaScrip; second is through visual tools that let you simply configure many aspects of your application, leaving only the client-side interaction logic of the task to writing code. We'll use the following visual utilities in TIBCO General Interface (GI) in our implementation:
  • Visual WYSIWYG Layout Tools: With GI you don't create GUIs by coding DHTML tags. Instead you instance and configure JavaScript objects that know how to render the rich GUI controls for you. While you can instance these objects programmatically via the JavaScript APIs to GI's objects, TIBCO General Interface Builder provides a WYSIWYG drag-and-drop GUI construction capability. These components can be saved in XML files for later reuse in other projects and can include data, logic, and service bindings to make them "AJAX-lets" unto themselves.
  • Client-Side Data Objects and Data Cache: GI features a data cache on the client. This inmemory cache runs in the context of the current HTML page. You can store one or more XML data objects in this cache and make that data available to other GUI components and application functions. GI GUI components all implement rendering routines that expect data in what GI calls the Common Data Format (CDF). CDF is simply an open schema for describing any data. Since many of GI's components implement interfaces to CDF, a single CDF document can drive multiple views of that data, streamlining client-side scripting and supporting mashup-type implementations. To get data in and out of the CDF format, you can use the programmatic APIs of GI's CDF class object or use the visual service binding tools.
  • Visual Service Binding Tools: GI features drag-and-drop binding to XML- and SOAP-based services in its XML Mapper Utility. So if you're connecting to RSS, SOAP, or other XML services, you can eliminate significant coding here as well. The Mapper lets you transform client-side data in GUI components or data objects to and from the message formats required by the various services you're using. The XML Mapper Utility also enables single-click generation of pre-bound form elements from your XML message schemas. Once the bindings are defined in the visual tool, an execution script is generated for you to paste in your application logic, then modify to script the behaviors you want.
  • Client-Side Publish and Subscribe: Besides bindings for GUI events such as drag-and-drop, mouse actions, and key presses, GI implements a client-side publish-and-subscribe notification system. Similar to server-based message buses, GI's "pub/sub" capability lets an object be published to all the other objects that subscribe to the subject property of the published object. By implementing this technique, a component can broadcast a "customerSelected" event subject, passing the customerID to one or more subscribing objects, each of which can implement their own handler for that event and its data.
Getting Started
To get started you'll need to have two things in place: a locally running copy of TIBCO General Interface and the starter code for this project.

TIBCO General Interface Professional Edition is free for development, testing, and public deployment and features a dual-licensing program for smaller private or enterprise-grade use. You can download it from http://developers.tibco.com

The starter code for this project can be downloaded at http://developer.tibco.com. Search for Real-World AJAX: Secrets of the Masters. The code and installation instructions are available. Once you've downloaded and installed TIBCO General Interface and the starter code, you should see the following:

The project is comprised of a series of files as shown in Figure 13.4

We've already built out the various GUI components and screen layouts for you. The GUI component file appCancas.xml provides the primary layout and references the other GUI component files, enabling you to create your applications in reusable modules. Modularizing applications results in faster loading and rendering times in the way that Microsoft Word loads some of its DLL functionality upfront, then more DLLs later when you need them. The GUI components in the c360 project were modeled by dragging-and-dropping items from the Component Library onto the canvas of a component file, arranging the components hierarchically, and configuring them using either drag-and-drop sizing or the Properties palette.

The JavaScript files consist of logic.js, which contains the client-side interaction logic for the project.

The Mapping Rules have two "mapping" files that define the bindings between the various components of the client application and the various services with which they communicate.

The XML documents in the Project Files contain dummy data for the portions of the project that are simply mocked up at this time.

This content is reprinted from Real-World AJAX: Secrets of the Masters published by SYS-CON Books. To order the entire book now along with companion DVDs, click here to order.

More Stories By Kevin Hakman

Kevin Hakman is Director of Evangelism for Aptana, Inc., makers of the popular Aptana Studio web development suite. As early as 2001 Kevin was pioneering AJAX web applications via General Interface, a full AJAX development and GUI toolkit which he co-founded, and later sold to TIBCO Software in 2004. Kevin is a contributor to AJAXWorld Magazine, and has spoken at numerous AJAX industry events.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


@MicroservicesExpo Stories
"I focus on what we are calling CAST Highlight, which is our SaaS application portfolio analysis tool. It is an extremely lightweight tool that can integrate with pretty much any build process right now," explained Andrew Siegmund, Application Migration Specialist for CAST, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Admiral Calcote - also known as Lee Calcote (@lcalcote) or the Ginger Geek to his friends - gave a presentation entitled Characterizing and Contrasting Container Orchestrators at the 2016 All Day DevOps conference. Okay, he isn't really an admiral - nor does anyone call him that - but he used the title admiral to describe what container orchestrators do, relating it to an admiral directing a fleet of container ships. You could also say that they are like the conductor of an orchestra, directing...
The past few years have seen a huge increase in the amount of critical IT services that companies outsource to SaaS/IaaS/PaaS providers, be it security, storage, monitoring, or operations. Of course, along with any outsourcing to a service provider comes a Service Level Agreement (SLA) to ensure that the vendor is held financially responsible for any lapses in their service which affect the customer’s end users, and ultimately, their bottom line. SLAs can be very tricky to manage for a number ...
Our work, both with clients and with tools, has lead us to wonder how it is that organizations are handling compliance issues in the cloud. The big cloud vendors offer compliance for their infrastructure, but the shared responsibility model requires that you take certain steps to meet compliance requirements. Which lead us to start poking around a little more. We wanted to get a picture of what was available, and how it was being used. There is a lot of fluidity in this space, as in all things c...
Gaining visibility in today’s sprawling cloud infrastructure is complex and laborious, involving drilling down into tools offered by various cloud services providers. Enterprise IT organizations need smarter and effective tools at their disposal in order to address this pertinent problem. Gaining a 360 - degree view of the cloud costs requires collection and analysis of the cost data across all cloud infrastructures used inside an enterprise.
Some people are directors, managers, and administrators. Others are disrupters. Eddie Webb (@edwardawebb) is an IT Disrupter for Software Development Platforms at Liberty Mutual and was a presenter at the 2016 All Day DevOps conference. His talk, Organically DevOps: Building Quality and Security into the Software Supply Chain at Liberty Mutual, looked at Liberty Mutual's transformation to Continuous Integration, Continuous Delivery, and DevOps. For a large, heavily regulated industry, this task...
DevOps promotes continuous improvement through a culture of collaboration. But in real terms, how do you: Integrate activities across diverse teams and services? Make objective decisions with system-wide visibility? Use feedback loops to enable learning and improvement? With technology insights and real-world examples, in his general session at @DevOpsSummit, at 21st Cloud Expo, Andi Mann, Chief Technology Advocate at Splunk, explored how leading organizations use data-driven DevOps to clos...
The goal of Microservices is to improve software delivery speed and increase system safety as scale increases. Microservices being modular these are faster to change and enables an evolutionary architecture where systems can change, as the business needs change. Microservices can scale elastically and by being service oriented can enable APIs natively. Microservices also reduce implementation and release cycle time and enables continuous delivery. This paper provides a logical overview of the Mi...
The notion of improving operational efficiency is conspicuously absent from the healthcare debate - neither Obamacare nor the newly proposed GOP plan discusses the impact that a step-function improvement in efficiency could have on access to healthcare (through more capacity), quality of healthcare services (through reduced wait times for patients) or cost (through better utilization of scarce, expensive assets).
Gone are the days when application development was the daunting task of the highly skilled developers backed with strong IT skills, low code application development has democratized app development and empowered a new generation of citizen developers. There was a time when app development was in the domain of people with complex coding and technical skills. We called these people by various names like programmers, coders, techies, and they usually worked in a world oblivious of the everyday pri...
The “Digital Era” is forcing us to engage with new methods to build, operate and maintain applications. This transformation also implies an evolution to more and more intelligent applications to better engage with the customers, while creating significant market differentiators. In both cases, the cloud has become a key enabler to embrace this digital revolution. So, moving to the cloud is no longer the question; the new questions are HOW and WHEN. To make this equation even more complex, most ...
Some journey to cloud on a mission, others, a deadline. Change management is useful when migrating to public, private or hybrid cloud environments in either case. For most, stakeholder engagement peaks during the planning and post migration phases of a project. Legacy engagements are fairly direct: projects follow a linear progression of activities (the “waterfall” approach) – change managers and application coders work from the same functional and technical requirements. Enablement and develo...
The past few years have brought a sea change in the way applications are architected, developed, and consumed—increasing both the complexity of testing and the business impact of software failures. How can software testing professionals keep pace with modern application delivery, given the trends that impact both architectures (cloud, microservices, and APIs) and processes (DevOps, agile, and continuous delivery)? This is where continuous testing comes in. D
Modern software design has fundamentally changed how we manage applications, causing many to turn to containers as the new virtual machine for resource management. As container adoption grows beyond stateless applications to stateful workloads, the need for persistent storage is foundational - something customers routinely cite as a top pain point. In his session at @DevOpsSummit at 21st Cloud Expo, Bill Borsari, Head of Systems Engineering at Datera, explored how organizations can reap the bene...
The dynamic nature of the cloud means that change is a constant when it comes to modern cloud-based infrastructure. Delivering modern applications to end users, therefore, is a constantly shifting challenge. Delivery automation helps IT Ops teams ensure that apps are providing an optimal end user experience over hybrid-cloud and multi-cloud environments, no matter what the current state of the infrastructure is. To employ a delivery automation strategy that reflects your business rules, making r...
SYS-CON Events announced today that Synametrics Technologies will exhibit at SYS-CON's 22nd International Cloud Expo®, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Synametrics Technologies is a privately held company based in Plainsboro, New Jersey that has been providing solutions for the developer community since 1997. Based on the success of its initial product offerings such as WinSQL, Xeams, SynaMan and Syncrify, Synametrics continues to create and hone in...
Kubernetes is an open source system for automating deployment, scaling, and management of containerized applications. Kubernetes was originally built by Google, leveraging years of experience with managing container workloads, and is now a Cloud Native Compute Foundation (CNCF) project. Kubernetes has been widely adopted by the community, supported on all major public and private cloud providers, and is gaining rapid adoption in enterprises. However, Kubernetes may seem intimidating and complex ...
You know you need the cloud, but you’re hesitant to simply dump everything at Amazon since you know that not all workloads are suitable for cloud. You know that you want the kind of ease of use and scalability that you get with public cloud, but your applications are architected in a way that makes the public cloud a non-starter. You’re looking at private cloud solutions based on hyperconverged infrastructure, but you’re concerned with the limits inherent in those technologies.
For DevOps teams, the concepts behind service-oriented architecture (SOA) are nothing new. A style of software design initially made popular in the 1990s, SOA was an alternative to a monolithic application; essentially a collection of coarse-grained components that communicated with each other. Communication would involve either simple data passing or two or more services coordinating some activity. SOA served as a valid approach to solving many architectural problems faced by businesses, as app...
Many IT organizations have come to learn that leveraging cloud infrastructure is not just unavoidable, it’s one of the most effective paths for IT organizations to become more responsive to business needs. Yet with the cloud comes new challenges, including minimizing downtime, decreasing the cost of operations, and preventing employee burnout to name a few. As companies migrate their processes and procedures to their new reality of a cloud-based infrastructure, an incident management solution...