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.

At the Giants Game

After Patrick's talk this morning, I attended Alex Russell's talk on Dojo in depth (download presentation, blog coverage). I didn't write up a blog post because the juice was gone on my laptop. After plugging in, I checked my e-mail to find a message from Patrick in my inbox.

Subject: At the giants game

Sucka! If you want to go, my buddy has two extra tickets just sitting here.

So now I'm at the game, using their free wifi to write this post. It's a beautiful day - warm in the sun and cool in the shade. We're in the shade, first level by first base, and I'm drinking a beer. Giants are up 9-0 over the Cubs. Life doesn't get any better than this. ;-)

Posted in General at May 11 2006, 03:01:19 PM MDT 1 Comment

Ajax on Struts with Patrick Lightbody

I'm sitting in Patrick Lightbody's presentation on Leveraging AJAX in modern web frameworks. The point of this presentation is to give a preview of what's coming in Struts Action 2.0. There are a number of other good sessions I'd like to go to, particularly Intro to Dojo, but I figured it's better to attend this talk since AppFuse will be moving to SAF as part of 2.0. We're in a fairly small room, and there's about 20-30 people in attendance. With 400+ people at this conference, the other sessions are likely packed.

Ajax is more of a technique, rather than a technology. Commons Ajax techniques include:

  • Tabbed pane
  • Validation
  • Polling
  • Tree widget
  • Voting

For SAF, there are three core building blocks/tags: <saf:div/>, <saf:a/> (results evaluated as JavaScript) and <saf:submit/>. Divs are where things "happen" and links/submit buttons can trigger events. There are two frameworks used is SAF:

  • DWR: Remote invocation service for Java <-> JavaScript
  • Dojo: Language/server-agnostic JavaScript framework

There are two styles of Ajax: DOM manipulation (DWR) and partial pages (Dojo). SAF provides three Dojo widgets: BindDiv, BindAnchor and BindButton. The div tag supports the following attributes: href, updateFreq, delay, loadingText, errorText, showErrorTransportText, listenTopics and afterLoading. A simple example is polling - where the remote action returns HTML:

<saf:div href="mailbox.action?id=%{id}" updateFreq="2000"/>

Advanced usage of this tag includes adding a <script> block to the returned HTML. It will be executed when rendered, just like normal JavaScript is.

Tabbed pane is another component that's made up of two tags: <saf:tabbedPanel/> and <saf:panel/>. Rather than specifying content/tags within an <saf:panel>, to use the Ajax version, you simply add remote="true" and href="remoteUrl" to <saf:panel>. I asked about remote="true" being redundant and Patrick agreed it should be implied when an "href" attribute is defined.

SAF also includes the ability to have topic-based events. Dojo supports an event system, which was originally donated by the WebWork developers. Any element, such as a div, may listen to multiple topics. Any element, such as an href or tab header, may notify a topic.

The last thing that Patrick is demonstrating is Validation using DWR. To use it, you will need to use SAF's Ajax theme, as well as have DWR installed and configured. The remote calls to SAF's validation engine return serialized objects rather than HTML "partials". By default, it uses onBlur events to do the validation and all that's required on the client-side is validate="true" on your <saf:form>. Another cool Ajax feature that SAF has is an OGNL Console that gives you a command-line interface to evaluate OGNL expressions.

Patrick's lessons learned from implementing Ajax into WebWork/SAF:

  • Simple combinations of the basics can create powerful features, such as the tabbed pane or the tree widget.
  • JavaScript inside an HTML block (<saf:div>) or as returned from an action (<saf:a>) can provide valuable glue code.
  • The <saf:div/> and <saf:action/> tag have a close and important relationship.
  • Understand the important differences b/w Ajax styles (DOM-based vs. snippet-based). Both have their places.

Pitfalls:

  • Remember: there is no silver bullet
  • At the end of the day, your application is still a web site - don't forget that
  • Excessive polling can lead to extreme load and/or thread starvation
  • Common functionality, such as the back button and printing, can become difficult or confusing for the user (Dojo can help solve this problem)
  • Browser incompatibility can lead to two versions of the same application (see GMail)

