Welcome!

Weblogic Authors: Yeshim Deniz, Elizabeth White, Michael Meiner, Michael Bushong, Avi Rosenthal

Related Topics: Weblogic

Weblogic: Article

Building Adaptive Applications With Reusable Components

Building Adaptive Applications With Reusable Components

Building Adaptive Applications With Reusable Components

Two daunting tasks face application architects and project managers alike.The first is to architect a solution that will reduce the risks involved with implementing new and changing business requirements during the application development and post-application deployment stages of a project. The second is to architect a solution that will reduce the development time and increase the corporation's Return on Investment (ROI) in past projects by reusing prebuilt visual and business components

BEA WebLogic Portal 4.0 contains frameworks designed to allow the creation of adaptive applications using visual, data-cleansing, and business components reaped from previous application development projects. The Webflow and Pipeline frameworks enable developers to dynamically link together reusable components that follow the Model-View-Controller (MVC) design pattern.

Webflow Framework
The Webflow framework is designed to build Web applications that can adapt to changing Web-business requirements. The main controller behind the Webflow framework is the WebflowExecutor class (see Figure 1). The WebflowExecutor intercepts events emanating from a visual, input processor or business component, consults with a centralized XML-based application scenario file; and invokes the next predefined visual, input processor or business component.

The XML-based application scenario file enables the decoupling of application components, which is key to developing adaptive applications with reusable components. During runtime, each component sends an event type and location identifier to the WebflowExecutor via the WebflowServlet. The WebflowExecutor then determines the next component in the sequence to execute. The runtime determination of sequence flows by the WebflowExecutor allows the developer to simply modify the scenario file in order to alter the business flow of the online application. The alteration of the sequence file may include rearranging existing links between components, removing existing components, or adding new components. The ability to add and remove components in an application that uses the Webflow and Pipeline frameworks without any code modifications is made possible by using the provided JSP Webflow tag libraries (in the case of visual components) and by implementing the appropriate interfaces (in the case of input processors and pipeline components).

Visual Components
The visual components that can be used in the Webflow framework are JSP and HTML pages. The only supported events that visual components can generate are hyperlinks and forms. In the case of JSP pages, the developer need only inform the Webflow servlet of the event type and origination ID, which would then be forwarded to the WebflowExecutor. JSP helper tag libraries are provided to help the developer in developing JSP pages, as shown below.

<a href="<webflow:createWebflowURL origin="checkout.jsp" event="link.continue" httpsInd="http"/>"> Check Out </a>

The example above is invoked when the user selects that corresponding hyperlink, in which case the origin ID ("checkout.jsp"), the event type ("link.continue"), and the protocol to be used ("http") are sent to the Webflow servlet. In the case of HTML visual components, the visual component developer would pass the Webflow servlet the same information as a JSP visual component. However, since JSP tag libraries are not usable in HTML pages, the information has to be explicitly placed in the appropriate format, as shown below:

<a href=http://localhost:7501/example/
application?namespace
=order&origin=checkout.jsp&event=link.continue> Check Out</a>
The fact that destinations aren't hard-coded in each visual component allows the developer to rearrange the site map without having to modify JSP or HTML code.

Input Processor Components
In order to ensure that the information being sent to the business components is valid and well-formatted, a data-cleansing step should be added to the execution flow. InputProcessors are specialized Java classes that can be used to perform the data-cleansing task. To add an InputProcessor to the Web application scenario, a developer would simply implement the InputProcessor interface or extend the InputProcessorSupport class (see Figure 2), and link the InputProcessor to the appropriate components in the XML-based scenario file.

The InputProcessor developer may also use an implementation of the ValidatedValues interface to report back to the visual component the results of the completed data-cleansing task. The visual component developer can then access the status of each form field via the JSP tag. In addition to cleansing data, InputProcessors can also be used to perform conditional branching within a Web application where, depending upon the branching logic contained in the InputProcessor, the return value will tell the WebflowExecutor which visual or business component to execute next.

After the InputProcessor completes its processing, a return object is sent back to the WebflowExecutor. The return object, coupled with the knowledge of the InputProcessor type, allows the WebflowExecutor to determine the next component to execute by referring to the XML-based scenario file. Similar to the visual components, hard-coded links to other components are not implemented in the InputProcessors, which allow the developer to reuse data-cleansing and conditional-branching components, and provides the ability to change the application's behavior without recoding.

