Ajs 1 c
- 1. Collaborate
Knowledge Byte
In this section, you will learn about:
• Network communication in a distributed environment
• Application integration using XML
• Various legacy integration technologies:
• Screen scraping
• Object mapping tools
• Off-board servers
©NIIT Collaborate Lesson 1C / Slide 1 of 25
- 2. Collaborate
Network Communication in a
Distributed Environment
• A network allows communication in a distributed environment.
• Unnecessary and poorly timed network communication affects the performance
of a system.
• The factors that affect the performance of network communication are:
• Bandwidth: Refers to the amount of data that can be transmitted over a
network connection.
• Request Latency: Specifies the time elapsed in completing a network
communication.
• Request frequency: Specifies the use of network bandwidth.
©NIIT Collaborate Lesson 1C / Slide 2 of 25
- 3. Collaborate
Network Communication in a
Distributed Environment (Contd.)
• To effectively use the bandwidth, you can send the data in large packets.
• You can reduce the request frequency by carefully designing the GUI and the
remote APIs.
• You can optimize the use of bandwidth by using HTTP compression.
• HTTP Compression is an approach to compress HTTP content before sending
the content across the Web.
• You can reduce the load on the network by compressing the data sent across
the Web.
• You can use a third party tool, such as Websense Enterprise Bandwidth
Optimizer (WBO) for better utilization of the bandwidth.
• WBO enables you to reduce and optimize network bandwidth resources by
assigning priority and managing network traffic.
©NIIT Collaborate Lesson 1C / Slide 3 of 25
- 4. Collaborate
Application Integration Using XML
• XML has the ability to describe, manipulate, and transform data that allows
different types of enterprise systems to communicate with each other.
• XML provides a mechanism for mapping data models between a J2EE
application or an XML application and the data store of a remote system.
• The tools, XSLT and XQuery are used to restructure XML data to be used by a
J2EE application.
• An XSLT engine can restructure XML data into any arbitrary format and XQuery
may enhance the structure of the data by grouping, joining, and sorting the
XML data.
• XSLT and XQuery also allow an application to manipulate the data retrieved
from the remote data store.
©NIIT Collaborate Lesson 1C / Slide 4 of 25
- 5. Collaborate
Application Integration Using XML
(Contd.)
• Data Level Integration :
• An application may read data from a remote repository of XML files at the
data level integration.
• When the application retrieves one or more files, it performs an XSLT
transformation to convert the data in a meaningful format for the
application.
• The transformation requires only an XSL stylesheet that can be easily
modified if the source or target output format of data changes.
©NIIT Collaborate Lesson 1C / Slide 5 of 25
- 6. Collaborate
Application Integration Using XML
(Contd.)
• Data Level Integration (Contd.):
• The following figure shows the XML and data level integration:
• A Web service is described in XML using the Web Services Definition
Language (WSDL).
• Web services provide an approach to integrate to legacy systems.
©NIIT Collaborate Lesson 1C / Slide 6 of 25
- 7. Collaborate
Various Legacy Integration
Technologies
• Legacy integration means the integration of a J2EE application with a legacy
system.
• You can use the functionality of an existing system using the legacy
integration.
• Various legacy integration techniques and tools are:
• Screen Scrapping
• Object Mapping Tools
• Off-board Servers
©NIIT Collaborate Lesson 1C / Slide 7 of 25
- 8. Collaborate
Various Legacy Integration
Technologies (Contd.)
• Various legacy integration techniques and tools are (Contd.):
• Screen Scrapping:
• Is a technique used to integrate a GUI with an existing legacy
system.
• Is used in applications where the client interface is tightly
coupled with the business logic and data store.
• Is a software tool that transforms a legacy client interface into
objects that are used to build the new client GUI.
©NIIT Collaborate Lesson 1C / Slide 8 of 25
- 9. Collaborate
Various Legacy Integration
Technologies (Contd.)
• Various legacy integration techniques and tools are (Contd.):
• Screen Scrapping (Contd.)
• The following figure shows the working of a screen scraper:
• A screen scraper works as a terminal emulator for the legacy
application and an object interface for a J2EE application.
©NIIT Collaborate Lesson 1C / Slide 9 of 25
- 10. Collaborate
Various Legacy Integration
Technologies (Contd.)
• Various legacy integration techniques and tools are (Contd.):
• Screen Scrapping (Contd.)
• The screen scraper collects the information from the legacy
client terminal fields and makes the data available via an
object.
• The advantage of screen scraping is that it provides a low-level
object-based interface to a legacy application.
• The disadvantage of screen scrapping is that it is brittle.
• Any change to the legacy interface can cause the integration
solution to break.
• The GUIs built upon the screen scraper are prone to errors
resulting from unexpected outputs generated by the legacy
client interface.
©NIIT Collaborate Lesson 1C / Slide 10 of 25
- 11. Collaborate
Various Legacy Integration
Technologies (Contd.)
• Various legacy integration techniques and tools are (Contd.):
• Object Mapping Tools:
• Are used to integrate a legacy system, if it is possible to ignore
the legacy system interface.
• Directly access the business tier and data store of the legacy
system.
• Help you to map the legacy system functions as objects to
access them.
• Create proxy objects to access the legacy system functions and
make the functions available in an object-oriented form.
©NIIT Collaborate Lesson 1C / Slide 11 of 25
- 12. Collaborate
Various Legacy Integration
Technologies (Contd.)
• Various legacy integration techniques and tools are (Contd.):
• Object Mapping Tools (Contd.)
• The advantage of object mapping tools is that they are not
dependent on the format of the output generated by the legacy
client interface.
• The object mapping tools are not prone to errors resulting from
unexpected outputs generated by the legacy client interface.
• You can also use object mapping tools to upgrade business
logic and data stores.
©NIIT Collaborate Lesson 1C / Slide 12 of 25
- 13. Collaborate
Various Legacy Integration
Technologies (Contd.)
• Various legacy integration techniques and tools are (Contd.):
• Off-board Servers
• An off-board server acts as a proxy for a legacy application.
• The server communicates with a legacy application using
custom protocols supported by the legacy application.
• The use of off-board server preserves the legacy code and
increases the service provided by the legacy application.
©NIIT Collaborate Lesson 1C / Slide 13 of 25
- 14. Collaborate
From the Expert’s Desk
In this section, you will learn:
• Best Practice on:
• Performing Risk Mitigation at the Beginning of a Project
• Layered Enterprise Application Development
• Tips and Tricks on:
• Distinguish Appropriate from Inappropriate Techniques for
Providing Access to a Legacy System
• FAQs on Legacy Systems
©NIIT Collaborate Lesson 1C / Slide 14 of 25
- 15. Collaborate
Best Practices
Performing Risk Mitigation at the Beginning of a
Project
• The risk associated with the application development process increases with
the increase in complexity.
• You can mitigate the risks associated with a project by identifying the risk at
the beginning of the project.
• You can reduce risks by:
• Improving knowledge: You should gather all the information about a
project.
• Giving scope for recovery time: You should provide some recovery time
in a project to handle sudden risks.
• Involving clients in the early stage of a project: The response of the
client to a user interface or key capabilities of the project can reduce
the time of modifying the project.
©NIIT Collaborate Lesson 1C / Slide 15 of 25
- 16. Collaborate
Best Practices (Contd.)
Layered Enterprise Application Development
• You should separate the components of an application into layers.
• The components in each layer should be cohesive and at the same level of
abstraction.
• Each layer should be loosely coupled to the layers below it.
• The development process of an application should start at the lowest layer.
• Layers divide the functionalities of an application and decouple business
logic.
• Layers provide a common place for preprocessing and post-processing of
requests and responses, such as logging, translations, and transformations.
©NIIT Collaborate Lesson 1C / Slide 16 of 25
- 17. Collaborate
Best Practices
Layered Enterprise Application Development
(Contd.)
• Two types of layering are strict layering and relaxed layering.
• In strict layering, components in one layer can interact only with component
in the layer immediate below it.
• In relaxed layering, a component can interact with components from any
lower layer.
• The common layers for an enterprise application are:
• Presentation layer: Displays end user interface components and handles
end user requests.
• Business layer: Handles the application specific business logic.
• Data Layer: Provides services, such as database connectivity,
messaging systems, and transaction management.
©NIIT Collaborate Lesson 1C / Slide 17 of 25
- 18. Collaborate
Best Practices (Contd.)
Layered Enterprise Application Development
(Contd.)
• The advantages of layered applications are:
• Provide improved flexibility and extensibility due to the low coupling and
high cohesion between layers.
• Enable other applications to use the functionality provided by a layer.
• Improve scalability and performance by distributing the layers over
multiple tiers.
• The disadvantages of layered development are:
• The overhead of passing through layers instead of directly calling a
component can affect the performance of an application.
• The development process may take longer time if the layering prevents
user interface components to directly interact with the database.
• Changes to lower-level layers affect the higher level layers when
relaxed layering is used.
©NIIT Collaborate Lesson 1C / Slide 18 of 25
- 19. Collaborate
Tips and Tricks
Distinguish Appropriate from Inappropriate
Techniques for Providing Access to a Legacy
System
• J2EE systems that access existing EIS should avoid accessing the resources
directly from multiple locations.
• Multiple access may entangle the business logic with the implementation
details of an EIS.
• A Data Access Object (DAO) pattern provides transparent access to the data
store in order to retrieve and store data.
• You can use the DAO design pattern to encapsulate access to EIS resources
and prepare for migration to a JCA-based interface.
©NIIT Collaborate Lesson 1C / Slide 19 of 25
- 20. Collaborate
Tips and Tricks (Contd.)
Distinguish Appropriate from Inappropriate
Techniques for Providing Access to a Legacy
System (Contd.)
• If no JCA class is available, then you can use DAO classes to represent the
EIS system as an abstract resource.
• You can change the EIS resource by only modifying the DAO layer of the
J2EE application.
• When a connector becomes available for the EIS resource, you can replace
the existing DAO implementation with an implementation that dispatches
calls to the connector.
©NIIT Collaborate Lesson 1C / Slide 20 of 25
- 21. Collaborate
FAQs
• How can you access a legacy database that supports ODBC from a Java
applet?
You can use a resource adapter that internally uses JDBC-ODBC bridge driver
to provide access to the database from a Java applet. You can also use the
JDBC and ODBC-capable database middleware to provide connectivity to the
database.
• What are the differences between the use of object mapping and screen
scrapers in providing access to legacy systems?
Object mapping does not directly reads data from the legacy system
interface. As a result, it is less prone to errors in the legacy system interface.
Screen scrapers are prone to errors resulting from unexpected outputs
generated by the legacy system interface. A screen scraper works as a
terminal emulator and provides a low-level object-based interface to a legacy
application. Object mappers do not provide terminal emulation.
©NIIT Collaborate Lesson 1C / Slide 21 of 25
- 22. Collaborate
FAQs (Contd.)
• How is database middleware used to access legacy database?
The database middleware enables Java applications to access legacy
databases. The database middleware translates data between JDBC and the
drivers supported by the legacy database to provide connectivity. You can
access the database even if it does not support JDBC.
• What is Java-to-Com bridging?
You may need to perform interoperability between Component Object Model
(COM) and Java platform in an application. You can use bridging schemes for
the Java to COM interoperability. A Java-to-COM bridge enables COM objects
to access Java classes and Java classes to access COM objects. Examples of
Java to COM bridge are EZ Jcom and Bridge2Java.
©NIIT Collaborate Lesson 1C / Slide 22 of 25
- 23. Collaborate
Challenge
1. An ORB uses ________ protocol to communicate with different vendors.
2. _________ is the ability to manage a system to ensure the availability and
performance of the system.
3. You need to install a plug-in in a Web browser to use Java WebStart
applications. (True/False)
4. Push-based data-level integration pushes data into a database of another
application. (True/False)
©NIIT Collaborate Lesson 1C / Slide 23 of 25
- 24. Collaborate
Challenge (Contd.)
1. Match the following:
Protocol Features
a. DCOM i. Well-established protocol that is firewall-
friendly and stateless, so that if servers fail
between requests, the failure may be
undetected by clients.
b. CORBA ii. Heterogeneous objects are not supported.
c. RMI iii. Heterogeneous objects are supported.
d. HTTP iv. Works best in Windows environment.
©NIIT Collaborate Lesson 1C / Slide 24 of 25