Matt RaibleMatt Raible is a writer with a passion for software. 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 "ant". 338 entries found.

You can also try this same search on Google.

[JavaOne] What's new and cool in the J2ME Wireless ToolKit

I'm continuing my theme to only attend sessions I know little about. I'm sitting in a session on the J2ME Wireless ToolKit. So far it's fairly boring. This guy's been rambling on for a while about all the JSRs that the toolkit implements. Now he's doing a demo and using the Network Monitor to demonstrate looking at the HTTP requests when making soap calls.

This is only my 4th session of JavaOne, and I haven't been to any BOFs. I don't feel like I'm missing anything. Most of my time in Moscone is spent sitting in the main lobby, hacking away at my e-mail and talking with folks. I never imagined I'd meet so many people. It's pretty damn cool to meet all the bloggers.

The tools and demo that this guy is showing look like good monitoring and emulating tools. The WTK doesn't appear to have an IDE, just a way to run midlets and see the results. It doesn't appear to have an IDE. If I was to compare this to the web world, I'd say that the WTK is really just a web browser. Of course, it's much more than that since it can emulate HTTP requests, and well as bluetooth. From what I can tell, a midlet is really just a Java application that can run on a mobile device. After googling a bit, it looks like I was right. How easy is it to unit test midlets? Do you have to constantly use an emulator to test stuff? I'd like to write an AppFuse client for my phone, but I also want to use TDD to do it.

I missed the rest of the presentation b/c I got lost in reading blogs. Attending these sessions with an open laptop is not a good idea. I hope I can make one more session today - my goal was 5 for the week. As Dion said, this conference is all about networking.

Posted in JavaOne at Jun 30 2004, 03:57:53 PM MDT 2 Comments

The First Day