Pipeline Framework
The Pipeline framework is designed to build business applications that can adapt to changing business requirements. The framework follows the Pipe-and-Filter architectural pattern and works in conjunction with the Webflow framework. After the WebflowExecutor has consulted the XML-based application scenario file and determined that a pipeline needs to be executed, control is handed over to the PipelineExecutor to execute the pipeline. After completion of the pipeline invocation, control is handed back to the WebflowExecutor to determine which components in the application sequence to invoke next. It's important to understand that all the components in the Webflow and Pipeline frameworks can be linked together in any sequence and that information may be shared between these components through the PipelineSession object.

Pipeline
The PipelineExecutor serves as the controlling class in the Pipeline framework, handling the linkage and exceptions between pipeline components. The pipeline components in the Pipeline framework are essentially business components that perform the required business functionality. Each pipeline can be composed of a sequence of one or more pipeline components and exceptions can be generated by any of the pipeline components. These exceptions can either be fatal, which stops the processing of the pipeline, or nonfatal, which allows the next component in the sequence to be invoked. A pipeline can also be wrapped in a single transactional context, allowing the components in the pipeline to act as one atomic unit of work. As with the WebflowExecutor in the Webflow framework, the PipelineExecutor references a pipeline scenario script to determine which pipeline component to invoke next, given a specific event and origination.

Business Component
The business components that can be linked together in a single pipeline may consist of Java and Stateless Session EJB classes. The business component (i.e, pipeline component) is generally used to execute coarse-grain business logic or integrate to existing back-end systems.

To add a business component to the pipeline sequence, a developer would simply implement the PipelineComponent interface or extend the PipelineComponentSupport class (see Figure 3), and link the business component implementation to the other business components in the XML-based pipeline scenario file.

In order to allow the sharing of information in a pipeline, the PipelineSession object is passed between business components via the required Process method implementation. The PipelineSession object can also be contained within the same transactional context as the components in the pipeline itself.

GUI Editor Tool
Since the XML-based scenario files are integral to the Webflow and Pipeline frameworks, the ability to create and edit these files is incorporated into the WebLogic Portal GUI tool, the E-Business Control Center (EBCC). Each framework has its own specialized drawing area (see Figures 4 and 5) and multiple scenario files are differentiated via a namespacing scheme. The visual editing tool is very easy to use with drag-and-drop, zoom, scenario-linking, and attribute-editing features. The ability to graphically create an application by linking together visual and business components from a corporation's certified IT application component library is a powerful step in building adaptable applications in a substantially reduced time frame.

Conclusion
The Webflow and Pipeline frameworks, which are part of the BEA WebLogic Portal product, address the need for an architecture that is able to adapt to changing business requirements and improve ROI by enabling the reuse of application components.

By simply implementing the required framework interfaces, visual, data-cleansing, and business components can easily be linked together to form a fully functional application. This application can then be adapted to address new business functionality by visually relinking new or existing components from previous projects. Additionally, the implementation of the MVC design pattern provides the separation between the presentation logic and the underlying business processes, thus allowing the ability to modify any one of the tiers without impacting the others.

More Stories By Dwight Mamanteo

Dwight Mamanteo is a technical manager with the Global Alliances Technical Services
organization at BEA Systems. He has been with BEA since 1999 and his current
job responsibilities include providing technical enablement support to BEA's
strategic SI and ISV partners. He has
been involved with object-oriented programming, design and architecture since 1993.

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.


