Loading...

Wednesday, January 26, 2011

Web 2.0 Solutions with Oracle WebCenter 11g (book review)

by Fábio Souza

Hello People! This was supposed to be a post to celebrate the new year, but, as you all can notice, the things didn't happen the way I was expecting (again haha). Today I will talk about this strategic product and (as promised) I will make my review about the book Web 2.0 Solutions with Oracle WebCenter 11g.

About WebCenter

The Goal
Today we interact with content/information on the internet not just as a spectator, but also as a collaborator: we help on the knowledge construction in a dynamic way. This can be done when you put “Like” in something that your friend is saying on the Facebook, when you write an article on Wikipedia or when you post your comment on your favorite blog. All this meta-information, in some way, helps to spread the knowledge and to make it be easier to be found.
To make this possible in the business world, we need a next-generation enterprise workplace: a portal that leverages Web 2.0 technologies, user-focused and community-centric. The goal is to tie together people, ideas, content, processes, systems, and enterprise applications.
The Product
Oracle WebCenter 11g is Oracle's strategical product to deal with E2.0. It provides services such as: discussion forums, wikis, blogs, and tagging, directly from the context of a portal or an application. It worth to mention that Oracle WebCenter is integrated and certified with Oracle Universal Content Management (UCM), Oracle Identity Management Suite, Oracle SOA Suite, Oracle Enterprise Manager, and Oracle eBusiness Suite, as well as PeopleSoft, Siebel, and JD Edwards enterprise applications.
The Components
Webcenter Architecture
Oracle WebCenter Framework:
It is an ADF extension that, besides including all its functionalities/facilities, contains several components that make possible (and easy) to construct a portal, as if it was a common web application. The framework uses the Oracle Metadata Services (MDS), that offers a layer to store customization data, avoiding a mix between code and metadata (The MDS is widely explored on Oracle Composer).
To put the Webcenter Framework to work, you just have to download the extension on you JDeveloper, it will make all the framework components available to be used on your own applications. Its good to remember that JDeveloper provides an integrated development environment for composite J2EE applications, business processes, BI applications, and enterprise portals.
There is some good information about JDeveloper on my previous post, check it out!
WebCenter Services:
This is the component that give access to the infrastructure that, not only turns your corporate environment into a “social network”, but take it beyond.
  • Social Networking Services - Enables users to maximize productivity through collaboration.
  • People Connection – Enables users to assemble their business networks like linked-in
  • Discussions - Provides the ability to create and participate in threaded discussion. This is an embedded version of Forums provided by Jive Software.
  • Announcements - Enables users to post, personalize, and manage announcements.
  • Instant Messaging and Presence (IMP) - Provides the ability to observe the online presence status of other authenticated users (whether online, offline, busy, or idle) and to contact them.
  • Blog - Enables blogging functionality within the context of an application. This feature comes from an embedded version of open source package jzWiki.
  • Wiki - Self-service, community, oriented-content publishing and sharing. This is an embedded version of open source package jzWiki.
  • Shared Services - Provides features for both social networking and personal productivity.
  • Documents - Provides content management and storage capabilities, including content upload, file and folder creation and management, file check out, versioning, and so on. This functionality requires licensing of a JCR (JSR-170) compliant document repository product.
  • Links - Provides the ability to view, access, and associate related information; for example, you can link to a solution document from a discussion thread.
  • Lists - Enables users to create, publish, and manage lists. (Available only in WebCenter Spaces)
  • Page - Provides the ability to create and manage pages at runtime.
  • Tags - Provides the ability to assign one or more personally relevant keywords to a given page or document. This feature is similar to the del.cio.us website.
  • Events - Provides group calendars, which users can use to schedule meetings, appointments, and any other type of team get-together. This feature requires deployment of a separate calendaring server, which may be Oracle Beehive or Microsoft Exchange. (Available only in WebCenter Spaces)
  • Personal Productivity Services - Focuses on the requirements of an individual, rather than a group.
  • Mail - Provides integration with IMAP and SMTP mail servers to enable users to perform simple mail functions such as viewing, reading, creating, and deleting messages, creating messages with attachments, and replying to or forwarding existing messages.
  • Notes - Provides the ability to "jot down" and retain quick bits of personally relevant information. (Available only in WebCenter Spaces)
  • Recent Activities - Provides a summary view of recent changes to documents, discussions, and announcements.
  • RSS - Provides the ability to publish content from WebCenter Web 2.0 Services as news feeds in RSS 2.0 and Atom 1.0 formats. In addition, the RSS service enables you to publish news feeds from external sources on your application pages.
  • Search - Provides the ability to search tags, services, an application, or an entire site. This makes use of a license limited version of Oracle's search product.
  • Worklist - Provides a personal, at-a-glance view of business processes that require attention. These can include a request for document review and other types of business process that come directly from enterprise applications.