Today was a great first day on the new job. I rode my bike in - which took about an hour - and arrived around 10:00. The commute is beautiful - mostly on a bike path, and mostly along a river. It's too bad I won't be doing it more (I'll likely be working from home a lot). Most of the day was spent exploring Blue Glue, source code and the sample apps. I found out that Blue Glue (which is basically a development environment installer and configurer) on Windows has gotten much better since Out-of-the-Box 2.x. Now it skips most of the Windows installers and everything is installed through OpenLogic's Swing app. It was a fun day talking about open source and how things integrate together. I'm not used to talking with folks about my open source experiences and enthusiasm - so it was a nice change.

The best part was when I received my assignment for the next couple of days: upgrade the Maven sample apps to the latest version and enhance one to include build/deployment examples. I'm also responsible for writing documentation on the sample apps for developers who use them. While I'm not a huge Maven fan, I know that some people like it and it'll be cool to create a "how to" for those folks. On the ride home, I realized that I'm really enjoying what I do right now. I'm basically developing and writing for developers. I have no "business" clients per se - most are developers: both with Spring Live and Blue Glue. The downside is that developers tend to be a pretty smart lot - and if I screw up - they'll let me know about it. Oh well, open source rocks - it's cool to be working with it full time.

The worst part of the day was coming home to over 1000 e-mails - from not checking my e-mail all day. I've got a major spam problem since about 200 of those are from mailing lists and I was only interested in 20-30 beyond that. I'm thinking of changing my e-mail address. Rather than adding more junk filters - I need to eliminate the sheer volume - it's choking both Mail.app and Outlook - and I have a 2 MB connection!

Posted in General at Jun 23 2004, 09:57:12 PM MDT 5 Comments

Google Ranking: Now at #20

I did a little navel gazing this morning after reading this post and its links. As of today, I'm the 20th result for "Matt" on Google. If I had the word "matt" in my domain name, I wouldn't be surprised, but the fact that I hardly have it anywhere probably means a lot of folks are linking to me. Maybe it's because my Google Number is almost to 50,000.

It's funny that in 1 and 1/2 years, I've gone from #213 to #20. Matt Croydon was #45 when I was #213. Now he's #30. How's that for a bunch of useless information?! ;-)

Posted in General at Jun 18 2004, 10:45:56 AM MDT 4 Comments

Know AppFuse? Wanna job?

It's too bad I've already signed a contract for the next couple of months. Today, on the appfuse user mailing list, a 2 month contract came across the wire.

Hello everyone,

My name is Mark Janveaux, I'm Chief Technology Officer at Mobile Design Technologies (http://www.mobiledesigntech.com) a software firm specializing in mobile applications for the healthcare industry.

We are developing our next generation project right now which is based off of AppFuse 1.5, and have an open position for a developer experienced in the relevant technologies (Java,JSP,Struts,Hibernate).

It's an simple but interesting project. Project length will be about 2 months with definate possibility of extension.

Position may be part time or full time depending upon your availability, skills, experience and salary expectations.

If any of you are interested, please contact me at:

Email: mjanveaux-AT-mobiledesigntech.com
Ph: 250.483.3430

This position can be 100% telecommute if necessary.

Kind regards

Mark

Of course, you probably don't need to know AppFuse. If you've worked with Hibernate, Spring, Struts, JUnit and Ant - you've probably got a good chance.

Posted in Java at Jun 02 2004, 01:18:52 PM MDT

How do you make your source tree Eclipse/JUnit friendly?

I've never had a problem getting builds and unit tests to work with Ant. However, unit tests run faster in an IDE, so I'm trying to refactor some code to allow for testing in the IDE. My current directory structure looks like this:

-- project
   - web
     - WEB-INF
       - classes

I need both "WEB-INF" and "WEB-INF/classes" in my classpath. There's XML files under WEB-INF for Spring and Commons Validator, and there's a log4j.xml under WEB-INF/classes for log4j. These files are all in their natural locations as far as all the projects I've seen. However, Eclipse won't allow me to nest classpaths - so it's virtually impossible (as far as I know) to add both directories to my classpath. Any ideas how to workaround this Eclipse "feature" are appreciated.

For those "IDEA is better" folks - I agree. IDEA allows me to add web, web/WEB-INF and web/WEB-INF/classes to my classpath with no issues.

Posted in Java at Jun 02 2004, 12:46:10 AM MDT 6 Comments

Technical Confidence vs. Fitness Confidence

It figures, just as I'm about to do a major push to get some writing done on Spring Live, I wake up with a cold. It was bound to happen since Abbie and Julie are already in the midst of it. For some reason, I thought I could avoid it.

Three years ago, as I was entering into independent consulting, I could've avoided it. Back then, I was in shape and riding my bike all the time. When I first started as an independent, I had no time to exercise, but I was in such good shape that it took me well over a month to start gaining any weight. That summer was awful - I had no time to exercise and the commute was around an hour. But the pay was awesome and the technology was even cooler. It was summer 2001 and because of my new contract, I was learning all about JUnit, Ant, TDD and Struts.

Reflecting back on that summer, and the past couple of years, I seem to go through various levels of "confidence." There are two extremes for me, and I tend to reside in one or the other. The first is "technical confidence" and the second is "fitness confidence." When I'm coding like a madman, learning new stuff, and deploying release - I'm very technically confident. I don't feel like I need to learn anything new. I feel like I'm on the right track, and I'm generally pretty happy. This is, until I leave the computer. When I start interacting with my family and friends, I start to realize how out of shape I am. In order to get things done, I tend to give up exercising. Part of it is because its easy to give up, and sometimes I just feel guilty leaving Julie to run off and exercise - especially when she's pregnant with a sick kid in her arms.

In order for me to get in shape, it takes quite a bit. In the past when I've been in shape, I usually ride my bike 6 days a week. This is a time consuming effort, averaging about 2 hours per day. However, after I've done this for about a month, my "fitness confidence" starts to rise and I really enjoy being outside or working out. The downside is that when I find time to sit down at the computer, I see a flurry of e-mail and blogs about cool new technologies. My technical confidence plummets.

It's weird. I wish I could find a balance. I wish I had more drive to improve my fitness confidence right now. Unfortunately, many deadlines are looming and I need to sit here in front of the computer to get them done. I definitely need to turn this around. Health is one of the most important things in the world, and I'm so out of shape its pathetic.

Posted in General at Jun 01 2004, 03:01:08 PM MDT 8 Comments

The Java Community - its strength is in its disunity

Charles responds (in a comment) to Ted's accusation that .NET's community is better than Java's.

Actually, the strength of the Java community lies in its disunity. Unity is a false strength: it's safety in numbers, but it's also a herd mentality. I suspect the drive for "strength in unity" is a reflection of Microsoft's philosophy of dominance: that the best thing for the world is if everyone just Does Things Our Way: A computer on every desk running Microsoft software. The Java community has competing infrastructure vendors. We have a raft of competing web frameworks, competing AOP frameworks, competing persistence frameworks, competing IDEs, competing heavyweight and lightweight containers. And it's this competition that makes Java such a vibrant community. Nobody's quite satisfied with what the other guy's doing: everyone wants to do better. It's also what makes us, at times, a bunch of bickering children. That does us quite a bit of harm, but I think in the long run things work out for the best.

Well said.

Posted in Java at May 31 2004, 12:04:14 PM MDT 2 Comments

[NFJS Denver] Ramnivas Ladded and Aspect Oriented Programming

For the 2nd session of the day, I've decided to attend the session on AOP. My choices were Converting XML (Ben Galbraith), JSF (David Geary), What's new in EJB 2.1 (Monson-Haefel) and Runtime Code Generation (Glenn Vanderburg). I asked David about his JSF presentation and he said it was "boring" so I decided to skip it. This session, in the first 10 minutes, is pretty boring too. I might have to duck out of this and attend another session - but none of the other sessions really interest me. This one started this morning, and it seems to be a continuation of this morning session. It's mostly on AspectJ and he's doing the good ol' logging example. I don't really have an interest in using AspectJ since Spring's AOP is more than adequate for my needs. Oh well, I guess I'll stick around and relax.

Ramnivas is using Eclipse to compile his aspects, and shows us how if he uses "javac" to compile everything, no aspects are added. I'm guessing that there's some sort of plugin for Eclipse that allows for easy compiling of aspects. A new feature in AspectJ 1.2 is the ability to set an ASPECTPATH and then use "aj" rather than "java" to run code. This achieves the same effect as compiling the aspects in Eclipse. The "aj" script appears to just set the system classloader.

Now Ramnivas is showing us how you can use an aspect to define pointcuts on internal appserver classes. His example involves WebLogic, the J2EE Petstore and logging any EJB method calls. To use this, he has to start WebLogic with a custom script, that has a custom classloader defined. For some reason, we're now talking about log.debug() vs. if (log.isDebugEnabled()) { log.debug() }. Ramnivas thinks that most folks don't wrap their debug statements (the proper way). Who doesn't know about this?! I'd like to think that most developers are writing the 3-line version vs. the 1-line version.

An interesting quote: "So many things to show you - 3 hours is not enough." Maybe if we didn't have to wait 2 minutes for WebLogic to start each time, 3 hours would be plenty. ;-) Ramnivas just added logging to all the classes in the blueprints packages and then reloaded the page. There looks to be several thousand method calls occurring behind the scenes for a simple page. Of course, there's lots of tag libraries - but still - PetStore is a ridiculously complex application. Why did some ever impose this crap upon us as "best practices" for Java. IMO, best practices should be based around simplicity, maintainability, testability and performance. Does the PetStore even ship with unit tests? I'll bet it doesn't...

Now we're watching a pretty cool demo where Ramnivas is using aspects to enforce coding policies. In this example, he's using aspects to enforce rules in EJBs (i.e. no static variables, swing or threads). It interesting in that the aspects actually prevent compilation and display errors defined in the aspect. It's a neat idea, but I'm suspicious in that a lot of this AspectJ stuff seems to be Eclipse-specific. What I mean by this is that Eclipse seems to be required for compilation. Is it easy to aspect-enhance your classes using Ant? I would hope so.

Ramnivas seems to be quite the AspectJ expert. He mentioned that he wrote a book for Manning and has mentioned a couple of his contributions to AspectJ in this presentation. I admire authors that write and contribute to projects at the same time. It's often an indicator that the person knows what the hell they're talking about.

This afternoon's first session choices are as follows: JSF Advanced Topics (Geary), Intro to J2EE Web Services (Monson-Haefel), JSR166 (Glenn Vanderburg), Rhythm (Brian Boelsterli) and GUI Development (Ben Galbraith). Web Services and Rhythm are 3 hour presentations, so I might stay away from those - that's just too long for me. Now that I'm sitting in the 2nd half of a 3 hour presentation - it seems that these sessions are best attended in the first half. It's almost as if the presenter is trying to find things to talk about in the second half. Or maybe AOP is just a boring-ass topic. ;-)

