Tag: Web Services

 

Web Services

Web services are self-contained, modular applications that are able to work together without relying on custom-coded connections, because they are built on open standards. Web services share a common protocol so they can communicate with each other despite the fact that they speak different languages. (more…)

Interoperability

Interoperability enables communication, data exchange, or program execution among various systems in a way that requires the user to have little or no awareness of the underlying operations of those systems. (more…)

Service-Oriented Architecture (SOA)

A service-oriented architectue (SOA) is an application framework that takes everyday business applications and breaks them down into individual business functions and process, called services. An SOA let you build, deploy, and integrate these services independent of applications and the computing platforms on which they run.

Why SOA is so hot? SOA gives us a new way to architect loosely coupled activities and tasks, enterprise business services and reusable business components, and it assumes distributed sources of functionality and information. Also, SOA makes it possible to manage heterogeneous environments easily since SOA enforces standards to drive application content reuse and implements business service repository to discover, provision, and control heterogeneous resources.

Most importantly, SOA provides a new approach to build next generation applications. Within SOA, the next generation applications are model based, process driven, context aware, extensible/adaptable, and integrated through web services.

SOA infrastructure

To run and manage SOA applications, enterprises need an SOA infrastructure that is part of the SOA platform. An SOA infrastructure must support all the relevant standards and required runtime containers. A typical SOA infrastructure should have the following pieces.

  1. WSDL, UDDI, and SOAP are the fundamental pieces of the SOA infrastructure. WSDL is used to describe the service; UDDI, to register and look up the services; and SOAP, as a transport layer to send messages between service consumer and service provider. While SOAP is the default mechanism for Web services, alternative technologies accomplish other types of bindings for a service. A consumer can search for a service in the UDDI registry, get the WSDL for the service that has the description, and invoke the service using SOAP.
  2. WS-I Basic Profile, provided by the Web services Interoperability Organization, is turning into another core piece required for service testing and interoperability. Service providers can use the Basic Profile test suites to test a service’s interoperability across different platforms and technologies.
  3. J2EE and .Net: Though the J2EE and .Net platforms are the dominant development platforms for SOA applications, SOA is not by any means limited to these platforms. Platforms such as J2EE not only provide the framework for developers to naturally participate in the SOA, but also, by their inherent nature, bring a mature and proven infrastructure for scalability, reliability, availability, and performance to the SOA world. Newer specifications such as Java API for XML Binding (JAXB), used for mapping XML documents to Java classes, Java API for XML Registry (JAXR), used for interacting with the UDDI registries in a standard manner, and Java API for XML-based Remote Procedure Call (XML-RPC), used for invoking remote services in J2EE 1.4 facilitate the development and deployment of Web services that are portable across standard J2EE containers, while simultaneously interoperating with services across other platforms such as .Net.
  4. Quality of services: Existing mission-critical systems in enterprises address advanced requirements such as security, reliability, and transactions. As enterprises start adopting service architecture as a vehicle for developing and deploying applications, basic Web services specifications like WSDL, SOAP, and UDDI aren’t going to fulfill these advanced requirements. As mentioned previously, these requirements are also known as quality of services. Numerous specifications related to QoS are being worked out in standards bodies like the World Wide Web Consortium (W3C) and the Organization for the Advancement of Structured Information Standards (OASIS). Sections below discuss some of the QoS artifacts and related standards.
  5. Security: The Web Services Security specification addresses message security. This specification focuses on credential exchange, message integrity, and message confidentiality. The attractive thing about this specification is it leverages existing security standards, such as Security Assertion Markup Language (SAML), and allows the usage of these standards to secure Web services messages. Web Services Security is an ongoing OASIS effort.
  6. Reliability: On a typical SOA environment, several documents are exchanged between service consumers and service providers. Delivery of messages with characteristics like once-and-only-once delivery, at-most-once delivery, duplicate message elimination, guaranteed message delivery, and acknowledgment become important in mission-critical systems using service architecture. WS-Reliability and WS-ReliableMessaging are two standards that address the issues of reliable messaging. Both these standards are now part of OASIS.
  7. Policy: ervice providers sometimes require service consumers to communicate with certain policies. As an example, a service provider may require a Kerberos security token for accessing the service. These requirements are defined as policy assertions. A policy may consist of multiple assertions. WS-Policy standardizes how policies are to be communicated between service consumers and service providers.
  8. Orchestration: s enterprises embark on service architecture, services can be used to integrate silos of data, applications, and components. Integrating applications means that the process requirements, such as asynchronous communication, parallel processing, data transformation, and compensation, must be standardized. BPEL4WS or WSBPEL (Web Services Business Process Execution Language) is an OASIS specification that addresses service orchestration, where business processes are created using a set of discrete services. WSBPEL is now part of OASIS.
  9. Management: As the number of services and business processes exposed as services grow in the enterprise, a management infrastructure that lets the system administrators manage the services running in a heterogeneous environment becomes important. Web Services for Distributed Management (WSDM) will specify that any service implemented according to WSDM will be manageable by a WSDM-compliant management solution.