The Struts Team hopes to release a preview release of Struts Action 2.0 this week or next, with a final release targeted for August.

Posted in Java at May 11 2006, 11:49:11 AM MDT Add a Comment

Yahoo's Grids CSS

Available Templates When I first saw Mike Stenhouse's CSS Framework, I was very impressed. It's hard to believe it's been a year since I first saw it, and only now am I integrating it into AppFuse. It figures that the week I'm implementing it, Yahoo comes up with something better: Grids CSS. Thanks to Jacob Hookom for e-mailing me the link.

The features of Grids CSS include:

  • Full A-grade browser support
  • More than 100 page layouts with a single CSS file at just 1.82KB
  • Flexible scaling with user font-size adjustments
  • Min-width enforcement, regardless of font or viewport size (except IE; helper JS under consideration)
  • Abundant DOM hooks for CSS and scripting flexibility
  • Source-order independence, allowing you to place your most important body content first in your HTML document
  • Self-clearing footer (no matter which column is longer, the footer stays at the bottom)
  • Centering within the viewport by default
  • Forward-compatibility as standard page structure evolves to claim more screen real estate
  • Accommodation for IAB Advertising Units

This is obviously a better solution than the CSS Framework, especially since it seems to be well-documented and allows source-order independence. However, it suffers from a similar problem: there's a lack of good-looking designer-styled templates that showcase how cool this library is. There is hope though, Andreas Viklund (a well-known open source template designer) is talking about a Modular CSS Template. The question is: will he re-use Yahoo's Grids CSS or invent his own?