I'd like to go to Brian's talk on Rhythm, since he's a good friend and mentor of mine. But then again, I learned Rhythm from him - and use it daily - so I don't know that I'd get anything out of it. Advanced JSF looks good, maybe I'll go to that one. For the 2nd session this afternoon, I'll probably attend Howard's Creating Powerful Web Forms with Tapestry. Maybe I should stick with JSF and Tapestry and make it a web-intensive afternoon. Both presentations are even in the same room!

Posted in Java at May 22 2004, 12:29:31 PM MDT 4 Comments

[NFJS Denver] Richard Monson-Haefel and Groovy Programming

Groovy makes for easier for loops. As an example,

for (Iterator i = r.iterator(); i.hasNext();) {
    System.out.println(i.next());
}

... becomes ...

for (i in r) {
  System.out.println(i)
}

With Groovy, you can remove semi-colons and use dynamic typing. This means you can basically remove any types (i.e. List). The nice thing is that typing is a choice - you can use static typing like you do in Java write now.

One thing I forgot to mention about this conference. Jay Zimmerman (the organizer) has a pretty good idea. The full schedule is printed on the back of the conference badges attendees hang around their necks. This makes it very easy to find and decide what session to attend. I wish more conferences would do this.

Richard is going through closures, native list looping and how you can remove classes and method declarations. It seems to me that one of the coolest features of groovy is that all of the shortcuts are optional. This is huge IMO, because it means the developer has a choice - which is always nice. Richard says that in his experience, a program written in Groovy is about 1/5 the size of the same thing written in Java (an 80% reduction in code). Someone in the room asked about performance. I was surprised to hear Richard say that Groovy was a bit slower. After asking about this, it turns out that Groovy can be executed as a script or as native bytecode (if compiled first). So when Richard said "it's slower" - he meant the script version is slower - because it's interpreted - just like any scripting language.

