Q: How does a programmer surf the web? A: With a scraper.
There are several sites I visit periodically to track a specific set of data relevant to my interest. This rinse and repeat process quickly becomes boring and prone to error. Now I started thinking as a programmer…if only a piece of software can do this for me, I can spend the free time on drinking coffee and surfing other sites! Apparently this is pretty much what a web crawler does and more specifically “scraping” is the term used to describe targeted searches. Below is a two part video on a couple of scraping examples I’ve built and a basic tutorial on how to build your own.
Part 1: Introduction
Part 2: Implementation
To run the main class in a Linux env:
java -cp “jsoup-cronjob-pubmed.jar:lib/*” com.adfhomebrew.jsoup.cronjob.pubmed.PubMedSearchClient
One of the application I created a prototype for at work collects surveys which patients fill out. An example of a simple survey question with “branching” requirement can be related to gender. Based on that answer, only related sub questions should be posed. In order to model this dynamically(vs hard coding a survey), I had to revisit a topic from discrete math, specifically the concept of a directed graph. By implementing the underlying logic using a graph, a generic approach can be used to guide a user to fill out a survey for only relevant questions. There are many other use cases where graphs drive the underlying application logic (GPS, Clinical Informatics – SNOMED CT, Bayesian Networks, Supply Chain Delivery, etc..) and it’s up to you as the engineer to decide on the appropriate application.
Below is a short demo of the graph examples I have created:
While looking for a programmatic approach to generating a dvt:pieGraph, I noticed the collection data is slightly different compared to rendering a dvt:barGraph. After a quick search on the OTN Forum returned a thread but it looks like it was never answered entirely.
The idea for this tutorial started with a UI requirement for our system to provide navigation flexibility at runtime to various modules. Also our clinical business analysts wanted a “Site map” option to offer a global view for all our UTF pages. The solution is to simply use the XML menu model generated by JDeveloper to provide runtime rendering of the menu and the site map without repeating the underlying model code.
Below is the tutorial video:
Also check out this nice tutorial on building dynamic menus using Navigation Panes
Beyond this demo, you should be able to incorporate this component into a UI template or even a declarative component to fully leverage reuse within your application. Note that after generating and modifying the xml menu model, JDev does not know how to sync additional changes to your UTFs and you will need to update the menu model separately. Happy coding!
There were some questions regarding the PanelAccordion implementation and how to keep the tabs disclosed after a link is clicked. A simple way to do this using EL is to define an setActionListener component to the commandlink and set the ID of the parent node. Then perform a comparison within the parent node’s “disclosed” property. See the below code for reference.
Some of you mentioned to me that the 12.1.3 accordion and menu components were not working as they did in 11.1.2.x. After replicating this issue and posting it to OTN, a nice user responded with the solution:
“Developers! Developers! Developers!” … gives you an idea about how excited I am to finally have finished my latest tutorial on how to deploy an ADF application and make it publicly available. One other incentive here is it’s free cloud hosting for a year. I am certainly not here to sell you anything and there are instability issues with the service you can read about on the web but in my opinion it’s a great way to get a feel for setting up your ADF infrastructure from scratch. Hopefully this tutorial can serve as a reference for you to begin your own quest to making your ADF app available to everyone!
The key steps for setting up Glassfish with ADF Essentials has been well documented by Shay Shmeltzer. Check out his informative blog post and his youtube video on the procedure. Below are links to the video series and I apologize in advance for the poor audio quality, my pc microphone is terrible and I’ve put in an order for a new condenser mic for future recording.
Also I have listed below some long commands and related information I used for the setup.
For Cygwin/X packages:
After installing JDK, added JAVA_HOME to .bashrc file:
Mysql account creation:
CREATE USER ‘john’@’localhost’ IDENTIFIED BY ‘mypassword’;
GRANT ALL PRIVILEGES ON *.* TO ‘john’@’localhost’ WITH GRANT OPTION;
CREATE USER ‘john’@’%’ IDENTIFIED BY ‘mypassword’;
GRANT ALL PRIVILEGES ON *.* TO ‘john’@’%’ WITH GRANT OPTION;
Glassfish connection pool creation command via asadmin:
create-jdbc-connection-pool –datasourceclassname=com.mysql.jdbc.jdbc2.optional.MysqlDataSource –restype=javax.sql.ConnectionPoolDataSource –property=”user=john:password=mypassword:url=jdbc\\:mysql\\://localhost\\:3306/databasename”
That’s it! Let me know if you have any issues or found other ways to simplify any of the given steps, hit me up on twitter @wesleyfang. You can also visit my live instance at http://www.adfhomebrew.com Thanks for looking!
It’s been hard to find time between our full throttle ADF 11g development and updating content on my blog but finally after getting back from OOW13 I was inspired to spend some more time on putting together this latest bit about automated weblogic deployment. After following a pair of great tutorials by John Stegeman and Chris Muir I was able to successfully setup our own Hudson build server. Please see the below links I used for reference:
The video tutorial series is broken up to four parts and it is intended to visually guide you from beginning to end procedures for setting up your own Hudson build server. Also it ties together the above two resources and includes a couple of unmentioned settings within the ant build script. The only components that are not discussed is setting up a SVN repository & standalone weblogic server instance.
Here is the basic topology & flow of our ADF CI setup:
Developer commits their code into svn server.
Hudson server starts a job on a set time interval to poll svn for changes
Upon picking up changes, a build is kicked followed by junit/selenium tests (I will try to put together a post on this in the future).
A successful build will produce an ear file and finally it is uploaded to the standalone weblogic QA server.
Good podcast on what hudson can do for you (added 10/17/2013)
Components I am using
JDK 6u24 (bundled with JDev)
Ant 1.7 (bundled with JDev)
Below is a short 4 part video series I made showing the steps described above.
Part 1 Glassfish & Hudson install & configuration. Part 2 Create and version a simple ADF application. Part 3 Generate and modify ant build script to create ear file & undeploy/deploy tasks for weblogic. Part 4 Define a Hudson job for automatic deployment.
I realized that dubbing voice over after the video was created is actually sort of pesky as I need to sync with the recorded actions so I decided to use boring captions but in the future I will include audio. Thanks for reading and feel free to post any questions or suggestions.
It seems that I’m always behind the latest ADF Technology, just as I was wrapping up my testing of various ways to setting up a standalone WLS/ADF 11g install, Oracle releases wls/jdev 12c! Thus, if you are looking to get started with setting up weblogic/adf 12c, I highly suggest you begin your quest with the following resources:
But if you are here because you are trying to specifically configure the latest WLS 11g with ADF 184.108.40.206, then hopefully the following 3 part video can be used as reference for the install. Also, if you are trying to install ADF 220.127.116.11 on WLS 10.3.5 (the quickest way), please use this blog post.