The WebCenter Services benefits can be reaped by the whole Webcenter Suite Portal stack*:
  • Oracle Portal
  • Oracle WebLogic Portal
  • Oracle WebCenter Interaction
* There are some restrictions
Oracle Composer:
Oracle Composer is an innovative component that enables any application or portal to be customized (changes that affects the general visualization) or personalized (changes made by a person that affects the that person's own visualization) after it has been deployed and is in use. The personalizations/customizations are managed by Oracle Metadata Services (MDS). Oracle Composer is designed to be extremely easy to use so that business users and end users can edit any page with a few clicks of the mouse. Oracle Composer runs in all modern browsers and provides a rich, dynamic way to edit JSF application and portal pages.
The developers can use the Webcenter Framework to design portal applications that uses Oracle Composer.
Oracle WebCenter Spaces:
A ready-to-use application that pulls together all the WebCenter features:
  • Webcenter Services
  • Webcenter Composer
  • Oracle MDS
  • Easy to integrate with applications developed with Webcenter Framework
  • Easy to integrate with any other application (actually this can be achieved using the Oracle ADF Model layer)
The focus is to empower teams to quickly and efficiently manage their information, applications, projects, and people. Oracle WebCenter Spaces is prepared to work effectively with project teams and work groups, including teams that span multiple geographies or include external members.
Notes
A new release of Oracle Webcenter Suite 11g is already available. This post does not cover the new features/changes.

Web 2.0 Solutions with Oracle WebCenter 11g – Book Review

Introduction
Web 2.0Oracle Webcenter 11g is a very new product and because of that there are few books talking about it. Web 2.0 Solutions with Oracle WebCenter 11g is a very practical book that presents the main concepts of WebCenter. The book has around 250 pages, 10 chapters and lots of illustrations that make the reading very soft, fast and easy. There is also a source code (for download) that may help to accomplish the exercises that come with the book.

Some concepts (overview) that can be found in the book:
  • Web 2.0
  • Enterprise 2.0
  • Oracle WebCenter Suite
  • ADF Faces
  • ADF Business Components
  • Forum
  • Wiki
  • Blog
  • Search in enterprise applications
  • Organization with Tagging and Linking
  • RSS
Public
The book aims Java/Portal Developers who want to try the very first steps with WebCenter. The book helps to understand how the components work and how the main available tools can be used. It is a great book for those that are starting with ADF and WebCenter. If you already have tried by yourself the development of simple applications with Oracle WebCenter, certainly you will skip some chapters, but, if you have a good experience with the product, the book definitely is not for you.
What caught my attention
  • The book is practical guide to give the first steps in the WebCenter World
  • The “Hello World” application is very “sophisticated”, and its idea is to show a typical enterprise application architecture.
  • The book comes with a good material about Discussions, Wiki, and Blog Services
What I missed the most
  • Although it is not the focus of the book to go into questions of sophisticated software architecture, it could indicate sources to readers who want to take the next steps.
  • The book does not goes inside the ADF Task Flow subject, it only mentions it.
Chapters Overview
Chapter 1, What is Oracle WebCenter?
  • Introduction to Web 2.0, Enterprise 2.0 and Oracle WebCenter Suite
Chapter 2, WebCenter Installation and Configuration
  • Presents the "Webcenter Component Building Blocks"
  • Walkthrough to install the WebCenter Suite in a development environment.
Chapter 3, Setting up the Development Environment
  • Walkthrough to install JDeveloper + WebCenter Plugin + SVN
Chapter 4, Getting Started with WebCenter Development
  • Development of a sophisticated “Hello World” application, composed of a webservice, consumed by a portlet, consumed by a WebCenter application. This application gives a good idea of a real WebCenter application.
Chapter 5, Design and Personalization
  • Presents the ADF Faces Rich Client
  • ADF Faces components overview
  • Presents the ADF Business Components
  • Shows the development of a WebCenter Application:
    • View Layer: Constructed with ADF Faces, it is composed by a template and a JSF page
    • Model Layer: Constructed with ADF Business Components, it uses the schema that comes with the book (can be downloaded at the packt website)
Chapter 6, Portlets
  • Talk about the types of portlets you can build with WebCenter
  • Shows the portlet development with ADF and JSF Bridge
    • View Layer: Constructed with ADF Faces, it is composed by a JSF page, exposed as a portlet –> The page uses ADF Data Visualization Components! Very cool!
    • Model Layer: Constructed with ADF Business Components, it uses the same schema that comes with the book
  • After the portlet creation it is shown how to consume it
Chapter 7, Discussions, Wiki, and Blog Services
  • Presents the concepts about Forum, Wiki and Blog
  • Presents and shows how to use ADF TaskFlows to consume Discussion Services
  • Lists the ways to use Wiki and Blog. There are examples of two of then:
    • Using an IFrame (included in a custom WebCenter application page)
    • Using the Web Clipping portlet.
Chapter 8, Search Service
  • The chapter talks about the following concepts:
    • Searching enterprise applications (in our case WebCenter applications)
    • Organizing information with tagging and linking
    • RSS and its importance
  • There is also examples using WebCenter applications to:
    • Integrate with WebCenter Tags Service (it uses ADF Security for Authentication/Authorization)
    • Integrate with the WebCenter Links Service
    • Integrate with the WebCenter RSS Service
Chapter 9, Personalization with Oracle Composer
  • Presents personalization for two different roles: developers and end users
  • As developers, we prepare a dynamic environment for end users:
    • Lists, explains and uses Composer’s components
  • As end user, we personalize the page
    • Resource Catalog Overview
    • MDS Overview
Chapter 10, Oracle WebCenter Spaces Overview
  • Presents Oracle WebCenter Personal Spaces: Practical guide to page creation
  • Presents Oracle WebCenter Group Spaces: Practical guide to group creation

Sources

I took lots of things from those sources, including whole stretches (they were perfect):
Getting Started with Oracle WebCenter 11g
Getting Started with Oracle WebCenter 11g – The Solution
WebCenter Services Capabilities
Web 2.0 Solutions with Oracle WebCenter 11g

Thursday, December 2, 2010

Happy Holidays everyone!

Wednesday, December 1, 2010

Creating a centered page layout using ADF Faces (only)

by Eduardo Rodrigues

It’s been a long time since I last posted here about my old friend: ADF. But now that I’m working in ADF BC’s awesome development team, I was already feeling the self-pressure and urge to go back to this vast subject. Let’s start easy though.

As you all might have noticed, ADF has gone a long way since it’s early days. ADF Faces 11g is quite different from its 10g predecessor. One of the differences, besides all the rich components and built-in AJAX capabilities, is the fact that some of the components that were present in 10g have moved from ADF Faces library to Apache Trinidad (or MyFaces). One of those components was the “rowLayout”. That layout component certainly makes it very easy to center its content in relation to the entire page, both horizontally and vertically. However, using Trinidad components ad tag libraries alongside with ADF Faces, although possible, may not be always desired. So, the question is: how to achieve same layout using only ADF Faces’ layout manager?

If you’re somewhat used to the particularities of ADF Faces’ layout manager, you probably already know that setting up a container that not only stretches 100% of the page’s (or of its parent container’s) height but also centers its content vertically is not as easy and straightforward as one would think.

Thinking fast, the first approach most come up with (including myself) is this:

panelStretchLayout (only center facet enabled) > panelGroupLayout (Layout = horizontal ; Valign = middle) > panelGroupLayout (Layout = vertical ; Halign = center)

Pretty intuitive and simple, right? Yes! But the layout manager doesn’t seem to agree.

The problem with this layout structure is basically the fact that a horizontal panelGroupLayout does not support being stretched inside a panelStretchLayout facet. This is actually clearly documented: http://goo.gl/GYVud

After a lot of trial-and-fail, I eventually found a way (thanks to my good friends and ADF gurus Maiko Rocha and George Maggessy).

The layout structure is this:

panelStretchLayout (top, bottom and center facets enabled; TopHeight = 33% ; BottomHeight = 33%) > panelGroupLayout (Layout = vertical ; Halign = center)

Even if you don’t need any content going in the Top or Bottom facets, it’s important to add at least an empty panelGroupLayout to both of them just to ensure the specified 33% of height will be allocated.

To wrap up, here’s a complete source code example of a page with a page-centered login form:


<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
  <jsp:directive.page contentType="text/html;charset=UTF-8"/>
  <f:view>
    <af:document id="d1" title="Login Page">
      <af:form id="f1" defaultCommand="#{'pgTplt:cbLogin'}">
            <af:panelStretchLayout id="psl1" startWidth="33%" endWidth="33%"
                                   topHeight="33%" bottomHeight="33%">
              <f:facet name="center">
                <af:panelGroupLayout id="pgl1" layout="vertical"
                                     halign="center">
                  <af:panelFormLayout id="pflLogin" rows="2" maxColumns="1">
                    <af:inputText id="itUsername" label="Username"
                                  value="#{Login.username}"/>
                    <af:inputText label="Password" id="itPassword" secret="true"
                                  value="#{Login.password}"/>
                    <af:spacer width="10" height="10" id="s1"/>
                    <af:commandButton text="Login" id="cbLogin"
                                      actionListener="#{Login.doLogin}"/>
                  </af:panelFormLayout>
                </af:panelGroupLayout>
              </f:facet>
              <f:facet name="bottom">
                <af:panelGroupLayout id="pgl2"/>
              </f:facet>
              <f:facet name="top">
                <af:panelGroupLayout id="pgl3"/>
              </f:facet>
            </af:panelStretchLayout>
      </af:form>
    </af:document>
  </f:view>
</jsp:root>

And this is how the page above should look like:


image

Wednesday, November 24, 2010

Our second official book review in on its way...

by Fábio Souza

Hi everyone, are you doing well? I'm fine, thanks for asking.
Well, I was wondering these days : "It would be a good idea to change the topic for a little while and talk about a product". It seems that someone at Packt Publishing heard me, and, to incentive myself, they invited us to write a review of a new book .
The topic is hot: Webcenter 11g. As you all know (I hope :)) this is a strategic product that arose to compete in the Enterprise 2.0 market.

