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.
You searched this site for "appfuse". 771 entries found.

You can also try this same search on Google.

EMMA vs. Cobertura for Code Coverage

I'm looking to add code-coverage reporting to AppFuse. The two open source libraries I know of to do this are EMMA (CPL) and Cobertura (ASL). Which one is the better library to use? Both projects seem to be actively developed - and there are AppFuse HowTos for both, so the decision making process is a bit difficult.

Any insights into why one tool (or project) is better than the other is appreciated.

Posted in Java at Feb 03 2006, 05:16:35 PM MST 13 Comments

Script.aculo.us vs. Dojo

For the last week or so, I've been hearing more and more about Dojo. It's mostly because I've been listening to podcasts, but also because it's integrated into both WebWork 2.2 and Tapestry 4.0 (via Tacos). In AppFuse 1.9, we added Script.aculo.us as one of our Ajax-enabling libraries.

I chose Script.aculo.us because I've used it in the past and it's worked very well (along with its underlying engine, Prototype). Because it's development seems to be largely driven by Ruby on Rails - I figured it was a good library to include. However, since AppFuse includes both Tapestry and WebWork - it seems like including Dojo might be a good idea too.

So my question is - do Script.aculo.us and Dojo do the same thing? Has anyone done a detailed comparison of these two Ajax frameworks?

I realize that Dojo is more of a "toolkit" that's been developed from a bunch of existing DHTML libraries - but can it do the drag-n-drop and cool effects like script.aculo.us can? Can Dojo do things that DWR + Script.aculo.us can't? I haven't used Dojo (yet), that's why I'm asking.

I really like the idea behind both projects, but I can't help but think Script.aculo.us is a little better. Why? Because its creator is a designer (vs. a developer) and its development is driven by one of the most popular web frameworks and it was built from a real-world application rather than a consolidation of libraries.

Dojo, on the other hand, has much better documentation. However, the project lead works for JotSpot. Apparently, the JotSpot Wiki is supposed to be a showcase of what Dojo can do. While the jot.com site looks OK - the Dojo Wiki (based on Jot) is horrific. Things don't line up and it looks awful (in both IE and Firefox on Windows + Firefox on the Mac). On my last project we used Jot and it left a lot to be desired.

I hate to judge a library by the applications it creates - but comparing fluxiom to Jot makes me think Script.aculo.us is the better library. Then again, fluxiom hasn't been released yet.

On a related note, it's possible the Open Ajax project will consolidate the Ajax frameworks - but who knows when that will be released.

Posted in The Web at Feb 01 2006, 03:15:02 PM MST 17 Comments

AppFuse News: GlassFish, free demo hosting for java.net projects and Facelets

Some interesting news from the AppFuse world:

Posted in Java at Jan 30 2006, 09:06:35 AM MST Add a Comment

[DJUG] Real World Mapping and Holistic Testing

A few weeks ago (January 11th to be exact), I attended a Denver JUG meeting where Scott Davis spoke about Real World Mapping (download presentation) and Holistic Testing (download). Below are my notes from the event.

The first-generation mapping web application was MapQuest. Second generation mapping webapps include Google Maps (now renamed to Google Local) and MSN Virtual Earth (now renamed to Windows Live Local). The funny thing is MapQuest had sattelite images way back when, but they dropped it b/c no one was interested.

I like how googling for "msn virtual earth" brings up earth.google.com as the sponsored link at the top.

MapQuest - simple example from the oldest player in the map space. The URL of the query results gives us our first glimpse into building a custom application. For example:

http://www.mapquest.com/maps/map.adp?address=1600+Pennsylvania+Ave+Nw&city=Washington&state=DC

Is using MapQuest and building URLs on your site hacking? No - it might be considered hacking, but they encourage you to use it by publishing a howto. Once you're familiar with the basics, you can begin to customize the URL, for example:

Add a title: title=The+White House
Change the zoom level: zoom=9 (0-10, 0 == world)
Even use good ol' Latitude/Longitude: ?latlongtype=decimal&latitude&38(whitehouse)

