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.

New Job, Struts, Testing Frameworks and Maven

I found out this afternoon that they want me for the job I interviewed for yesterday. I'm expecting to start on Wednesday. It's a small team of 3 folks and should be a lot of fun. I'm really looking forward to getting back into an office environment where I can converse with co-workers and such. After blogging for the last few months, I feel like the java.blogs guys are my co-workers, but it's still fun to talk and interact with folks. I never used to like it - I'd bring my lunch to work everyday, and hunker down like a code monkey the whole time - just trying to get my 8 hours in and get outa there. I'd get annoyed when people would stop to talk about their weekend or other random stuff. Now I'm going to be that guy - I'd better watch for the telltale signs of get the hell out of my cube! I wonder if we'll even have cubes? The floor where my interview was had just cleared out a bunch of folks - it was empty when I went in there. When I say cleared out, you know what I mean. Needless to say, there is plenty of space and plenty of computers available -- it'll be interesting to see what I get.

My last project had horrible machines - NT4 Gateways with 4MB video cards and about 700 Mhz. And this was last year!! I had just bought a brand new Dell 8100 P4 1.5 Ghz 2 weeks before I started the gig - so you can imagine my disappointment. And I was running XP at the time, albeit a beta version. But still, I felt like I was taking a huge step back in time. So I brought in my own Windows 2000 CD on my 8th day on the job. It all looked to be going pretty smooth (and the install was about to finish around 7 a.m. - I got there at 5) when everyone started rolling in. The video drivers weren't compatible and I was forced to humbly call tech support and tell that how I had violated all the rules. This place at least has Windows 2000, and I have my Powerbook, so all should be good. I just hope I can get a dual monitor setup - there's nothing quite so enjoyable.

This evening I did some minimal development on AppFuse. I spent most of the day writing the Struts Chapter. I'm on page 12 and expect to do 10-20 more pages. It was fun writing because I described tools that make developing Struts apps easier: Ant, XDoclet, JUnit, StrutsTestCase, and Cactus among others. I dug in a little to the Testing frameworks and played with them, but nothing too serious. I can waste many hours coding and I need to finish writing, then code later. I used 2 very cool tools today. The first is Canoo's WebTest. It basically is a framework built on top of HttpUnit that allows you to write all your tests as Ant tasks. It's fricken sweet as you don't have to really write any code, and it just worked for me. Check out this file (XML) to see how easy it is.

The 2nd tool was written by Erik Hatcher to generate JSPs and a resource bundle based on a Struts ActionForm. I hadn't tried it out until tonight and it just worked - my favorite feature in any software. The one area I think I might run into issues (in generating all this code), is when I have ArrayLists of beans on a form. I think Hibernate will allow this using Sets, Lists and other types of Collections, but I'm doubting that XDoclet's strutsform task will support it and I don't think Erik's too; generates nested tag libraries or anything like that. This is unfortunate because I'll probably get a wild hair up my you-know-what and want to create this functionality. And there goes my deadline, right out the window. Need.... to ... stay ... focused..!

Lastly, I made an attempt to mavenize AppFuse. It was pretty easy at first, as you're only required to alter this XML file to fit your project's needs. I realized I didn't have much as far as a CVS repository, mailing lists, etc., but I also realized that these would be almost essential to any project. And they'd certainly make things a lot simpler - even on a small team. When I got to the dependency section (which is what I really need), I sorta gave up. Here's my dependencies and their presence at the Maven Repository:

So while Maven looks great, it doesn't offer all the third-party jars I need. Is it possible to partially integrate? Also, I found the documentation to be a bit lacking on how exactly to configure each dependency. Is there a standard naming convention or versioning to rely on? It'd be great to have a list and possible versions - or even XML fragments you can copy/past. Can we, as developers, contribute nightly builds to the repository? I'd love to use both AppFuse and Maven at my new project, but I hate waiting on things to happen. If I can do anything to make the above modules/versions present in Maven, let me know.

Posted in Java at Dec 13 2002, 06:23:07 PM MST 1 Comment

JBoss and J2EE Certification

I don't know if you've read this article that says JBoss is going to develop an open source implementation of J2EE 1.4. Of course, they already did this with 1.3, they just never got J2EE Certified, so they were unable to claim this. The interesting part about this article is that Marc Fleury said (on Wednesday night) that he never said a word of what was published in the article. Furthermore, he and the JBoss group has no interest in becoming J2EE certified, especially because of the $300,000 price tag. However, after the article was written, and received all this press from it - he is now going to get certified. How ironic is that?!

Posted in Java at Dec 13 2002, 05:55:47 PM MST Add a Comment

A Christmas Tree