The book is:
Web 2.0 Solutions with Oracle WebCenter 11g

I'm very excited to read the book, but I can already tell you some good things about it:
- Vince Casarez is one of its reviewers
- It covers all the product's main points (installation, environment setup, custom applications, and so on)
- There is a Oracle WebCenter Spaces Overview

I hope to be posting the review soon!

Ahhh! I almost forgot (kidding, I was planning it) to say that our big friend and also architect master, George Maggessy, helped the writers with his WebCenter knowledge.

See you!

Saturday, July 17, 2010

JDeveloper Overview and (book) Review

Dear visitors,
I will pretend I forgot that I'm about a year without posting anything and I will go straight to the subject that I owe to you: The review of the book "Processing XML documents with Oracle JDeveloper 11g". Before start I would like to make an introduction to JDeveloper.

About JDeveloper

Introduction

JDeveloper is the Oracle's Strategic IDE. Besides being used to develop Oracle's products it is a tool that has the goal to support all Oracle's technological stack, and also the majority of Java EE patterns and derivables. For example: you can draw a BPEL flow that orchestrates several services available in Oracle Service Bus, develop WSRP portlets that will be consumed by your Oracle Portal, implement EJBs that can be easily published like Web Services, or even build an portal that follows the E2.0 trend with Webcenter ADF components.