@ThingsExpo Stories
The 22nd International Cloud Expo | 1st DXWorld Expo has announced that its Call for Papers is open. Cloud Expo | DXWorld Expo, to be held June 5-7, 2018, at the Javits Center in New York, NY, brings together Cloud Computing, Digital Transformation, Big Data, Internet of Things, DevOps, Machine Learning and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding busin...
Smart cities have the potential to change our lives at so many levels for citizens: less pollution, reduced parking obstacles, better health, education and more energy savings. Real-time data streaming and the Internet of Things (IoT) possess the power to turn this vision into a reality. However, most organizations today are building their data infrastructure to focus solely on addressing immediate business needs vs. a platform capable of quickly adapting emerging technologies to address future ...
Nordstrom is transforming the way that they do business and the cloud is the key to enabling speed and hyper personalized customer experiences. In his session at 21st Cloud Expo, Ken Schow, VP of Engineering at Nordstrom, discussed some of the key learnings and common pitfalls of large enterprises moving to the cloud. This includes strategies around choosing a cloud provider(s), architecture, and lessons learned. In addition, he covered some of the best practices for structured team migration an...
No hype cycles or predictions of a gazillion things here. IoT is here. You get it. You know your business and have great ideas for a business transformation strategy. What comes next? Time to make it happen. In his session at @ThingsExpo, Jay Mason, an Associate Partner of Analytics, IoT & Cybersecurity at M&S Consulting, presented a step-by-step plan to develop your technology implementation strategy. He also discussed the evaluation of communication standards and IoT messaging protocols, data...
With tough new regulations coming to Europe on data privacy in May 2018, Calligo will explain why in reality the effect is global and transforms how you consider critical data. EU GDPR fundamentally rewrites the rules for cloud, Big Data and IoT. In his session at 21st Cloud Expo, Adam Ryan, Vice President and General Manager EMEA at Calligo, examined the regulations and provided insight on how it affects technology, challenges the established rules and will usher in new levels of diligence arou...
In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, led attendees through the exciting evolution of the cloud. He looked at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering m...
In his session at 21st Cloud Expo, Raju Shreewastava, founder of Big Data Trunk, provided a fun and simple way to introduce Machine Leaning to anyone and everyone. He solved a machine learning problem and demonstrated an easy way to be able to do machine learning without even coding. Raju Shreewastava is the founder of Big Data Trunk (www.BigDataTrunk.com), a Big Data Training and consulting firm with offices in the United States. He previously led the data warehouse/business intelligence and B...
Recently, REAN Cloud built a digital concierge for a North Carolina hospital that had observed that most patient call button questions were repetitive. In addition, the paper-based process used to measure patient health metrics was laborious, not in real-time and sometimes error-prone. In their session at 21st Cloud Expo, Sean Finnerty, Executive Director, Practice Lead, Health Care & Life Science at REAN Cloud, and Dr. S.P.T. Krishnan, Principal Architect at REAN Cloud, discussed how they built...
22nd International Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, and co-located with the 1st DXWorld Expo will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud ...
22nd International Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, and co-located with the 1st DXWorld Expo will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud ...
DevOps at Cloud Expo – being held June 5-7, 2018, at the Javits Center in New York, NY – announces that its Call for Papers is open. Born out of proven success in agile development, cloud computing, and process automation, DevOps is a macro trend you cannot afford to miss. From showcase success stories from early adopters and web-scale businesses, DevOps is expanding to organizations of all sizes, including the world's largest enterprises – and delivering real results. Among the proven benefits,...
@DevOpsSummit at Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, is co-located with 22nd Cloud Expo | 1st DXWorld Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time to wait...
Cloud Expo | DXWorld Expo have announced the conference tracks for Cloud Expo 2018. Cloud Expo will be held June 5-7, 2018, at the Javits Center in New York City, and November 6-8, 2018, at the Santa Clara Convention Center, Santa Clara, CA. Digital Transformation (DX) is a major focus with the introduction of DX Expo within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive ov...
SYS-CON Events announced today that T-Mobile exhibited at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. As America's Un-carrier, T-Mobile US, Inc., is redefining the way consumers and businesses buy wireless services through leading product and service innovation. The Company's advanced nationwide 4G LTE network delivers outstanding wireless experiences to 67.4 million customers who are unwilling to compromise on qua...
SYS-CON Events announced today that Cedexis will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Cedexis is the leader in data-driven enterprise global traffic management. Whether optimizing traffic through datacenters, clouds, CDNs, or any combination, Cedexis solutions drive quality and cost-effectiveness. For more information, please visit https://www.cedexis.com.
SYS-CON Events announced today that Google Cloud has been named “Keynote Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Companies come to Google Cloud to transform their businesses. Google Cloud’s comprehensive portfolio – from infrastructure to apps to devices – helps enterprises innovate faster, scale smarter, stay secure, and do more with data than ever before.
SYS-CON Events announced today that Vivint to exhibit at SYS-CON's 21st Cloud Expo, which will take place on October 31 through November 2nd 2017 at the Santa Clara Convention Center in Santa Clara, California. As a leading smart home technology provider, Vivint offers home security, energy management, home automation, local cloud storage, and high-speed Internet solutions to more than one million customers throughout the United States and Canada. The end result is a smart home solution that sav...
SYS-CON Events announced today that Opsani will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Opsani is the leading provider of deployment automation systems for running and scaling traditional enterprise applications on container infrastructure.
SYS-CON Events announced today that Nirmata will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Nirmata provides a comprehensive platform, for deploying, operating, and optimizing containerized applications across clouds, powered by Kubernetes. Nirmata empowers enterprise DevOps teams by fully automating the complex operations and management of application containers and its underlying ...
SYS-CON Events announced today that Opsani to exhibit at SYS-CON's 21st Cloud Expo, which will take place on October 31 through November 2nd 2017 at the Santa Clara Convention Center in Santa Clara, California. Opsani is creating the next generation of automated continuous deployment tools designed specifically for containers. How is continuous deployment different from continuous integration and continuous delivery? CI/CD tools provide build and test. Continuous Deployment is the means by which...