Friday, January 28, 2011

WHICH statement for Windows

Ok... I know... Not really an ADF post...
But yesterday I got the question 'Which sqlplus is executed?'
The answer was: e:\app\ses\bin\sqlplus.exe
The return question was 'Are you sure it is??'
Lucky for me, I'm positive that there is only one copy of sqlplus.exe on the machine, as SES (Oracle Secure Enterprise Search) is the only product with an Oracle Client with it...

But what if you're not sure?
With Linux you get a nice little utility called which.
By calling which you get the location of the executable that will be executed if you would run

Windows does not have that utility... yet...
If you create the following batch (or command) file and place it somewhere in your path you do have that utility.

Paste the following code into which(.cmd):
@for %%i in ( %1 ) do @echo. %%~$PATH:i

When you enter which sqlplus.exe you'll see something like:

H:\>which sqlplus.exe
 E:\app\ses\BIN\sqlplus.exe
H:\>


See, I was right... e:\app\ses\bin\sqlplus.exe was executed...
This also works with non-executables:

H:\>which orauts.sym
 e:\app\ohs\Oracle_WT1\bin\orauts.sym
H:\>

Drawback: You need to include the extension. So if the file you look for opmnctl and you do not know the extension, you might need to search for opmnctl.exe, opmnctl.cmd and opmnctl.bat


Happy searching!

Sunday, January 23, 2011

Finally: The book review: Web 2.0 Solutions with Oracle WebCenter 11g

First of all, my sincere apologies for letting everyone have to wait so long for the review. I can list the reasons it took so long, but I think it's a better idea to just review the book...

The book is divided in 10 chapters. In these chapters 'only' two major components of WebCenter are described. Fortunately, these happen to be the two most important components, being WebCenter Framework and WebCenter Spaces. With the Oracle WebCenter Framework, developers can build custom applications and add Web 2.0 features to that application. The book guides the developer through the entire process which makes the book a good guide.

The book assumes the latest release of WebCenter as it was written. During the review period, WebCenter 11g PatchSet 3 is released, which made me redo the first 6 chapters. Besiides from some user interface differences and another implementation of the WebCenter Application in JDeveloper, the steps in the book are still very good to follow.

Chapter 1 gives an overview of Web 2.0 concepts and relates them to the enterprise, thereby introducing the term Enterprise 2.0 The chapter also briefly described Oracle WebCenter Suite in retrospect to the previous descriptions of Web 2.0 and Enterprise 2.0

Chapter 2 guides the developer through the installation of WebCenter Suite. This results in an installation which can be used in the remainder of the book and is a nice environment to experiment with the suite.
What I thought was strange is that even though the book mentions to use the SOA Suite and BPA Suite, the necessary schema's for these suites are not selected in the installation steps of the Repository Creation Utility (RCU) Later on in the book, it appears SOA and BPA Suite are not used, which is just fine. It would only make the book lose focus.

Chapter 3 guides the developer through the installation of JDeveloper, the main tool for custom Java development from Oracle.

Chapter 4 helps you to build a simple portlet and integrate the portlet in a custom WebCenter application. You cannot make any mistakes in the process, except when you deliberately deviate from the text and images. Everything is spelled out to such a level, you cannot go wrong. It has similarities with the Oracle Tutorials.

Chapter 5 introduces ADF and design components. The name of the chapter (Design and Personalization) leads to think Personalization is mentioned, but instead, it mentions Database interaction. Perosnilization comes in Chapter 9. Along with the previous chapter, it's a good start to get familiar with JDeveloper and ADF

Chapter 6 explains the different types of portlets (WSRP, JSF, OmnioPortlet, Ensemble etc) and guides you through the creation of your own ADF portlet that displays table data and one that displays a graph. These portlets, of course, a placed on a WebCenter page.

Chapter 7 explains what the Discussions, Wiki and Blog serves are and how to integrate these. Two techniques are described in detail, using an IFrame and using the WebClipping portlet. The final steps (2 or so) of the last technique are missing, but as it's pretty self explanatory, it's no problem.

Chapter 8 describes how to integrate Search capabilities to your pages. Other ways to find content is by means of Tagging, Linking and RSS feeds. All of these are described in this chapter as well. Again, with clear instructions on how to add these services to your page.

Chapter 9 explains Oracle Composer. One of the most comprehensive components in the ADF WebCenter Framework. It enables the end user to customize the application to their own need. This chapter explains how to integrate the Oracle Composer in your application and how to use it at runtime.

Chapter 10 gives a clear overview of WebCenter Spaces. It'll tell you the different type of pages (Personal, Group and Business Role) and how to manage them. The book even explains how to add users and roles and how to enable access to the different page types.

Overall
The book is very detailed and therefore good to follow for people with no experience of WebCenter, JDeveloper, ADF etc. For the bit experienced developers, it's a good reference.
I wish I had this book when I started with Oracle WebCenter Suite. It would have been a great time saver...
As mentioned previously, the setup is a bit like Oracle Tutorials as in the great detail and screenshots to support the text.
Drawback of the book is the fact that in a number of chapters a new JDeveloper application is created to hold the functionality of that chapter. If a single (or at least a minimum) of application would have been used, you would end up with an application that holds all the features discussed. However, after reading the book, it's a good exercise to integrate all features into one application.
For the (now) latest release of WebCenter (11g PS3, 11.1.1.4) this is still a very usefull book.