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.

Switching from AT&T to T-Mobile

We recently switched from AT&T to T-Mobile for our cell phone service. There were two reasons for this - the primary one being that AT&T's customer service sucks. Every time we'd call them to get simple issues resolved, it would take upwards of 20 minutes to talk to someone. The 2nd reason we switched is because I ended up paying over $200/month in June and July. This was because I kept using my phone for dial-up while at NFJS and JavaOne. I shoulda had more data (I was at 4MB), but their max is only 12MB, and every time I'd try to change it, I'd get fed up with waiting to talk with someone.

Julie made the switch a few weeks ago. After spending a 1/2 hour on hold (with Abbie crying the whole time) and then AT&T transferring her after she finally talked with someone - she'd had enough. A week later we received new T-Mobile phones. The phones are crap b/c they're the free ones, but they do work and we do have the same numbers. Now my problem is that I'd like to use my T637 with T-Mobile - but everyone seems to be giving me the run-around. I need to "unlock" the phone b/c the T-Mobile SIM causes my phone to display "Invalid SIM".

T-Mobile stores say to take it to AT&T, and AT&T stores say to call customer service. I've called customer service, and after waiting 20 minutes, they said to call Sony Ericsson. Now I come to you my mobile friends - Julie said she saw something on the web were you can send your phones in to get them unlocked. I don't know if it's legal, but I'm willing to do it if I can get my T637 working again. Any advice is appreciated.

Posted in General at Aug 23 2004, 02:48:40 PM MDT 14 Comments

Just take her with you

Abbie's a Hiker! With my hectic schedule lately, it's been tough to get a workout in and not piss off Julie or Abbie. When I'm done working, Abbie wants to play like a crazy lady. I don't blame her - we have a lot of fun together. If I finish the day and walk into the living room to tell them I'm heading out to get some exercise, both of them get mad. Julie because I've been working all day and she wants a break; Abbie because she's ready for some fun.

About 2 weeks ago, we were all a little huffy at each other as I wanted to head out for a run before DJUG. Julie was trying to convince me to skip it so I could spend some time with Abbie. Abbie saw I was leaving - put on her shoes and ran to the door to go with me. Everyone was tense and Julie says "Just take her with you!" I laugh b/c our stroller isn't a jogging stroller, but then I realize it wasn't a bad idea.

Abbie usually can't sit still in the stroller for more than a few minutes, so even though I thought it would be a disaster, I took her anyway. I jogged and pushed her around our local park - and to my amazement - she loved it. She didn't want to get out once - she just giggled and laughed and pointed out all the dogs and airplanes. Since then, we've gone a couple times.

Getting bold with this new "take her with you" mantra, yesterday I took Abbie on a hike. Rather than a simple walk around the lake, I wanted to take her on a real hike. So we trekked on out to the foothills, strapped her in the backpack and headed up Mt. Falcon. This is a beautiful trail that I used to mountain bike a fair amount. I expected an hour trip, but it ended up being an hour and 40 minutes. How did Abbie do? She loved it. Sure we had to stop a few times, and of course she didn't want to get in the backpack after doing so, but I had lots of joose and gummy bears, so she was happy. It was something I'll remember for the rest of my life - especially the last 20 minutes where she made me sing to her the whole time. A true father-daughter experience - I'm looking forward to many more. I can't wait until Raible #2 arrives, I'm taking a month off and hope to enjoy a lot more days like yesterday.

Posted in General at Aug 22 2004, 05:57:30 PM MDT 9 Comments

My Tiles to SiteMesh Migration