Main features

• Integrated enterprise development environment
• Visual and declarative editors
• Complete development lifecycle coverage
• Built-in development framework
• Advanced features for Java, Database, Web services, SOA, and Web development

Being a developer, I cannot forget to mention the powerful Oracle ADF (Application Development Framework). I will not cover details but worth it is saying that part of the framework is considered a model JSF implementation -- by the way, it was donated to the Apache Foundation -- and it has a powerful abstraction of the model layer (JSR-227) that, with the JDev's drag-and-drop-declarative interface, makes the development of lowly coupled and highly cohesive applications much simpler and more productive.

JDeveloper and Netbeans

Both IDEs are very important and their development will not stop. While support for Oracle's stack will be implemented mostly in JDev, NetBeans will continue to provide a powerful open source IDE.

License:

JDeveloper is a free tool, you don't have to purchase it. Besides, there is a runtime license required for any production application if you choose to use Oracle TopLink or the Oracle ADF. This license is already included in all editions of the WebLogic Server. Nevertheless you can use JDev for development/evaluation. There is no special license for academic/open source use, but in many cases the "Free OTN License Agreement" (check it out) for JDeveloper will cover this type of usage.

This is the information that I've found in Oracle's website (see the links at the end of the article). Remember: "license things" can and do change. Always check them first before using the product.