Why use Lat/Long? While addresses are more user-friendly, lat/long coordinates are more precise. All map services must "geocode" addresses into lat/long anyway in order to show the location on the map.

Did you know that Google is a huge dictionary? Just use "define: geocode". So how do you find your Lat/Long? There are a couple of simple ways to geocode a street address for free:

  • Option #1: URL harvesting from http://maps.msn.com - when you submit an address, the resulting URL has the lat/long in it (in the "C" parameter)
  • Option #2: Use http://geocoder.us. Find the latitude & longitude of any US address - for free. The US Gov't provides the data, they just display it. If you want to use this in your application, you'll have to screen-scrape to get the data.

Geocoder.us also offers a web services interface - RESTful based on URLs. You query for address, it returns XML. There's also SOAP, XML-RPC and JSON interfaces.

RESTful Web Services: If your GET request returns XML instead of HTML, it is called a "RESTful Web Service". To use REST in Java, you can use the HttpClient package from Jakarta Commons.

Yahoo Maps

Yahoo! Maps offers the same level of hackability as MapQuest. The parameter names change, but remain conceptually identical. They use "mag" instead of "zoom", "addr" instead of "address", etc. One thing Yahoo! can do that MapQuest can't is allow you to display your own data on the map (more at http://developer.yahoo.net/maps/).

For example, the URL below displays cities on the NFJS tour:

http://api.maps.yahoo.com/Maps/V1/annotatedMaps?appid=nfjs_cities&xmlsrc=http://www.davisworld.org/nfjs.xml. Appid must be registered with Yahoo, but it is free and the process is fast. Xmlsrc is an XML file describing your map (most of the name/value GET parameters are pushed into XML...). Nice! The document linked to in Xmlsrc is actually an RSS feed.

Web 2.0

The Yahoo! Maps Web Service is getting very close to what the pundits are calling "Web 2.0". Tim O'Reilly calls it "Web 2.0," Jonathan Schwartz calls it "The Participation Age".

What is Web 2.0? The there are no hard and fast definitions, the same basic ideas come up over and over:

  • Favor interactive web applications over static/passive web pages
  • Favor data/web services over fixed presentation/HTML
  • Allow/encourage your content to be integrated into other applications

2/3rds of things bought and sold on eBay are done through web services - not through their web interface.

Google Maps

Google Maps does have Web 1.0 functionality, with query parameters. However, unlike Yahoo and MapQuest, the names of their parameters are only 1-digit. For example, z == "Zoom", t == "Type" (m=map, k=image, h=hybrid map/image). The reason it's called "k" for images is because Google bought Keyhole. It's now called Google Earth and and apparently the OS X version came out today.

Google also supports gazetteering - which are "natural language" queries. For example, you can search for "colorado rockies denver co" and it'll bring up a picture of Coors Field.

But what moves Googles aquarely into Web 2.0 territory is their Maps API. Using Ajax and Google's API, you can develop your own location-based services using Google Maps. To use Google's API, you have to singup for key, but then you become a JavaScript programmer.

Now Scott is showing some JavaScript - 2 lines of JavaScript code - 1 line of HTML to get a map. The bare-bones code will give you a map w/o controls - and you can programmatically add them. There's an API for adding overlays, and you can even control if the drop-shadow for the popup shows up. I wasn't aware the popup window shows a shadow on the underlying map - that's pretty cool. Finally, you can respond to user events by adding event listeners to the different user actions.

Google now has competition - MSN Virtual Earth now called Windows Live Live. There is a website devoted to using Microsoft's API, but looking at Scott's example - the Google API is much cleaner. Interestingly enough, it also works best in IE.

If you want to learn more about this stuff, I encourage you to checkout Scott's Google Maps API book.

In the "Main Event", Scott talked about a whirlwind of open-source testing tools, including: JUnit, Cobertura, Groovy, EasyMock, HttpUnit, DbUnit and JunitPerf.