I spent a few hours last night replacing Tiles with SiteMesh in AppFuse. I had the Struts version done in 2 hours, and most of the Spring version done in an additional hour. Then I spent another 3 hours today twiddling with things and getting it just right. During this process, I discovered a few things I thought I'd share. Keep in mind that I'm pretty much a SiteMesh rookie. Hopefully, implementing and using it in AppFuse will help me to fully understand its power.

  • SiteMesh lacks injection. Tiles allows you to inject JSP fragments into your base layout on a per-page basis. I didn't use this feature much, but I did use it to determine which menu should show up on what pages. For example, the login page would get a "projects used" menu, the signup page wouldn't have a menu, and all other pages would get the standard site menu. With SiteMesh, all of this seems to be done best with JSP includes and some <c:if> logic in your decorator. I ended up using <c:import> in my login.jsp for the login menu, importing nothing for signup, and using <c:if> statements in my decorator to see if the user was logged in. If they were, then I import the site menu and its necessary scripts and styles. In the end, this worked fine and it's probably easier for new AppFuse users to understand - so that's a good thing.
  • Injecting scripts and stylesheets. With Tiles, I was able to easily control which scripts and stylesheets were shown on each page. With SiteMesh, this is pretty easy to do by putting them in the <head> element of your page. However, what I would've really liked to see is the ability to put these in an included JSP and have them end up in the <head> of the final document. I know it's virtually impossible, but it would be cool.
  • Headings. Adding a <title> title element per-page works great using the <title> tag. However, if you want to add a heading (which I specify with an <h1> tag), you have to use a <content> tag. It would be cool if I could somehow use <h1> or <heading> in my page to indicate a heading. I ended up going with the following in each page to specify the title and heading:
    <title><fmt:message key="mainMenu.title"/></title>
    <content tag="heading"><fmt:message key="mainMenu.heading"/></content>
    There's probably an easier way to do this, but this works for now.
  • Injecting <body> ids. Using body ids to set styles on a per-page basis is a great way to control CSS. With Tiles, I set this as an attribute in tiles-config.xml and then grabbed/used it with the following JSTL code:
        <c:set var="bodyId" scope="request">
            <tiles:getAsString name="body.id" ignore="true"/>
        </c:set>

    <body<c:if test="${not empty bodyId}"> id="<c:out value="${bodyId}"/>"</c:if>>
    Yeah, it's ugly, but it works. With SiteMesh, you can easily set a body id by using <body id="name">. In fact, you don't even need to wrap your content with it, you can simpley do <body id="name"/>. I'm grabbing and using this in my decorator with the following code. This works, but it would be cool if I could check for the existence of the attribute first - so I could eliminate id="" when no body id is set.
    <body id="<decorator:getProperty property='body.id'/>">
  • Inheritance. With Tiles, you could extend page definitions and override attributes. This feature seems to be completely lacking in SiteMesh. I don't know how you could implement it, but it would be nice to have something where you could specify the parent - for instance, to use the same <head> content.
  • Error page decoration. SiteMesh seems to be incapable of decorating error pages (i.e. 404) in Tomcat 5.0.x (even if I add <dispatcher>ERROR</dispatcher> to the filter-mapping). A workaround is to use wrap the error page with a <page:applyDecorator> tag. This works, but if you specify elements in <head>, they will end up in the body of page, rather than in the decorator's header.
  • SiteMesh simplifies. Switching from Tiles to SiteMesh allowed me to delete somewhere around 8 JSPs. AppFuse has 34 after committing everything. Most of these were JSPs that sat in the root folder and had a one-liner to pull in a Tiles definition. However, it also eliminated 11 JSPs from the Spring MVC install - allowing reduction of duplication. The Spring MVC install now has 17 JSPs.

So there you have it. AppFuse now uses SiteMesh instead of Tiles! I'm sure the implementation will get cleaner and more refined as more folks use it. I'm looking forward to deleting some chunks out of AppFuse's tutorials because SiteMesh makes page development so much easier. The hardest part of SiteMesh is setting up the infrastructure. Once you're got that done, you hardly ever touch it again.

Next task: WebWork integration.

Posted in Java at Aug 21 2004, 11:50:50 PM MDT 14 Comments

