Go to content Go to sidebar

Java Tutorials

I've been working in Java of late. One of the problems with Java is that you end up working with a bunch of tools from a bunch of places and it can be a bit tricky to get up to speed.

In keeping with the theme of Take the First Step, I've started working on some tutorials on Java Development Tools (the process is also an effective way of imprinting the information in my brain).

Ant | Hibernate | OpenEJB

Ant
Writing an Ant Build File:
  Hello World
Ant tutorial on targets, target depends and the echo task.
Writing an Ant Build File:
  Java Hello World
Ant tutorial on the javac, jar and java tasks.
Writing an Ant Build File:
  Using Properties
Ant tutorial on the use of properties to specify work directories.
Writing an Ant Build File:
  Using JUnit Part 1
Ant tutorial showing a trivial junit task example with an explicit java classpath.
Writing an Ant Build File:
  Using JUnit Part 2
Ant tutorial showing control of JUnit exit status with multiple test cases.
Writing an Ant Build File:
  Conditional Execution
Ant tutorial showing the conditional execution of targets, includes the use of JUnit test status to optionally execute targets.
Writing an Ant Build File:
  Setting Properties
Ant tutorial on setting properties, introduces the available and condition tasks.
Writing an Ant Build File:
  Java System Properties
Demonstration of the sysproperty attribute of the Ant java task.
Writing an Ant Build File:
  Modifying Property Files
Ant tutorial on modifying values in a property file with the propertyfile task.

Hibernate
So you want to learn Hibernate A simple [and useless] console application using Hibernate. Presents a simple ant build file.
Controlling Hibernate output with Log4J A still simple [and useless] console application using Hibernate and Log4J. A property is used to direct hibernate log output to either System.out or a log file.
A Persistent Collection with Hibernate Simple application to create and retrieve a persistent collection.
Hibernate Prototyping with the BeanShell Using the BeanShell to interact with Hibernate.
Adding a Hibern8IDE browser The Hibern8 IDE is a quick'n'dirty Hibernate query tool and a pretty slick way to view your persistent data store.
Cascading actions from Parent to Child A set of BeanShell sessions that demonstrate the behavior of a many-to-many relationship for different values of the cascade attribute.

OpenEJB
Getting Started with OpenEJB The OpenEJB Hello World example is a good place to get started, but I kept looking for an ant build file. Here is my version of that build file.
A Simple Entity Bean with OpenEJB A simple entity bean with ant build file. This example uses HSqlDB and provides a custom Home query method.


Weblog Customization

TextPattern
Textpattern and custom_url_func
Using htaccess and custom_url_func to implement an alternate permlink mode that supplements the standard Textpattern permlink mode.
Index Pages in Textpattern
Using htaccess and a Textpattern section to provide "static" index pages with clean urls.
Surrounding Articles Redux
Generate a list of articles that were posted before and after the article being viewed. Handle a day request similarly in year-month-day-title permalink mode.
TextPattern 1.19γ

The following articles apply to an previous version of Textpattern and my attempts to add a default section to it.

Adding a default section
Add a default section that includes all articles
Default Section Permalinks
Generate default section aware permalinks
Recent Articles
Generate a default section aware list of recent articles
Surrounding Articles
Generate a default section aware list of articles that were posted before and after the article being viewed
Radio Userland
Entry Drafts in Radio Userland
Create a draft category for work in progress
Accessing weblogData.root
Access your weblog data through weblogData.root
The Current Post
Find the date associated with the page being rendered and the oldest post on that page.
Local Macros and Loops
Use a local macro to retrieve post titles
Categories and Post Links
Handle categories and retrieve post permalinks
The myRecentTitledPosts Macro
A complete macro to display posts originally published around the date associated with a page.
Styling myRecentTitledPosts with CSS
Use CSS to control the presentation of the myRecentTitledPosts macro
Working Copy of Your Radio Weblog
Use Apache Virtual Hosts to create a local working copy of your Radio Weblog

Content Management Systems

What is a Content Management System? A Content Management System manages the process by which content is created, stored, retrieved, and prepared for distribution. Typical reasons for deploying a CMS include: to streamline or automate an existing process, to promote the reuse and repurposing of content, and to control the distribution of content.

Why is CMS so Confusing? The concept of a Content Management System may seem simple, but understanding the CMS market can be hard. The underlying problem is that both the range of problems that can be addressed by a CMS and the range of content that can be managed by a CMS are quite large. Consequently, there is often disagreement whether an product is a CMS and there is often disagreement about what content is.

What's the Deal with XML for Content Management? It seems that XML is in the process of taking over the technology world and content management is no different. While most everyone else is interested in the exchange of data via XML, CM is focused on the separation of content from presentation and access to content structure.

What's the Relationship between a Portal and a CMS? A portal aggregates information from multiple sources. It is meant to alleviate information overload by providing a common interface to interact with those sources. A content management system (CMS) is simply a potential information source. The two are often confused because most portal software includes some CMS capability and most CMS software includes some portal capability.