Enterprise Service Bus (ESB)

Enterprise Service Bus (ESB) is a standards-based integration platform that combines messaging, web services, data transformation, and intelligent routing to reliably connect and coordinate the interaction of significant numbers of diverse applications across extended enterprises with transactional integrity.

In ESB, applications and event-driven services are tied together in a Service-Oriented Architecture (SOA) in a loosely coupled fashion. This allows them to operate independently from one another while still providing value to a broader business function.

Note: In J2EE (now called Java EE) world, Java Specification JSR 208 Java Business Integration (JBI) can be considered a Java standard for an enterprise service bus (ESB).

UML – What’s It?

UML stands for Unified Modeling Language. The UML provides a language-neutral, tool-supported, well-documented standard for modeling systems such as web applications. It enables system requirements, structure, and behavior to be succinctly captured and effectively communicated.

As explained by Duncan Jack in August 2005’s JDJ, UML is interpreted as:

  • Unified: The result of unifying three leading approaches to system modeling in the 1990s
  • Modeling: concerned with the simplified representation of system structure and behavior
  • Language: A language, not a methodology.

The UML is not a methodology. It is a diagram-based language. This point is important.

The UML contains 6 structure diagrams and 7 behavior diagrams. The most commonly used diagrams are:
- Use case diagram (behavior)
- Activity diagram (behavior)
- Class diagram (structure)
- Sequence diagram (behavior)

Data Integration

Data Integration is the process of accumulating and combining data set from disparate sources at various locations. This data can then be used for business intelligence, CRM, data mining, or other applications that involve the analysis of data in order to make key decisions.

Data integration incorporates a series of processes – the sequence of applications that extract data from various sources, bring them to a data staging area, and then programmatically prepare the data for migration into to data warehouse and the actual loading of the data into the data warehouse and data marts.

Data integration usually involves operations such as data conversion, cleansing, formatting and aggregation. After the data is extracted a number of transformations may be applied in preparation for data consolidation and subsequently loaded into data warehouses, data marts or dimensional data structures used for decision support systems or business intelligence systems.  The following of some of common tasks and functions of data integration:

  • Data cleansing and enrichment – Profile, cleanse, augment, and monitor data to create consistent, reliable information.
  • Extraction, transformation and loading (ETL) – Extract, transform and load data from across the enterprise to create consistent, accurate information.
  • Data migration and synchronization – Capture and propagate data changes in real-time to ensure data integrity, consistency and credibility.
  • Data federation – Query and use data across multiple systems without the physical movement of source data.
  • Data Warehousing -  Build dimensional data structure for data warehouses, data marts, business intelligence and operational data stores.
  • Data Quality – Providing the infrastructure to maintain high-quality data in house.
  • Data Consolidation – Consolidating complex, diverse, and large volumes of data into centrallized new system.
  • Connectivity and metadata management – Leverage all data, regardless of source.
  • Master data management – Creation of a unified view of enterprise data from multiple sources.