Sweet - I just got a connection on the hotel's wireless network. I was in the midst of reading some RSS feeds in NetNewsWire and noticed a JRoller blog with additional coverage of this conference. ... Sorry, I got sidetracked for the last 20 minutes with the Spring developer's mailing list - talking about simplifying Spring forms in JSPs.

Back to Groovy. Richard, and several members of the audience, are talking about closures. I still don't really get what they are and why they're important. I guess I shoulda been paying attention. ;-)

Groovy has regular expressions built-in - based on JDK 1.4 Regex. In Groovy, == is the same as .equals() in Java. And === is equal to == in Java. Apparently, they did this because folks usually use == when they really want to get the functionality of .equals(). I like the idea that == in Groovy means the same thing as == in JavaScript, but I don't know how I feel about ===. I'm guessing that using .equals() is still possible.

Richard has a good presentation style. He does a lot of coding during his presentation - writing scripting, compiling and executing them. Unfortunately, since I got internet access, I haven't been paying attention as much as I should - but at least 75% of the class seems to be extremely engaged. An interesting thing about this conference vs. the MySQL Conference in Orlando. At MySQL, almost all the presenters had PC Laptops. In fact, I was one of the only ones with a PowerBook. At this conference, Bruce Tate is the first one I've seen that uses a PC. Almost all the presenters are using PowerBooks - mostly 15".

Groovy can be used for easily writing XML as well as enhancing your Ant build scripts. One thing I'm hearing at this conference, as well as seeing on blogs recently is that AppFuse's build.xml could probably use some refactoring. With Ant's new import feature and the ability to write scripts in build.xml - it's likely it could be greatly simplified. Then again, it ain't broke - so why should I fix it?

Richard's showing us how easy it is to write XML using Groovy's shell:

import groovy.xml.*;

x = new MarkupBuilder();
a = x.Envelope { Body("Hi")}

If you run this, you'll get:

<Envelope>
  <Body>Hi</Body>
</Envelope>

An interesting thing from the above demo. When Richard added "print a" as the last line in the script, it printed "Envelope" after the XML output. He said this is because the last line in Groovy is treated as the script output. That's kinda wierd IMO. GroovySQL - pretty cool and simplistic. A nice feature is that connections are automatically closed (when the script completes). Another thing Richard mentioned is that Files are also automatically closed - even when used inside an Iterator. It seems to me that Groovy is trying to stop many newbie Java developer mistakes, as well as do more automatic resource management (closing files and connection). This is actually similar to Spring in how its JDBC and ORM support manages closing connections behind the scenes. Good stuff - another tool to make life easier for Java Developers.

Posted in Java at May 22 2004, 10:34:13 AM MDT 7 Comments

XDoclet vs. JSR 175

Rob Kischuk has a post where he describes what a Struts Action might look like using JSR 175 annotations.

@StrutsAction(
  @ActionMappings({
    @ActionMapping(
      path="index"
      @ActionForwards({
        @ActionForward(
          name="success"
          path="index.jsp"
        )
        @ActionForward(
          name="failure"
          path="error.jsp"
        )
      })
    )
  })
)
public class IndexAction extends Action {

As I read it, I though - "holy crap is that ugly!" Isn't the XDoclet version a bit cleaner?

 * @struts.action path="index"
 * @struts.action-forward name="success" path="index.jsp"
 * @struts.action-forward name="failure" path="error.jsp"

I'll admit, I don't know much about JSR 175, except that it is designed to replace XDoclet. However, I don't believe that it will generate code like XDoclet does - but rather it will allow your Java code to describe metadata using doclet tags. So what good does that do? Does this mean all my metadata and configuration stuff is hard-coded into my source? With XDoclet, I realize that a lot of this stuff is hard-coded into my source, but at least I can change things by changing an ant property and rebuilding - or changing the generated XML files. Why is JSR 175 better than XDoclet? I guess I just don't see the beauty of it. More typing and uglier javadocs aren't that appealing to me.

Posted in Java at May 19 2004, 11:12:29 AM MDT 7 Comments