Before this talk, I'd never heard of Cobertura, but I have used jcoverage and EMMA . After seeing talk, and seeing that Mike Clark endorses Corbertura, I should probably check out. However, since there's already a AppFuse + EMMA HowTo, maybe I should just stick with that.

The main benefit of unit testing is it facilitates change. Unit tests are a safety net. It simplifies integration - if you "trust" the individual pieces, then using them in the larger picture is much easier. Unit testing makes your code "self-documenting" - rather than relying on Word documentations that get stale immediately, unit tests are always an up-to-date reflection of the code base. Enforces a loosely-coupled architecture - because your code is being consumed by two different entities (unit tests and application), best practices naturally occur. For example, coding to interfaces instead of implementations.

At this point, I decided to stop taking notes. Thanks for the great talks Scott!

Posted in Java at Jan 27 2006, 08:12:38 AM MST 3 Comments

Learn about WebWork 2.2 and Tapestry 4.0 via Podcasts

podcastI've said in the past that Podcasts are boring. I still think this is true for the most part, but that's largely because most of them aren't appealing to me. However, this week I've found a couple of good ones. Tapestry 4.0 and WebWork 2.2 have recently been released, and now you can listen to interviews with both project's primary developers: Patrick Lightbody of WebWork and Howard Lewis Ship of Tapestry/Hivemind. The easiest way I've found to subscribe and listen to podcasts is to download iTunes. You also may want to checkout The Java Podcasters article on ONJava.com.

I hope to upgrade both Equinox and AppFuse to these releases in the near future, I just need to find the time. I also hope to change the default web framework in AppFuse to Struts Action 2 as part of AppFuse 2.0. This will allow us to ditch Struts and WebWork and only support 4 web frameworks (SA2, Spring MVC, Tapestry and JSF).

Posted in Java at Jan 26 2006, 08:22:02 AM MST 4 Comments

Spring Workshops from Virtuas

I'm pleased to announce that my company, Virtuas, has decided to start offering public workshops for many prominent open source projects. These include Spring, Geronimo, Tomcat, Hibernate and JSF/MyFaces.

I'll be teaching the first Spring course in Denver February 21st - 24th, followed by one in Boston in mid-March. It should be a fun class, especially since I'm adding a bunch of stuff regarding Spring 2.0. Since I know you're going to ask the price -- and it's not posted on virtuas.com -- it's $2,495 per person for 1-4 people from the same company/group/etc., $1,995 per person for five or more people.

In other Virtuas news, we've recently signed partnership agreements with IBM and Covalent. We also re-worked our site with Andreas Viklund's "andreas08" theme from Open Source Web Design. Thanks to the power of Drupal, all we had to do to change the whole site was modify one PHP template and one CSS file. Thanks to both Andreas and Drupal for vastly simplifying our new look-n-feel.

Update: It looks like Andreas's theme has been made into a Drupal theme. Nice.

Posted in Java at Jan 24 2006, 05:06:14 PM MST 10 Comments

Back from Cancun

We arrived back in Denver after an awesome week in Cancun. There's no real good stories to tell, just lots of fun, laughter and relaxation with family. Below are some pictures from our trip, as well as many others on Flickr.

Family Photo Mimi and Abbie on the Beach Cancun Sunset

Cancun Sunset from Villas Nizuc View from our condo Beach by Villas Nizuc

Right before I left last Saturday, I released AppFuse 1.9, then went to watch the Broncos vs. Patriots at Invesco Field. Today, it's the Steelers. It's pretty cool to come home to a town this excited. Go Broncos!!

Posted in General at Jan 22 2006, 11:02:04 AM MST 6 Comments

J3Unit

J3Unit Over the weekend, I learned about J3Unit - a new object oriented JavaScript testing framework.

J3Unit is an object-oriented unit testing framework for JavaScript. J3Unit runs JavaScript tests directly in the web browser and can be automated using JUnit and Jetty. J3Unit builds on previous work by JSUnit and Script.aculo.us to provide a better way to automate JavaScript unit tests. Object-oriented JavaScript unit tests are written using the Script.aculo.us Test.Unit.Runner object, which is in turn built upon the prototype JavaScript library.

