Latest Episode: Facebook Authentication, Oauth, and Scribe

Screencasts about java technologies useful for getting things done.

  • Follow @javajing
Episode 21
- Dec 12, 2012
Facebook Authentication, Oauth, and Scribe
I think it's pretty cool how OAuth works to authenticate users. In this episode, we'll take a look at using the Scribe java library to authenticate a user against facebook using OAuth 2.0.

Episode 20
- Dec 03, 2012
Use Maven Overlays to manage javascript libraries
When using js libs inside java webapps, it's redundant to commit the same js lib over and over to version control and it's difficult to keep all your webapps up to date with the latest versions of js libs. Watch this episode to see how to use Maven Overlays to solve this problem.

Episode 19
- Nov 13, 2012
JAXP Streaming API for Java (StAX)
The Java Api for Xml Processing (JAXP) defines 3 ways to interact with xml. I covered SAX and DOM in previous episodes. In this episode, I'll cover the 3rd JAXP API called StAX. If you've watched the episodes on SAX and DOM, then hang in there, and after this episode, I hope you're much more comfortable with all the java/xml related acronyms.

Episode 18
- Oct 29, 2012
JAXP Simple API for Java (SAX)
JAXP, DOM, SAX, STAX. Dear lord, why so many acronyms when all I want to do is find a tag in some xml?!!! In this episode, we'll take a look at how to do just that using SAX which is one of the api's provided by the Java API for Xml Processing (JAXP).

Episode 17
- Oct 18, 2012
JAXP DOM API
Java and XML go together like peanut butter and jelly. But what's up with all the confusing acronyms?! This is the first of a series of episodes to explore each of the xml related acronyms. We'll start here with Jaxp and Dom.

Episode 16
- Sep 27, 2012
Java Objects to/from Json using Jackson
Jackson is a json library that is blazing fast and super flexible. This episode shows a simple example of converting back and forth between java objects and json using Jackson.

Episode 15
- Sep 17, 2012
Dependency "H-E-Double Toothpicks"
Dependency version conflicts can get real ugly. Maven dependency:tree and enforcer:enforce to the rescue!

Episode 14
- Sep 04, 2012
Encrypt values in properties files with Jasypt
Do you have a jdbc password in your properties file? If so (and especially if you check that file into source control) you might want to try to encrypt that password using jasypt. It's easy to do and might help you sleep better knowing that your db is safe in case a properties file ever ended up in the wrong hands.

Episode 13
- Aug 27, 2012
External Config Files using Spring
When a config or properties file is included inside a war or jar, it can be a pain to change a value. You have to update the value, redeploy the project and if customers are involved jump through more hoops. This episode demonstrates how the spring property configurer can be used to manage multiple config files, externalize those config files, and choose config files based on environment variables.

Episode 12.5
- Aug 25, 2012
Emacs Minor Mode for Finding Maven Dependencies
I noticed that I was repeating the same task over and over. I'd browse to search.maven.org, search for artifact and then copy the dependency xml into my pom.xml. Thanks to the encouragement and great guidance on how to build minor mode on http://emacsrocks.com, I was able to quickly add the ability to quickly search and add dependencies right from emacs!

Episode 12
- Aug 20, 2012
Schedule Jobs with Quartz
It's often useful to repeatedly run the same program on a schedule. Quartz provides a powerful engine that's simple to use for scheduling programs anyway you can dream up. Use Quarts to write programs to periodically generate reports, send out email notifications, or, as demonstrated in this episode, check to make sure all the links on your site work.

Episode 11
- Aug 10, 2012
Use Generics to Reduce Boilerplate
Generics Rock. In this episode I want to share how I used generics to boil down a bunch of repetitive, boilerplate unit test code to be much less verbose and easier to use. Instead of dreading writing the unit tests to test CRUD, now I actually look forward to it!

Episode 10
- Aug 03, 2012
Create Standalone Java Web Apps
Typically it's neccessary to deploy a war file into a servlet container (such as Tomcat, Jetty, Glassfish, etc) in order to run a web application. But it can sometimes be convenient to simplify the process by creating a war file that can run on it's own. This episode demonstrates how to use Jetty and a few maven plugins to package your project into an executable war. You might then deploy standalone wars as daemons or services.

Episode 9
- Jul 30, 2012
Easily Run Java Programs
Running a java program from the command line can be tedious. Make it easier for other developers to run your code using the Maven Exec Plugin. Better yet, use the Maven Shade Plugin to build an Uber Jar that anyone can use.

Episode 8
- Jul 20, 2012
Remote Debug Java Applications
Debug an application regardless of whether it's running locally, or if it's deployed to a test or, even, production environment. Web applications can be especially tricky to debug. Life's too short to waste time guessing. This episode demonstrates how to be certain of what's going on by setting up a remote debugging session anywhere, anytime.

Episode 7
- Jul 13, 2012
Easily convert Java Objects to/from json
These days, json is ubiquitous. See how easy it is to use the Google Gson Library to convert java objects to json and back. Then, as a more practical use case, I show how I use Gson to read and use json files similar to the concept of Unit Test Fixtures in Rails.

Episode 6
- Jul 06, 2012
Use Apache to proxy Java Web Apps
Testing your java web app over http://localhost:8080 is fine at first, but eventually, you'll want to set it up so that you can access it at http://yourdomain.com. In this episode, I demonstrate how to use Apache to host your java webapp by proxying requests from port 80 back to a java servlet container like jetty or tomcat using the proxy and rewrite modules.

Episode 5
- Jun 29, 2012
Unit Testing with Spring
How to write a Junit test that uses Beans defined inside Spring Application Context

Episode 4
- Jun 22, 2012
Install and Configure a Private Artifactory
Artifactory is a Maven Repository Manager that provides a ton of useful features out of the box. It acts as a proxy for other maven repos, provides ability to secure private artifacts, caches dependencies, and much more. In this episode, I show how easy it is to setup a private artifactory installation.

Episode 3
- Jun 15, 2012
Setting up a simple Maven Repository
A private maven repository is almost a necessity when working with a team of java developers. There are a few professional fully featured maven repository solutions out there, but this episode will demonstrate that all you really need is a server, and scp access to set up a "home grown" repo for sharing your java projects with others.

Episode 2
- Jun 08, 2012
Easy Logging with SLF4j
Logging is an basic cross cutting concern in any application. But with so many choices of java logging frameworks, it's easy to become overwhelmed with which one to choose and how to use it most effectively. This episode will hopefully save you some time by demonstrating how to use the Simple Logging Facade 4 Java library to easily add logging to your java project.

Episode 1
- Jun 01, 2012
Calling Ruby Gems from Java
Do you have any favorite Ruby Gems? Ever wish you could use them in a java project? If so, here's an example of how to use the java embedded script engine to use use functionality from almost any (j)Ruby Gem.