Friday, April 20, 2012

Apache Nutch & Solr integration

I was searching for good tutorial on Apache Solr and Apache Nutch integration but couldn't find any. Then I realize that there is pretty good one on (go figure!) Apache Nutch wiki page. So if you looking tutorial that will help you with Solr/Nutch integration look here.

Tuesday, April 10, 2012

Faces generator for Oracle ADF (1.0alpha)

Introduction

Previously I was talking about this generator for ADF. It is currently in such state that it is working (kind of). So I decided to publish it and see if there are ADF developers interested in something like this.

Basic idea is automatic creation of view part of ADF Fusion Web Application using model part...well as model. I suggest that you first look at videos I prepared so you can see what it is all about, and if you like it then there are installation instructions below. Please be noted that this is alpha version and therefore it is unstable.

This extension work with all JDeveloper version greater than 11.1.1.2.0. But I recommend using it with JDeveloper version 11.1.1.4.0 and newer because in previous version there was issues with "Oracle Dynamic Tabs Shell" page template. This issues present themselves as instability (random exceptions) while running Fusion Web Application. 11.1.2.1.0 is not supported for now.

First example - Shows how generator can generate almost complete view of ADF Web application.


Second example - Shows how generator changes view when you introduce LOVs into model.


Third example - Shows how changes to model are reflected on view when you for example remove or add view instances from application module


OK. So, if you want to download and try generator, here are the steps. First and most important, generator can be downloaded from here. Installation is very simple, just copy this jar file into your <Middleware Home>/jdeveloper/jdev/exstensions and that's it.

Generation consists of four parts.

1. Create Fusion Web Application and create complete model for this application. Basic ADF stuff. I suggest that you stick with defaults when wizard ask you about project names and default packages (view for ViewController and model for Model Project)

2. Initialize your ADF view project. This is necessary, because JDeveloper need to add some libraries to view project. To do this you need to create JSF page that will use "Oracle Dynamic Tabs Shell" page template and then just drag and drop random data control (one data control is enough, just to initialize it's application module in view project) from each application module you plan to use on this page. You can create multiple JSF pages for each application module but that is not necessary.

3. You need to copy some files to this newly created view project. You need to do this, because this plugin is dependent on some Java classes and predefined bindings. You can download this files from here. When you unpack them please copy them according to this pattern:
  • public_html/images/* -> ViewController/public_html/images/
  • public_html/js/* -> ViewController/public_html/js/
  • public_html/WEB-INF/adfc-config.xml -> ViewController/WEB-INF/adfc-config.xml (you can also just edit yours adfc-config.xml file and add necessary definitions).
  • adfmscr/view/AdfFacesUtil.java -> ViewController/adfmscr/view/AdfFacesUtil.java
  • adfmscr/view/Launcher.java -> ViewController/adfmscr/view/Launcher.java
  • adfmscr/view/pageDefs/NavigationPageDef.xml -> ViewController/adfmscr/view/pageDefs/NavigationPageDef.xml 

4. Final step is to run generator by right-clicking on Model or ViewController project and choose Generate ADF Faces. Then just repeat step 4 if you change anything in model, you don't need to run steps 1 - 3 anymore.

For end I will share with you final version of  complete application I use in videos. It might come in handy. Thanks and ciao. :)