Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

LinkedIn Groups

LinkedIn This afternoon, I noticed there's a LinkedIn "GlassFish" group now available and it reminded me of a couple things:

  • LinkedIn currently doesn't have a way to search for groups, but Jason Bailes has setup a LinkedIn Groups Search with Google Custom Search. Thanks Jason!
  • I created a Apache Software Foundation group on LinkedIn a few months ago. If you're a committer or member, you're more than welcome to join the group.

LinkedIn Groups don't provide a whole lot of functionality at this point, but I've heard there's big things in store for them. Chances are they'll be very valuable in the future.

Posted in The Web at May 20 2008, 02:16:18 PM MDT 6 Comments

It's a beautiful night in Denver

It's a pleasant 68°F in Denver tonight. Rather than working in the house, I thought I'd step out into the backyard. It's quite nice out here - I might have to do this more often.

Working in the backyard

Posted in General at May 18 2008, 10:31:43 PM MDT Add a Comment

An afternoon in Rocky Mountain National Park

Today was one of those days I hope I do more often as a single parent. Ever since ski season ended, I've had a hard time entertaining the kids on weekends. I don't have them every weekend - Julie and I each get them a week at a time. However, for the past couple times I've had them, our weekends have been rather lame. We've still done stuff, but it's usually only a couple hours at a time. The last time I had them we went to Bass Pro Shops, got them some fishing gear and headed out to a local lake. However, once their lines got tangled and they started frolicking in the mud (while I tried to untangle them), I felt like my mission failed.

I don't know what was so special about today, but I think it was simply getting out of the city and into the hills. This morning we had breakfast with Julie, headed to REI for a new tent and then drove up to Rocky Mountain National Park to look at some animals and take a hike. We stopped in Estes Park for some ice cream and playground action and then headed into the park to gaze at some Elk and hike along a small creek. Evidence is contained in the pictures below and in a set on Flickr.

Nice Trail Nice day in Colorado

Jack's Special Rock Beautiful Smile

We bought the tent this morning because we were planning on camping with the Colorado Bus Club before Volkswagens On The Green (VWOTG) tomorrow. However, Abbie's cold started to get pretty bad this afternoon, so we decided to camp in the backyard instead.

New Tent Getting ready for camping

Tomorrow should be a lot of fun. The forecast is 86°F and the VWOTG show is always inspiring.

Posted in General at May 17 2008, 11:30:34 PM MDT 3 Comments

AppFuse + DisplayTag: External Sorting and Paging Example

Chris Barham has posted an excellent example of how to do external sorting and paging to the AppFuse mailing list:

I've put together a new AppFuse project which demonstrates how to enhance the List screens. DisplayTag as provided has issues with large datasets, (it retrieves all the records every time), and sorting via column headings does not work for the entire dataset, only those on screen at the time.

I've built a project which addresses these issues, using Hibernate Criteria and extensions to DisplayTags PaginatedList interface which gets DisplayTag to hand off all requests for sorting and paging to the new implementation of PaginatedList.

The Google Code project is checked in to: http://code.google.com/p/pagingappfuse/ feel free to check out the code and comment. (instructions here: http://code.google.com/p/pagingappfuse/source/checkout)

There are instructions regarding the steps taken on the project wiki page here: http://code.google.com/p/pagingappfuse/wiki/PagingSorting

Cheers,
Chris

Nice work - thanks Chris!

Posted in Java at May 17 2008, 08:19:55 AM MDT 6 Comments

Spring MVC vs. JSF and The State of Spring Web

Alternative Adult has only posted a couple times in 2008, but his entries have peaked my interest.

Spring MVC or JSF+?
My business unit is trying to standardize if we can on a single Java-based Web framework going forward to simplify the Web development process, especially as individual developers move from one division to another, or centralized support groups need to maintain multiple applications from multiple divisions.

At the enterprise level within my company, the architecture group says that they will provide support for either Spring MVC or JSF+ (where the + represents the accompanying technologies you would use to provide a more maintainable application and a more rich user experience, e.g. Facelets, Richfaces, etc.).

Now my business unit is trying to decide which of these two frameworks, Spring MVC or JSF+, is the most appropriate to standardize upon for our development community. [Read More]

...and...

State of Spring Web
For those that are interested, the following is a summary of the notes I captured from a conversation with SpringSource on the state of Spring Web. [Read More]

Good stuff Michael - keep it coming.

Posted in Java at May 16 2008, 06:17:52 PM MDT 6 Comments

Extensionless URLs with Java Web Frameworks

Last week, I had a go of making a Spring MVC application use extensionless URLs. I did some googling, found some tips on the Spring Forums and believe I arrived at a solid solution. Using the UrlRewriteFilter (version 3), I was able to create a rule that looks for any URLs without an extension. If it finds one, it appends the extension and forwards to the controllers. This rule is as follows (where *.html is my servlet-mapping for DispatcherServlet in web.xml):

  <rule>
    <from>^([^?]*)/([^?/\.]+)(\?.*)?$</from>
    <to last="true">$1/$2.html$3</to>
  </rule>