Key benefits of data integration:

- Availability of data
- Enhanced data quality
- Better manageability
- Improved decision making
- Higher return on investment (ROI)

Three Approaches to Data Integration

  1. Data Consolidation
  2. Data Federation
  3. Data Sharing (replication)

Data Consolidation

This approach consolidates heterogeneous data into a central database. It is the simplest form of data integration. Data consolidation provides fast application deployment, fast access to global data, and low administration costs.

In recent years many large-scale data integration projects have been done with data consolidation approach. Many different type of data, including audio, video, XML, email, messages, etc, had been consolidated in various platforms (Windows, Linux, Solaris, HPUX, AIX, Tru64, OpenVMS, OS/390, etc.) on centeralized Very Large Database with proven scalability.

Data Federation

This approach federates data in multiple data stores into a single virtual database. Data federation hides physical location of data from applications and provides access to both structured and unstructured data. Data federation provides fast integration and support integration of data that cannot be consolidated such as legacy applications and data requiring local ownership. Data federation is often implemented via web services.

Data Sharing

This approach was traditionally implemented as replication or message queuing. It has evolved to include warehouse loading, event notification, workflow, and EAI. The data sharing approach lets data been share between users, applications, and databases by moving or copying data as needed.

JAVA versus C#.NET from Developers Viewpoint

Java or C#.NET, that’s an endless debate. Can you have both? that’s NOT a good idea because it is not necessary, and you cannot afford it. Project managers always debate the merits of one over the other in new architecture design and upgraded system implementations. It’s very odd to see a project being built on both technologies.

Programmers and developers want to become proficient on one of the technologies to enhance their value in job market when they look for new jobs or move up within their own organizations. A developer can learn both but it’s better to focus on one to become the highly valued expert. So, which one is good for you? keep reading and hopefully you’ll get the answer.

What’s in Common

For programmers and developers who build business solution systems in mid-market and enterprise level, both Java and C# are great languages to use. In fact, when you look at the languages themselves, you will find they’re extremely close. Both Java and C# tout features like simplicity, object orientation and robustness.

Java

Developed by Sun Microsystems Inc., Java is a platform-independent, object-oriented language. Java works with a variety of server flavors, including Unix, Linux, NT and others – a breadth that C# and .NET aspire to but have not yet achieved. Java programs are not compiled; they are interpreted as they run, that’s how it delivers the “write once, run anywhere” feature.

C#.NET

Microsoft describes C# as a programming language that makes it easier for C and C++ programmers to generate COM+ ready programs with type safety, garbage collection, simplified type declarations, versioning and scalability support, and other features. C# supports attribute-based programming, operator overloading and defining custom enumerations, among other functions.

What’s the Difference

What C# is missing is Java’s double dose – Java is both a language and a platform, while C# is the language that uses the .NET platform. Java platform works on both UNIX and Windows, but C#.NET is Microsoft Windows specific.

Java and C# run in very different environments. Each of them has very unique API structures. The knowledge required to interface to the APIs is very different.

Because Java deals with platform in the language, you may need more time to learn Java. For an average programmer it takes less than a month to learn a new language, but learning the underlying platform is a much harder task and can take a couple months.

Which One to Choose for Career

As I’ve pointed out, today’s enterprise business solutions are implemented with either Java/J2EE platform or C#/VS.NET. Both Java and C# target the same application development market. Thus programmers who know either Java or C# are walking on the same career path. Because Java supports multiple OS environments, Java programmers have wider choice in career growth. For those who program C# only, their job opportunities are limited to Windows environment only.

Currently there are more Java/J2EE projects going on than C#/.NET in the industry, although C#.NET is catching up. For the foreseeable future, Java will continue to be a significant driving force in IT for large enterprises. In terms of C#, we are seeing more mid-market pilot projects in the .NET environment.