One thing's for sure

The Java Community certainly does care about JSF. Regardless of whether folks like it or hate it - there's definitely a lot of opinions! Who woulda thunk a simple blog entry would get so much traffic? Wierd.

You know it's a late night when Erik posts before you go to bed...

Posted in Java at Aug 20 2004, 04:52:09 AM MDT 10 Comments

FindBugs

I ran FindBugs on AppFuse last night and found/fixed a number of issues as a result. I'm now down to only a handful left - most of them being "Class is Serializable, but doesn't define serialVersionUID". I tried to generate one using serialver, but I couldn't it to work after numerous attempts. My issues seemed to be classpath related: it wanted the servlet api in my classpath, and once I'd add that, it could find my class. I'll have to try the SerialVer Ant Tasks. Fixing this issue would be nice, but I doubt it's really affecting appfuse-based applications. The other bug is "Inconsistent synchronization" in UserCounterListener.contextInitialized() method. Any tips on solving this one are appreciated.

Posted in Java at Aug 19 2004, 09:46:50 AM MDT 15 Comments

Setup Apache 2 and mod_jk2 on OS X

From the Denver JUG Wiki, I found Server Logistics. There I found an Apache 2 installer and mod_jk2 installer (in the Connectors folder) for OS X. Time to install and get working: under 5 minutes. Got it all working with Tomcat 5.0.27 and all I had to do was restart Tomcat after installing everything.

Posted in Mac OS X at Aug 18 2004, 05:25:45 PM MDT 1 Comment

Should I ditch Tiles in AppFuse?

I've haven't been developing applications with AppFuse since May. Instead, I've been using Equinox. One of the main things in Equinox I've grown to love is SiteMesh. It's worked in all the webapps I've written, which utilize frameworks like Struts, Spring MVC, WebWork, Tapestry and JSF. Tiles will only work in 3 of those.

I think it's time to make an executive decision on AppFuse and ditch Tiles in place of SiteMesh. It's faster and easier to develop with, and it doesn't get in your way. In fact, I didn't have to change a single line of SiteMesh-related code to support any of the aforementioned frameworks. Furthermore, using SiteMesh would also greatly reduce the duplicate between frameworks. I've thought about keeping Tiles around, but it's a pain in the ass to maintain parallel sets of documentation.

Whaddya think - any reason you can think of to keep Tiles? I can't. In fact, I think I'd cringe if I had to start my next AppFuse-based project w/o SiteMesh.

Posted in Java at Aug 18 2004, 10:11:56 AM MDT 33 Comments

False alarm?

Julie just went to the doctor because she's been up all night and feeling some pain. She was in hard labor for 24 hours with Abbie. She definitely doesn't look like she's in labor if compared to her previous one. But you never know. The nice thing is the hospital is only two blocks away.

Update: It was indeed a false alarm. However, the doctor said her cervix was soft and the baby's head is right there. He also said it's probably a sign that labor will start in the next day or two. :-D

Posted in General at Aug 18 2004, 08:25:58 AM MDT 5 Comments

Denver JUG gets a makeover

I just noticed tonight that the DJUG website got another makeover - and it looks great. Nice work Renee! Not only that, but the line-up of speakers and topics for the coming months is awesome: Dion, Mike, Bruce and yours truly. I actually enjoy DJUG meetings more than I do conference sessions. The speaker is not fixed to a certain time (though they are encouraged to be under an hour) and you get to have beers with them afterwards.

Posted in Java at Aug 17 2004, 10:59:19 PM MDT 6 Comments

Which one are you?

Which type of developer are you - Asshole or Moron? I'm a moron as far as I can tell. 8-}

I got a free copy of Mark's Dive into Python at OSCON. Apress said they'd give it to me if I agreed to post a review on Amazon. I hope Mark's writing is as good as his blog.

Posted in Java at Aug 17 2004, 11:20:13 AM MDT 2 Comments