As long as I hand-write all my URLs without an extension (<a href="home"> vs. <a href="home.html">), this seems to work. To combat developers that use "home.html", one solution is to require all links to be wrapped with <c:url value="url"/> (or some other macro that call response.encodeURL()). If you can convince everyone to do this, you can write an outbound-rule that strips the .html extension from URLs.

  <outbound-rule>
    <from>^(.*)\.html(\?.*)?$</from>
    <to last="false">$1$2</to>
  </outbound-rule>

In an ideal world, it'd be possible to modify the <a> tag at the very core of the view framework you're using to automatically encode the URL of any "href" attributes. I don't think this is possible with JSP, FreeMarker, Facelets or any other Java Web Framework templates (i.e. Tapestry or Wicket). If it is, please let me know.

Below is my final urlrewrite.xml with these rules, as well as my "welcome-file" rule at the top.

<?xml version="1.0" encoding="utf-8"?>
<!DOCENGINE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.0//EN"
  "http://tuckey.org/res/dtds/urlrewrite3.0.dtd">

<urlrewrite>
  <rule>
    <from>/$</from>
    <to type="forward">home</to>
  </rule>

  <rule>
    <from>^([^?]*)/([^?/\.]+)(\?.*)?$</from>
    <to last="true">$1/$2.html$3</to>
  </rule>

  <outbound-rule>
    <from>^(.*)\.html(\?.*)?$</from>
    <to last="false">$1$2</to>
  </outbound-rule>

</urlrewrite>

If you have other solutions for extensionless URLs with Java web frameworks, I'd love to hear about them. With any luck, 2008 will be the year we drop extensions (and path-mappings) from our URLs. The stat packages might not like it, but I do.

Posted in Java at May 13 2008, 09:50:51 PM MDT 18 Comments

AppFuse 2.0.2 Released

The AppFuse Team is pleased to announce the release of AppFuse 2.0.2. This release includes upgrades to Spring Security 2.0, jMock 2.4, the ability to customize code generation templates and many bug fixes.

For information on upgrading from 2.0.1, see the Release Notes or changelog. AppFuse 2.0.2 is available as a Maven archetype. For information on creating a new project using AppFuse, please see the QuickStart Guide or the demos and videos.

To learn more about AppFuse, please read Ryan Withers' Igniting your applications with AppFuse.

The 2.0 series of AppFuse has a minimum requirement of the following specification versions:

  • Java Servlet 2.4 and JSP 2.0 (2.1 for JSF)
  • Java 5+

If you've used AppFuse 1.x, but not 2.x, you'll want to read the FAQ. Join the user mailing list if you have any questions.

Thanks to everyone for their help contributing code, writing documentation, posting to the mailing lists, and logging issues.

Please post any issues you have with this release to the mailing list.

Posted in Java at May 11 2008, 11:25:40 PM MDT 4 Comments

AppFuse Light 1.8.2 Released

AppFuse Light 1.8.2 is a bug fixes release that includes upgrades for Spring, Spring Security, Hibernate, Wicket, Tapestry and many others. In addition, Spring bean definitions were replaced with annotations (@Repository, @Service and @Controller). See the Release Notes for more information on what's changed since the last release.

AppFuse Light now offers 60 possible combinations for download:

  • Web Frameworks: JSF (MyFaces), Spring MVC (with Ajax, Acegi Security, JSP, FreeMarker or Velocity), Stripes, Struts 1.x, Struts 2.x, Tapestry, WebWork, Wicket
  • Persistence Frameworks: Hibernate, iBATIS, JDO (JPOX), OJB, Spring JDBC

AppFuse Light Screenshot - click on the box at the bottom right of AL to activate StyleSheet Switcher

If you have any questions about this release, please subscribe to the AppFuse user mailing list by sending a blank e-mail to [email protected]. You can also post questions in a forum-like fashion using Nabble: http://appfuse.org/forum/user.

Posted in Java at May 11 2008, 10:16:17 PM MDT Add a Comment

Issues with AntRun Plugin and Maven

I started seeing the following error today when using Maven and the AntRun Plugin.

[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error executing ant tasks
	
Embedded error: java.lang.IllegalAccessError: tried to access method 
org.apache.tools.ant.launch.Locator.decodeUri(Ljava/lang/String;)Ljava/lang/String; 
from class org.apache.tools.ant.AntClassLoader

Searching the internet provided no results, so I was pretty stumped - especially since this error didn't happen on my MacBook Pro. It happened on AppFuse's Bamboo server (Linux), but not locally. Luckily, I was able to reproduce it on my Windows box and discovered the solution: upgrade to a newer version of Maven. I was using 2.0.6/2.0.7 and upgrading to 2.0.9 fixed the problem.

BTW, when is the Ant project going to release a new version of Ant? The current 1.7.0 version doesn't support spaces in path names, which seems like a pretty big issue to me (especially for Windows users).

Posted in Java at May 10 2008, 06:23:26 PM MDT 6 Comments

JavaOne Parties Update

In an effort to keep one of the top spots for "javaone parties", here's the updated list for JavaOne parties this week:

Thanks to Atlassian for the free beer last night at Thirsty Bear. I'll likely be at Thirsty Bear tonight, followed by Zebulon. Let the networking begin!

Related: JavaOne: Where are the good parties at?

Posted in Java at May 06 2008, 12:20:28 PM MDT 1 Comment