For experienced programmers, I recommend Java as the primary skill-set. Java skill is more valuable because it covers platform knowledge. Java programmers can jump onto C# quickly if there is a need in current job or in a new opportunity. Moving from Java to C# is an easier transition to make. On average, it would take about a week for those fluent in Java to get comfortable with the C# syntax and three months to get familiar with the .NET platform.

Web Services Experience

Web services are self-contained, modular applications that are able to work together without relying on custom-coded connections, because they are built on open standards. Web services share a common protocol so they can communicate with each other despite the fact that they speak different languages. (more…)

What Skills Do You Need to Jumpstart Web Services Projects

The exciting Web services technology promises to allow disparate computer systems and applications to communicate and interoperate. That’s a big deal in IT industry. Although this technology is still a work in progress, you should start to prepare yourself for this technology. When this technology matures, you should be ready to handle web services projects with enough knowledge and skills. (more…)

J2EE Design Pattern Applied – A Simple Web Tier Application Framework

Introduction

If you haven’t heard of the words Design Pattern, you are not ready to design modern software system. At least, you are behind.

In the software engineering evolution history, reusability is always one of the golden goals. There are Object-oriented (OO) programming languages such as Small Talk, C++ and Java trying to achieve the goal at the source code level. There are component-based technologies such as DCOM, CORBA and EJB trying to reach the goal at the binary level. However, software engineering is about developing a system that has high level of usability, availability, reliability, maintainability, flexibility and security. The best practice should not just focus on code or binary reuse. The reusability of the practice itself becomes essential as well.

Here comes the Design Pattern. Design Patterns are focusing on application architecture and system architecture. They are the proven best practices that can be safely applied repeatedly. One classic design pattern reference book is the Design Patterns – Elements of Reusable Object-Oriented Software, written by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides, so-called Gong of Four (GoF).

The Design Pattern is quickly recognized in the software engineering community as a powerful tool for a solid design. Its influence is rapidly spread to the new popular field, the Java world.

After Sun introduced Java 2 Enterprise Edition (J2EE), J2EE becomes widely adapted as the most promising enterprise application platform. Lead by Sun’s Java Center, a set of J2EE Design Patterns are cumulated and provided to public. Those Design Patterns are soon seen in many well-know J2EE application frameworks, from OpenSource to high-end commercial package.

In this article, along with an example, a set of most-used J2EE web-tier design patterns is introduced. The core is the Front Controller Pattern. Around it are Service to Worker Pattern, View Helper Pattern, and Dispatcher View Pattern.

J2EE Application Architecture

The J2EE application architecture is not a new invention by itself. It’s the typical post-Clent/Server web based architecture with J2EE ingredients. In theory, the architecture is the well-known Model-View-Controller (MVC). There are already enough of information about MVC these days so that we’ll get to the point here. In general, it’s a tiered architecture having clear logic and physical separation of data presentation, business logic and data sources.

The there J2EE application architecture tiers are:

o Client – the View
This is the place end user will use to interactive the J2EE based application. It could be HTML web based front-end or other type of application GUI front-end.

o Application Server – the Controller
Here resides the business logic and view-rendering module. On J2EE platform, the technologies involved are JSP/Servlet, EJB and other J2EE services such as Message Queue and Transaction Server.

o Data Source – the Model.
The data source could be just a RDBMS or large packaged systems such CRM, PDM or ERP.

J2EE Design Pattern Overview

Listed later are the J2EE design patterns that help the construction of web tier application framework. The detail definitions of these design patterns can be found at Sun J2EE Blueprint web site for design pattern:

http://java.sun.com/j2ee/blueprints/design_patterns/

A brief overview is provided for each of the patterns. We will indicate where they will be used in the sample web application framework.

Front Controller

Front controller handles all the user requests sent from client tier such a HTML form of a web page presented in browser. It’s the single point of connection between client and application server. Once the request is accept by the front controller, it will delegate the request to business logic module on the application server the handle the request, and then dispatch appropriate view back to client with data. A Front Controller can do all these internally or, by applying other design pattern, these tasks are partitioned to other pattern module on the application server, such as Service to Worker, Dispatcher View, etc.

