Microservices Expo Authors: Stackify Blog, Elizabeth White, Liz McMillan, Pat Romanski, Jason Bloomberg

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
Docker is sweeping across startups and enterprises alike, changing the way we build and ship applications. It's the most prominent and widely known software container platform, and it's particularly useful for eliminating common challenges when collaborating on code (like the "it works on my machine" phenomenon that most devs know all too well). With Docker, you can run and manage apps side-by-side - in isolated containers - resulting in better compute density. It's something that many developer...
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 ...
Your homes and cars can be automated and self-serviced. Why can't your storage? From simply asking questions to analyze and troubleshoot your infrastructure, to provisioning storage with snapshots, recovery and replication, your wildest sci-fi dream has come true. In his session at @DevOpsSummit at 20th Cloud Expo, Dan Florea, Director of Product Management at Tintri, provided a ChatOps demo where you can talk to your storage and manage it from anywhere, through Slack and similar services with...
Don’t go chasing waterfall … development, that is. According to a recent post by Madison Moore on Medium featuring insights from several software delivery industry leaders, waterfall is – while still popular – not the best way to win in the marketplace. With methodologies like Agile, DevOps and Continuous Delivery becoming ever more prominent over the past 15 years or so, waterfall is old news. Or, is it? Moore cites a recent study by Gartner: “According to Gartner’s IT Key Metrics Data report, ...
What's the role of an IT self-service portal when you get to continuous delivery and Infrastructure as Code? This general session showed how to create the continuous delivery culture and eight accelerators for leading the change. Don Demcsak is a DevOps and Cloud Native Modernization Principal for Dell EMC based out of New Jersey. He is a former, long time, Microsoft Most Valuable Professional, specializing in building and architecting Application Delivery Pipelines for hybrid legacy, and cloud ...
Many organizations are now looking to DevOps maturity models to gauge their DevOps adoption and compare their maturity to their peers. However, as enterprise organizations rush to adopt DevOps, moving past experimentation to embrace it at scale, they are in danger of falling into the trap that they have fallen into time and time again. Unfortunately, we've seen this movie before, and we know how it ends: badly.
"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.
"We view the cloud not as a specific technology but as a way of doing business and that way of doing business is transforming the way software, infrastructure and services are being delivered to business," explained Matthew Rosen, CEO and Director at Fusion, in this SYS-CON.tv interview at 18th Cloud Expo (http://www.CloudComputingExpo.com), held June 7-9 at the Javits Center in New York City, NY.
You often hear the two titles of "DevOps" and "Immutable Infrastructure" used independently. In his session at DevOps Summit, John Willis, Technical Evangelist for Docker, covered the union between the two topics and why this is important. He provided an overview of Immutable Infrastructure then showed how an Immutable Continuous Delivery pipeline can be applied as a best practice for "DevOps." He ended the session with some interesting case study examples.
In his session at Cloud Expo, Alan Winters, U.S. Head of Business Development at MobiDev, presented a success story of an entrepreneur who has both suffered through and benefited from offshore development across multiple businesses: The smart choice, or how to select the right offshore development partner Warning signs, or how to minimize chances of making the wrong choice Collaboration, or how to establish the most effective work processes Budget control, or how to maximize project result...
"DivvyCloud as a company set out to help customers automate solutions to the most common cloud problems," noted Jeremy Snyder, VP of Business Development at DivvyCloud, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
Explosive growth in connected devices. Enormous amounts of data for collection and analysis. Critical use of data for split-second decision making and actionable information. All three are factors in making the Internet of Things a reality. Yet, any one factor would have an IT organization pondering its infrastructure strategy. How should your organization enhance its IT framework to enable an Internet of Things implementation? In his session at @ThingsExpo, James Kirkland, Red Hat's Chief Archi...
In his general session at 19th Cloud Expo, Manish Dixit, VP of Product and Engineering at Dice, discussed how Dice leverages data insights and tools to help both tech professionals and recruiters better understand how skills relate to each other and which skills are in high demand using interactive visualizations and salary indicator tools to maximize earning potential. Manish Dixit is VP of Product and Engineering at Dice. As the leader of the Product, Engineering and Data Sciences team at D...
Without a clear strategy for cost control and an architecture designed with cloud services in mind, costs and operational performance can quickly get out of control. To avoid multiple architectural redesigns requires extensive thought and planning. Boundary (now part of BMC) launched a new public-facing multi-tenant high resolution monitoring service on Amazon AWS two years ago, facing challenges and learning best practices in the early days of the new service.
In his keynote at 19th Cloud Expo, Sheng Liang, co-founder and CEO of Rancher Labs, discussed the technological advances and new business opportunities created by the rapid adoption of containers. With the success of Amazon Web Services (AWS) and various open source technologies used to build private clouds, cloud computing has become an essential component of IT strategy. However, users continue to face challenges in implementing clouds, as older technologies evolve and newer ones like Docker c...
We all know that end users experience the internet primarily with mobile devices. From an app development perspective, we know that successfully responding to the needs of mobile customers depends on rapid DevOps – failing fast, in short, until the right solution evolves in your customers' relationship to your business. Whether you’re decomposing an SOA monolith, or developing a new application cloud natively, it’s not a question of using microservices - not doing so will be a path to eventual ...
We all know that end users experience the Internet primarily with mobile devices. From an app development perspective, we know that successfully responding to the needs of mobile customers depends on rapid DevOps – failing fast, in short, until the right solution evolves in your customers' relationship to your business. Whether you’re decomposing an SOA monolith, or developing a new application cloud natively, it’s not a question of using microservices – not doing so will be a path to eventual b...
We all know that end users experience the internet primarily with mobile devices. From an app development perspective, we know that successfully responding to the needs of mobile customers depends on rapid DevOps – failing fast, in short, until the right solution evolves in your customers' relationship to your business. Whether you’re decomposing an SOA monolith, or developing a new application cloud natively, it’s not a question of using microservices - not doing so will be a path to eventual ...
All organizations that did not originate this moment have a pre-existing culture as well as legacy technology and processes that can be more or less amenable to DevOps implementation. That organizational culture is influenced by the personalities and management styles of Executive Management, the wider culture in which the organization is situated, and the personalities of key team members at all levels of the organization. This culture and entrenched interests usually throw a wrench in the work...
JetBlue Airways uses virtual environments to reduce software development costs, centralize performance testing, and create a climate for continuous integration and real-time monitoring of mobile applications. The next BriefingsDirect Voice of the Customer performance engineering case study discussion examines how JetBlue Airways in New York uses virtual environments to reduce software development costs, centralize performance testing, and create a climate for continuous integration and real-tim...