I've added a Christmas Tree to this site to decorate a little for the holidays. Hope you don't mind. Like all new additions, I had to make room for it and adjust some margins so it didn't hide behind anything. Feel free to steal it if you like. The CSS to make it a background is available with a good ol' Ctrl+U. You should be glad this is all I did - the first one I tried was animated... Happy Holidaze! Merry Christmas!

Posted in The Web at Dec 13 2002, 11:34:49 AM MST Add a Comment

Setup a Certificate Authority for Java-based Systems

I feel obliged to report on security in web applications now I've written a chapter on it. DevX has an article on how to Set Up a Certificate Authority for Java-based Systems. Along the same topic of security, Lance sent me this humorous story about a hotshot security manager.

Posted in The Web at Dec 13 2002, 10:06:28 AM MST Add a Comment

E-Mail Notification of Comments

I requested a new feature today for Roller - the ability to receive e-mail notification when comments have been posted. I mentioned this wouldn't be too hard using the mailer tag library. So I got slightly motivated and did it myself. I think to add it to Roller, we should make it a little more configurable, but here's what I added above the form in weblog/comment-form.jspf:

... define mailer and c taglibs of course ...

<c:if test="$\{param.method == 'update'\}">
    <mt:mail server="smtp.domain.com">
        <mt:setrecipient type="to">[email protected]</mt:setrecipient>
        <mt:from><c:out value="${param.email}"/></mt:from>
        <mt:subject>Comment: <bean:write name="blogEntry" 
property="title" scope="request" /></mt:subject>
        <mt:message><c:out value="${param.content}"/>

<c:out value="${param.name}"/>
<c:out value="${param.url}"/>
        </mt:message>
        <mt:send>
            Doh! An error has occurred sending comments notification!<br />
            <mt:error id="err">
                <jsp:getProperty name="err" property="error"/>
            </mt:error>
        </mt:send>
    </mt:mail>
</c:if>

I had to put those \'s in their in order to get past Velocity. The one pain with the mailer tag library is everything comes through with the spacing as set in the JSP. That's why the name and url variables are squished all the way over to the left.

Posted in Java at Dec 13 2002, 07:21:56 AM MST 2 Comments

Jenerator

I heard about Jenerator on the mailing list this morning. Sounds cool.

The Jenerator Version 0.9 is a code generator (Licensed under the Academic Free License version 1.1) and hosted on SourceForge, which takes meta information from different mediums, applies XSL templates and generates code. Unlike other code generators, which use JavaDoc custom tags to define and describe what is to be generated, Jenerator uses XML based Descriptor files.

It's got a heck of a list of features too: supports regeneration, EJBs, VOs, Unit Tests for JUnit and Cactus, Ant's build file, JDO source descriptor, and Servlets. While all this sounds good, I probably won't even download it - I'm just not interested as I really like how XDoclet works right now. I might change my mind in a few weeks, but I've learned too much to give it up now.

Posted in Java at Dec 13 2002, 02:47:53 AM MST Add a Comment

What Maven Does

I, like Charles, was unsure of what Maven did. James has made it clear and I have seen the light - I think. In my AppFuse project, I have a lib directory that contains all the various third-party jars I'm using in my build process. Among these are XDoclet, Struts, Cactus, JSTL, Hibernate, JUnitDoclet, etc. The problem is that this directory is ~16MB and if I add it to CVS, I've got a monster project. The zipped up version of AppFuse's source is 14MB! That's enough to scare off folks right there.

It sounds to me that Maven can help me out in 2 ways. It can be used to download and install these jars as part of the build process. Slick if it can! Can it get me nightly builds from CVS? The 2nd feature seems to be building a project website for me. That's cool and definitely better than my simple readme file. However, can I make my site look like this (my site) rather than this (Maven site)? The good news I see is that the generated website does use XHTML and a DOCENGINE:

<!DOCENGINE html PUBLIC "-//CollabNet//DTD XHTML 1.0 Transitional//EN"
    "http://www.collabnet.com/dtds/collabnet_transitional_10.dtd">

The bad news is that it's not a standard DOCENGINE and even after I override the doctype and charset, it still does not validate. Of coure, this may not be a big deal, but if this were to be more "standard" it would be easier to convince folks like me to jump on the bandwagon. If there's templates I can modify, show me, and I'll dig like a miner that's struck gold.

Posted in Java at Dec 13 2002, 12:25:05 AM MST 2 Comments

Another Hibernate Example

Konstantin Priblouda has put together a small demo showing hibernate in action:

  • XDoclet generated mappings & service descriptor for JBoss (.sar file) - these were mentioned by Marc Fleury at his presentation. The basically are Service ARchives and allow for pluggability/removeability in JBoss.
  • Session bean accessing hibernate.
  • Small client.

Posted in Java at Dec 13 2002, 12:08:33 AM MST Add a Comment