J3Unit has 3 modes of operation: Static Mode, Local Browser Mode, and Remote Browser Mode

To me, this looks similar to Selenium. I'd definitely like to explore using this package or Selenium in AppFuse.

Currently, AppFuse uses Canoo WebTest, which is based on HtmlUnit. The current version of HtmlUnit doesn't support Prototype, or any libraries that depend on it. The good news is "This will be quite simple to fix".

Posted in Java at Jan 09 2006, 05:41:42 AM MST 2 Comments

AppFuse and Equinox get some FishEye lovin'

In addition to many other java.net projects, the Cenqua guys have been kind enough to add FishEye to both AppFuse and Equinox's CVS repositories. You can now view FishEye goodies using the URLs below:

Later today, I'll see if I can hack java.net's browse CVS page to show FishEye instead of java.net. Thanks Cenqua!

Update: The hack is complete. IE gives a security warning b/c FishEye is only available at http (not https), but it works fine in Firefox. If you'd like to put FishEye into an embedded iframe in your java.net project, here's the JavaScript I used to do it. View source on any of AppFuse's java.net pages for more information. The JavaScript goes in your www/project_tools.html page.

function fisheye() {
    if (document.getElementById("browsesource") != null) {
        var fisheyeDiv = document.createElement("div");
        fisheyeDiv.className="app";
        var header = document.createElement("div");
        header.className="h2";
        header.innerHTML = "<h2>Browse source code with FishEye</h2>";
        fisheyeDiv.appendChild(header);
        var fisheye = document.createElement("iframe");
        fisheye.setAttribute("src", "http://fisheye5.cenqua.com/viewrep/appfuse");
        fisheye.setAttribute("border", "0");
        fisheye.style.width="99%";
        fisheye.style.height="700px";
        fisheye.style.border="0";
        fisheye.style.marginTop="10px";
        fisheye.style.marginLeft="5px";
        fisheyeDiv.appendChild(fisheye);
        document.getElementById("dirlist").insertBefore(fisheyeDiv, document.getElementById("browsesource"));
    }
}

Related: Fixing your java.net project's homepage.

Posted in Java at Jan 07 2006, 09:28:06 AM MST Add a Comment

2005 - A Year in Review

2005 was quite a year for me. I found my dream job, after contemplating what's next in my career only a few months earlier. I attended TheServerSide Symposium in March and created some great memories with James Goodwill. There's nothing like losing all your money and then winning it all back at 6 in the mornin'.

Other March highlights include:

April was a fun month, and started off with a me heading to work for Microsoft. The joke worked so well it was picked up by news.com. DU repeated as NCAA Champions (again). The MySQL Conference and wine-tasting with Julie (for our 5th anniversary) rounded out the month.

May was a whirlwind month, where I headed to Norway after barely renewing my expired passport on time. My PowerBook died on the way over, but I still had a great time. I was featured on TheServerSide and started planning AppFuse 2.0.

The summer flew by: I got biled by Hani, toured with the "Bomb Squad" at JavaOne, drove through Yellowstone, bought a new bike, learned more about Ruby and Rails at OSCON (and learned how much fun a smackdown can be), and watched Jack turn 1.

Then things got busy: I had a great time at Java in Action, started The Bus Project, and enjoyed the beauty of Keystone with Bender and Snyder at the Colorado Software Summit.

To round out the year, I traveled and attended conferences like I was possessed (New Jersey, NFJS, San Francisco and Florida). Abbie turned 3, Roller 2.0 was released and the WebWork joined Struts after a multi-year rivalry.

Phew, it's been quite a year folks. Here's to 2006 being even better! My goals for the year? Happiness, health and more car bombs with family and friends. ;-)

Posted in Roller at Dec 30 2005, 12:13:25 PM MST 1 Comment