Curiosities

For those who are willing to know something about the JDev’s origins.

Processing XML documents with Oracle JDeveloper 11g – The Book

Introduction

In my opinion, JDeveloper 11g shows that it has reached a very good maturity with regard to dealing with XML. The idea of this book is to show us several easy-to-use out-of-the-box JDev’s features while, at the same time, it exposes fundamental concepts about XML processing.

Some concepts about XML presented by the book:

  • DOM Parser
  • SAX Parser
  • Validation with XSD
  • XML navigation using XPath
  • XML transformation using XSLT

Some JDev's features that are also presented by the book:

  • XML Edition(by code and also by its own structure)
  • Creation of XSD using drag and drop
  • Wizard to generate XMLs using XSDs
  • Automatic XML validation (using XSD)

The book has 11 chapters and each of those has a well defined scope and they can be read independently (you don't need to follow any particular order). Generally each chapter introduces a different technology with the following order: an overview, discussion about the main features and the demonstration of a practical example. The examples are very simple and made with dozens of print-screens and source codes. Although it has about 370 pages, the big part of them are used to explain these examples, what turns the book more practical than theoretical.

Public

In my vision, the book targets to two types of public:
1 - Advanced Developers: the book can introduce technologies and may be used as a quick reference guide.
2 - Novice Developers: the book introduces fundamental concepts/tools, showing them in a practical way.

What caught my attention

The book talks about several recent technologies that are in evidence. There are chapters about DOM 3.0 LS, XSL-FO, XML conversions, and also Oracle Berkley DB. For each approach concerning XML processing, the author always uses the Oracle’s Implementation (Oracle XDK). This is very interesting because it shows us features that you don’t have when using the default interfaces.

What I missed the most

There are no details about performance or even about how to choose the right technology for the right problem. And... there is no mention of StAX.
Another point to mention is that the book doesn’t talk about the tight-coupling disadvantages that exist when the Oracle XDK implementation is used instead of the default interfaces.

Chapters overview

Chapter 1: Creating and Parsing an XML Document

  • Introduction to SAX and DOM

Chapter 2: Creating an XML Schema

  • Introduction to Schema (XSD)
  • How to create a schema using the IDE and its wizards
  • How to create XML based on a schema

Chapter 3: XML Schema Validation

  • How to programmatically validate a XML document using schema

Chapter 4: XPath

  • How to use the IDE to "query" the XML using XPath
  • How to programmatically "query" the XML using XPath

Chapter 5: Transforming XML with XSLT

  • Introduction to XSLT
  • How to programmatically use XSLT
  • How to use Oracle's XSLT extension function to call Java classes (very interesting, and seems very powerful as well)

Chapter 6: JSTL XML Tag Library

  • Introduction to the JSTL XML tag library
  • How to configure a web project that uses this tag library in JDev
  • Using JSTL to parse and transform a XML document

Chapter 7: Loading and Saving XML with DOM 3.0 LS

  • What is and how to use it
  • Exposes advantages of using it

Chapter 8: Validating an XML Document with DOM 3 Validation

  • Shows the "dynamic validation", a very relevant functionality that is part of DOM 3.0 LS. This is a very important stretch that I took from inside this chapter:

Oracle XDK 11g is the only XML API that implements the DOM Level 3 Validation specification (http://www.w3.org/TR/2003/PR-DOM-Level-3-Val-20031215/); however, some of the DOM 3 Validation features are not implemented by the Oracle XDK 11g API. A test was run by W3C to determine which of the DOM 3 Validation methods are supported by the XDK 11g implementation. You can refer to the results of the DOM3 Validation test (http://www.w3.org/2003/11/26-DOM3-Val-Oracle-Result.html) when developing a DOM 3 Validation application.

Chapter 9: JAXB 2.0

  • Introduction to JAXB 2.0
  • How to use JDev to generate the JAXB classes using a schema
  • Introduction to the marshalling/unmarshalling process and to the JAXB 2.0 annotations

Chapter 10: Comparing XML Documents

  • Overview about tools that can do XML comparison/diff
  • Introduces the Oracle XDK 11g. This tool provides an API to work with comparison/diff and to automate the XSL generation. The second feature is achieved based on the original XML and the XML which we want to transform the original one into. Example: XML1 has X differences comparing to XML2. Using these X differences the API knows how to create an XSL that transforms XML1 into XML2

Chapter 11: Converting XML to PDF

  • Overview of several tools that generate PDF files
  • Short explanation about XSL-FO
  • Demonstration on how to transform a XML into XSL-FO document using XSL
  • How to use the Apache FOP API to transform a XSL-FO document into a PDF file

Chapter 12: Converting XML to MS Excel

  • Overview about several tools to read/write XLS files
  • This chapter is not like the others that introduce some standard patterns and concepts. This one just shows how to use Apache POI-HSSF to work with XLS

Chapter 13: Storing XML in Oracle Berkeley DB XML
This is a very interesting chapter because BDB XML is not a subject that is commonly discussed. It's worth to know the basics because it is an efficient way (and also fast) to store and query XMLs. Main points:

  • Overview about Oracle Berkeley DB XML ("an embeddable XML database for storing and retrieving XML documents").
  • Using BDB XML from command line (basic operations)
  • Using BDB XML with a Java API (basic operations)

Chapter 14: Oracle XML Publisher

  • Overview about Oracle XML Publisher (now it is called Oracle BI Publisher) and its advantages over the Apache FOP/Apache POI (shown on chapters 11 and 12, respectively).
  • How to use Oracle XML Publisher + XSL-FO to generate PDF (and how it is possible to generate different formats as well)
  • How to create and merge XSL-FO docs
  • How to merge PDF docs
  • How to use the "Data Engine API" to create an XML document from database data

Sources:

Processing XML documents with Oracle JDeveloper 11g
JDeveloper
JDeveloper History
JDeveloper FAQ
Oracle Java Tools FAQ