Front Controller is recommended to be implemented as a Java Servlet.

Decorating Filter

Decorating Filter is helper design pattern that usually along with a major design pattern, such as Front Control, to achieve fine grain control and management on user request. The sample web application framework will apply this pattern to validate the authentication status of each request.

Decorating Filter can be implemented as either a Java Servlet Filter (check latest Java Servlet Specification) or internal function inside a Front Controller.

Service to Worker

As in the real world, we want assign tasks to each individual based on their skills and knowledge and expect the results coming back to a center place for organization and assembling. Service to Work pattern works the same way, user request will forward to certain module, a worker or a action module, which responses for certain task. The worker will work its way to backend data resource, directly or through other backend design pattern module, and gets the results back.

Service to Worker pattern usually works with Front Controller. The Front Controller is responsible to delegate the request to a worker module.

Service to Worker pattern is usually implemented as Java class. In the sample, we call it Action, in the meaning of an action triggered by a user request.

Dispatcher View

Dispatcher View pattern works the same way but the opposite direction of Service to Worker pattern. Once the user request has been processed, the Front Controller should return a view along with data back to user. The task can be delegated to the Dispatcher View module. Based on the user request, data or predefined dispatching strategy, the dispatcher will return an appropriate view back to user.

Dispatcher View is usually implemented as Java Class.

View Helper

View Helper is a loosely defined design pattern that can be applied many ways. In general, this pattern helps building dynamic contents for a view (JSP page) rather than let the view itself build the contents. In the sample web application framework, the View Helper will be implemented as general data bean that contains the data return by the Action (Service to Worker pattern). The view, JSP page, will present the data by accessing this data bean through the bean common interface (method).

Composite View

Utilizing the Composite View pattern is the extension of the sample web application framework. A technology representation of this pattern is to use JSP include to compose the view from different JSP source. Special dispatching strategy can be add to the Dispatcher View pattern implementation in this framework to allow the dispatcher determine how the final view will be constructed. By using this pattern, an application framework can provides more detail level of control of presentation tier.

Framework Design Goal

J2EE Design Patterns are very much framework-oriented (or software infrastructure-oriented). This is significantly different from the GoF design patterns, witch are typically applied to an application internally. The implementation of J2EE Design Patterns could easily involve multiple applications, platforms, physical servers and different type technologies. Not mention the consideration of network, Internet, security, etc.

The biggest difference between an application and an application framework is that an application can be easily build on a framework without worry about details such as how to response a user request and an framework can support many applications.

Since this article is not focusing on how to build an application framework, only several major framework design goals are discussed and demonstrated in the simple web application framework, as a sample.

Flexibility

An application framework should bed design without the ingredients of certain type of applications. A framework should be platform (OS, Application Server, etc.) independent. Since we are talking about J2EE, all these are given.

Extensibility

Building an application framework is not a one-time deal. It’s growing too, either for new functionalities or for adapting new technologies. The framework should be very easily extent without effecting the applications built upon it. By applying J2EE patterns, the robustness of the framework’s design is protected because patterns are proven repeatedly elsewhere.

Scalability

Not only an application framework supports different types of applications, but also it should support large number of applications and services on a distributed environment. The scalability issue is usually handled at the applications server and OS level. A J2EE base application framework will inherent such scalability from them.

Plugablebility

An application has its own requirements on flexibility, extensibility, etc. A framework should accommodate those requirements without forcing an application handles them by itself. The framework should allow an application to be configured to add/remove functions without rebuilding the binary. In the sample web application framework, the XML based J2EE application Deployment Descriptor is used to configure the application’s function modules.

Security

Security is becoming a essential element of architecture design in resent years because almost all applications are developed and deployed on networking environment. An application framework should provide a control point unified control of security. The J2EE pattern such the Front Controller with Decorating Filter can be applied to address this issue.