[Yahoo's Grids CSS] is almost exactly what I was working on - but much smaller and probably better than I would have done it. The main difference is that I added a few extra layers to the cake: Make-up (layout-wide styling for typography, forms, headers, links and so on), Colorscheme (just what it sounds like) and Backdrops (background images). Designers can add each layer separately. If you have a site based on the template and you want to change the styling - add a new Make-up. It is a matter of cutting and pasting blocks of code into the CSS, even a beginner with no CSS design skill can do that. If you want to use different colorschemes for different pages - just add more colorschemes and call it from the colorscheme class of each page. One line of code to change, and the effect is very obvious?

It's cool to see there's lots of work going on in this space. While AppFuse 1.9.2 will include the CSS Framework, there's nothing stopping us from using a different solution for 2.0. I'm leaning towards moving to Yahoo's solution, but it's likely I'll be heavily influenced by Andreas' work in this space. Of course, since Yahoo's library is open source, it might make sense for Andreas to simply contribute to this project and improve what they've already done.

Posted in The Web at May 11 2006, 10:58:24 AM MDT 7 Comments

Roller Comments

The default comment form in Roller is pretty ugly. Not only does it use a <table> to layout the form, but it has invalid XHTML and JavaScript as well. With the new theme on this site, I re-worked much of the comments.vm macro and created a much prettier form. I was hoping to contribute a variation of this theme to Roller for 2.3, but it looks like it'll have to wait until 2.4. Rather than adding new macros for this theme, I'll be fixing all the themes to have a prettier comment form. You can track my progress on this issue using ROL-1131.

As far as this theme, I've named it "andreas08" after its designer. I hope to contribute something similar to what's on virtuastravels.com as part of 2.4. If you'd like to use this theme in your own Roller installation (before 2.4), let me know and I'll try to package up a download.

Posted in Roller at May 10 2006, 12:04:52 PM MDT 9 Comments

San Francisco - here I come!

The Ajax Experience I'm sitting in Denver's aiport, getting ready to jump on a plane and head to San Francisco for the Ajax Experience. Like most No Fluff shows, this one has 2-3 sessions I'd like to see during each time block. My primary goals are 1) to learn a lot 2) to blog about each session I attend, and 3) to get a good sense of what each Ajax framework does well. Hopefully there will be lots of demos I can link to.

On Friday night, a few AppFuse enthusiasts and I are getting together at the Thirsty Bear. If you'd like to join us, leave a comment and show up around 8:00.

Posted in Java at May 10 2006, 11:56:44 AM MDT 4 Comments

Better client-side validation with Prototype

I'd love to see something like Really easy field validation with Prototype integrated into Commons Validator and other web frameworks' validation engine. The only hard part would be looping through form elements and adding classes with the validation information. Other than that, it doesn't seem like it'd be too hard to implement. Hat tip to Ajaxian.com.

Posted in Java at May 09 2006, 02:59:29 PM MDT 7 Comments

CSS Framework Design Contest Winner and Runoff

I've tallied the votes as posted to the mailing list. Here's the results:

Congratulations to Mattias Fjellström for his winning Puzzle with style entry! The themes not listed here received 2 votes or less.

Based on these results, it looks like we need to have a runoff vote (for 2nd and 3rd place) between andreas01, deliciouslyblue, madeyourcss, fuseapp001 and simplicity. To place your vote, send an e-mail to [email protected] with "My favorite runoff theme is XXX" in the body. Voting will end at midnight (MDT, GMT-6) tomorrow night.

NOTE: "madeyourcss" had 6 votes sent to the mailing list, but 3 were from the same person. It might have been 4 that were sent from the same person, but since there's a runoff, I decided to add it to the mix.

Posted in The Web at May 08 2006, 02:54:03 PM MDT 3 Comments

New Colors (again)

I've just completed another round of re-working the colors and header images on this site. If you click on the different category headings (i.e. Java, Mac OS X or Open Source), you can see the other color schemes. If you like one of the category theme's better than the default one, let me know.

I also did some tweaks to get everything working in IE. What a pain in the ass that browser is. For some reason, if anything in the "main" part of the website (where the blog entries are) is too wide - IE shoves everything down the page, including the top nav bar and the right sidebar. It's so bad that a simple paragraph with "margin-left: 10px" doesn't work. With Firefox and Safari, it moves over properly and overlays the sidebar if that's what it takes. Because of this, there's a potential that wide posts in this site will make the sidebar drop to the bottom of the page. For the nav bar, I changed it to be absolutely positioned, so it should always be present.

Other IE issues include: 1) the calendar icon is a transparent .png (I'll probably have to change it to a .gif) and 2) the nav bar's "selected" items are up a pixel or two and contain a bottom border. While these are minor issues, I would like to figure out how to make IE more tolerant of item width's in the #main section. Let me know if you have any tips or tricks.

Posted in Roller at May 08 2006, 12:47:42 AM MDT 18 Comments

ADF Faces goes open source

It's likely you originally heard about ADF Faces being donated open source way back in December 2005. Looks like it's finally happened. It's going to be tough for Tapestry and Wicket to compete with JSF when big companies are providing components for it. The after-market for a web framework can certainly influence decision-makers.

Posted in Java at May 07 2006, 03:33:48 PM MDT 2 Comments

AppFuse plans for the week

AppFuse Like most Java open source projects, I hope to release a new version of AppFuse this week before JavaOne. There's a couple reasons for this: 1) so I have the latest and greatest to demo during talks and 2) so the article I'm writing is up-to-date. Unfortunately, with both AppFuse and Equinox it's a bit difficult to make sure I'm using the latest and greatest for everything. This is because they're both very thin layers on top of their underlying dependencies.

I'm willing to bet that a few of these dependencies will have new releases this week, as developers scramble to get a bunch of stuff done before JavaOne. Here's my release predictions for this week:

  • Acegi Security 1.0
  • DWR 2.0
  • Hibernate 3.2
  • Spring 2.0

My current plan is to fix outstanding issues for 1.9.2 and then hold off to do the release until this weekend. Hopefully that gives each project enough time to pump out a release. If you happen to be involved with any of the projects that AppFuse depends on - and you're not planning on releasing before JavaOne, please let me know.

The 1.9.2 release of AppFuse will (hopefully) be the last one in the 1.x series. Work on 2.0 will begin towards the end of this month. See the roadmap for the cool stuff coming in 2.0.

As far as the CSS Design Contest, I'll announce the winners tomorrow. I also plan to fix this site in IE tonight and take another stab at making the header images and colors easier on the eyes.

Posted in Java at May 07 2006, 10:49:04 AM MDT 4 Comments