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.

[NFJS Denver] Bruce Tate and Intro to Spring

I decided to stay in the same room after Dave Thomas's talk and attend Bruce Tate's talk on Intro to Spring. After looking through the slides, I realized that its possible I won't learn anything new - but I think I'll stick around for a 1/2 hour or so - just to hear Bruce talk. At the beginning of his presentation, he asked if anyone has downloaded Spring. Hmmm - I'm the only one in a room of about 35. Bruce then mentioned Spring books coming out in the next few months. Damn, he didn't mention Spring Live - I guess I have some more marketing to do! Bruce calls Spring's ApplicationContext a "container", but it's not really a container, but a "dictionary of instantiated objects." That sounds like a good definition to me. Spring's mission statements, or basic beliefs:

  • J2EE should be easier to use
  • It's best to program to interfaces, rather than classes. Spring reduces the complexity cost of using interfaces to zero.
  • JavaBeans offer a great way of configuring applications
  • OO design is more important than any implementation technology, such as J2EE.
  • Checked exceptions are overused in Java. A framework shouldn't force you to catch exceptions you're unlikely to be able to recover from.
  • Testability is essential, and a framework such as Spring should help make your code easier to test.

I've been working with Spring for long enough that I've actually forgot about how much easier my J2EE development life is. This session is a good reminder of how cool Spring is. Poor suckers in this room - no one is even using it. Bruce is a good speaker - and looks quite a bit younger in real life (than in his pictures).

OK, I'm outta here - time to go learn some more about CVS. Note to self - talk to Bruce and figure out how he modified JUnit's excluded.properties file. He had to do this a few weeks back in order to get Hibernate's EHCache working with Spring in JUnit tests. I was able to replicate his issue, but never solved it myself.

Posted in Java at May 21 2004, 05:28:09 PM MDT 4 Comments

[NFJS Denver] Dave Thomas and Open Source Ecosystems

Dave's talk is about bringing open source development practices into a corporate environment. The talk is not about developing open source, it's about learning from open source. Open Source is a way of developing software, a way of structuring communities and a release for frustrated developers. Dave definitely hits the nail on the head with communities and frustration. It's refreshing to work on open source projects where you have a say in the design and release goals. It's especially nice with software like Roller and AppFuse - I'm my own customer so I tend to know what I'd like to see the software do.

Open Source is driven by need, whereas many commercial products are not. Dave has had a fair amount of experience (in consulting) where he's written several thousand lines of code that never got deployed. Open Source software is measured by value - "release early, release often", encourage value, respond quickly. One of the greatest parts of open source (IMO) is feedback. Since I've been working in small development teams for the last couple of years, its essential for me that I get feedback from the community to tell me if my code looks good. It's a great way to get code reviews. BTW, speaking of feedback, Roller now has a WishList. Let us know what you want to see in Roller and we'll try to accomodate the most popular wishes.

Open Source is likely to produce high-quality applicable products because it's: driven by need, measured by value, and controlled by an evolutionary process. It also results in a very unique structure of community: volunteer, self-organizing, and geographically and culturally dispersed. Open Source projects don't have org charts. Teams are built by accretion - roles are recognized by people who can fill them, agreed by consensus. I can see where Dave is going with this. If you were able to say "I'm good at X" and you would end up doing X - development teams could be much more productive. Open Source projects consist of an Owner, Committers and Helpers. Helpers are usually power users that suggest changes and suggest improvements. In my experience, the most successful projects have very involved owners. After the Helpers come the Users - a.k.a. the Parasites! (Dave's words not mine).

This guy is good, there's been lots of laughter in this room. Dave is truly engaging and funny.

Open Source is a release for developers. Developers typically leave their day jobs, go home and work on their own time, for no money. Managers want to know why more than anything. What can you do in a corporate environment to make developers excited about their work. How can managers make developers enjoy their day job as much they enjoy open source development? One guy in the room suggests that open source allows developers to "do what they want to do" rather than "what they're told to do." Dave refutes that in saying that most of the open source work he does is support on existing projects. The crazy thing about open source - there's hundreds of thousands of developers, tens of thousands of projects - many of which produce high-quality software for little or no money with little or no management. Corporate managers wish they could figure out how to harness this energy for their own software development projects.

The major difference between open source and corporate projects? In open source, the person who starts the project cares and is capable of creating the solution. In a corporate environment, its rare that the person in charge of the project really cares - and its even less likely that they'll be the one who implements it. The solutions that Dave has seen work is when a Senior Developer and a Business Analyst are married. This way, you end up with a team that cares and acts similar to an open source project's owner. It sounds a bit far-fetched to me. The best way to bring open source practices in to a corporate environment is to adopt Agile Methodologies. Speculate -> Collaborate > Learn.

My battery is about to die - I'd better sit back and listen and quit blogging until the next session. I'm having a tough time deciding if I should go to Advanced Version Control (Thomas) or Intro to Spring (Tate). I think I'll go to Spring and if its too basic, I'll skip out and go to Dave's CVS talk.

Posted in Java at May 21 2004, 03:33:38 PM MDT 3 Comments

[NFJS Denver] Mike Clark and Continuous Performance Testing

I'm sitting in Mike Clark's Continuous Performance Testing talk right now and he's telling us about his experience with performance optimization. Unfortunately, there's wireless access in this hotel's lobby, but not in the (small) rooms. This post is being sponsored by Bluetooth and my T68i. There's two traditional methods of performance tuning - pre-optimization and after-the-fact. He's pointing out that it's most important to have well-factored code - then when you do decide to do performance optimization, it's simply easier to do.

I had lunch with Bruce and Rod Cope (my new boss) has joined us in this talk. It's cool to be engrossed in Java with my friends and peers. Choices for this first session included: EJB CMP, JDO and Hibernate (Bruce Tate), JSF (David Geary), Naked Object (Dave Thomas), Continuous Performance Testing (Mike Clark) and Practical J2EE Security (Tom Marrs).

Back to the talk - Mike is talking about JUnitPerf and how it works. JUnitPerf looks pretty easy to use, below is a simple test.

public class TunesTimedTest {
  public static test suite() {
    int maxTimeInMillis = 1000;
    
    Test test = new TunesTest("testTunes");
    Test timedTest = new TimedTest(test, maxTimeInMillis);
    return timedTest;
  }

  public static void main(String args[]) {
    junit.textui.TestRunner.run(suite());
  }
}

Looks pretty simple huh? I'm assuming that the Test and TimedTest classes are part of JUnitPerf. Next up - Profilers. Use a profiler when your performance tests fail. Low tech profiling (we've all done this) - using System.out.println with a variable and some math that prints out how long it took for a method to run. Even better - using a "Profiler" utility class that does that math for you and has start() and end() methods. Medium-Tech Profiling - JVMPI using -Xhrunprof. It spews out a whole bunch of information so you can see how long methods take to run. The problem with it? It spits out ALL the information from the JVM and your class/methods end up at the bottom of the stack. Sounds like too much information for me. Mike's take: hprof is a sledgehammer that is basically unusable in a J2EE environment. In JDK 1.5, JVMPI is going to go away and it will be replaced with JVMTI (Tool Interface). He also mentions JFluid and Dynamic Bytecode Generation

High-Tech Profiling: JProfiler, OptimizeIt, JProbe - all of which use JVMPI. Mike likes JProfile b/c it's cheap and recommends looking at javaperformancetuning.com for open source tools.

Performance Testing Cycle

  • Choose a measurable performance goal
  • Write an automated performance test
  • Run the test to baseline performance
  • Profile the code to identify hot spots
  • Tune one thing
  • Run the test again to measure progress
  • Repeat until performance goals are met

As I blog Mike's presentation, I'm starting to realize there's probably not much point to doing what I'm doing - regurgitating his presentation on the web. A better way to "blog this" event (IMO) would be if I could merely provide my thoughts and comments about each presentation I attend. The presenters will certainly get more out of it, and readers will probably enjoy the post more. But that's the hard part. It's easy to blog as a presenter speaks - but it's hard to formulate your thoughts and opinion as they speak. It's easy to blog your thoughts after the fact, but that's supposed to be the best part of NFJS - the hallway conversations b/w sessions. I could miss the first 10-15 minutes of each new presentation writing about the old one, but that's no fun either. I guess I just need to start thinking faster, formulating my opinions as fast as possible and writing them down. From now on, I'm going to try to refrain from regurgitation and go more for opinionated reporting. Is that what you'd prefer? If my readers want regurgitation, I can continue that route - I just think it makes for boring entries.

Man, these are long sessions. I just looked at the schedule and all the talks today are 1 1/2 hours! That's too long IMO. I'd loathe it as a speaker and as an attendee - I'd prefer 45-60 minute presentations. Mike's a good speaker, but it's tough to keep anyone's attention for more than an hour - unless it's something like soft core porn.

Choices for the next session are: Programming with Hibernate (Tate), Rapid UI Development (Geary), OpenSource Ecosystems (Thomas), Java Classworking (Dennis Sosnoski) and Getting Fit (Daniel Steinberg). I'm leaning towards Rapid UI Development or OpenSource Ecosystems.

Posted in Java at May 21 2004, 02:09:30 PM MDT Add a Comment

New JSPWiki Template - Springtime

I put together a new JSPWiki template this week - and I'm calling it "springtime" for now. I don't mean to reference "Spring" as in the Spring Framework, but rather Spring as in a fresh, crisp look. A lot of the styles I actually took from my Struts Resume stylesheet. For a demo, I've replicated my current wiki onto my demo server and changed the template to springtime. Whaddya think? Do you like it better than the "Redman" template I'm currently using?

Feel free to download either of these templates: Redman · Springtime

Posted in Java at May 21 2004, 06:04:17 AM MDT 3 Comments

Denver's No Fluff Just Stuff begins today

Denver's No Fluff Just Stuff begins at noon today. I'm pumped since I've tried to go the last two and never made it. It looks to be a very fun weekend with lots of knowledge stuffed in my brain that I'm sure to forget in a week or two.Anyone got any suggestions on sessions to attend? If prefer sessions that have interesting topics and good speakers - but I'm open to anything. I plan to go with the flow moreso than to try and learn everything I can.

Speakers I'm looking forward to: Brian Boelsterli and Rick Hightower. Brian is a mentor of mine that I first met in May 2001. We commuted together for 6 months and I learned a lot about independent consulting, fatherhood and agile development from him. Rick is also a good friend and of course I'm gonna be interested in his talk on AppFuse!

Posted in Java at May 21 2004, 05:43:22 AM MDT 5 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

Recovering

Yesterday I got inspired to get myself out of this funk and go to a local VW Show with the fam. I woke up, took a shower and almost passed out. Probably from standing up more than I'm used to - or the dizziness that constantly surrounds me. After resting awhile and popping a pain killer, we jumped in the car and headed out to Golden. The show was awesome and I saw lots of nice buses and bugs - and even joined the Colorado VW Bus Club. I felt dizzy most of the time, still no appetite - but nevertheless - I was active. It felt great. I spent the rest of the day on the couch with passing fevers.

This morning I woke up determined to go to work. After waking up, I headed into the living room with breakfast. Julie took my temperature and said it was around 101. So I popped some Tylenol and decided to rest for an hour before heading into the office. After resting and taking a cold shower - I got dressed and headed into the office (40 minutes North). I was sweating so bad - I guess from the fever breaking - that I had to take a towel with me for the trip. Anyway, to make a long story longer - I made it to the office and worked most of the day w/o any issues. I also managed to submit my two weeks notice to my current client. He wasn't surprised and said he'd been expecting it sooner or later.

So where am I off to? EJB Solutions - the inventors of Out-of-the-Box - for a 3-month contract. I grew to love Out-of-the-Box after my last Linux install and I'm very excited about working on a product I love. Here's the best part. I asked them what I might be working on for the first month. Here is their response:

...updating sample applications, especially those using Hibernate, XDoclet, and Struts to bring them up to date with the latest versions, recommended idioms, beef them up, etc.

Sounds like fun, eh? I'm pumped and can't wait to start in two weeks! Another intriguing factor for me was I can ride my bike into the office (when I do go in) and it's shorts and t-shirts all summer. Denver summers + riding bike to work + shorts and t-shirts allowed at work = a very happy Java Developer. The contract is scheduled to end when Raible #2 is born (Labor Day Weekend - September 3rd). After that, I'm taking a month off to be a good Dad and hopefully I'll be able to find another contract starting in October.

As far as my illness and contributing to open source, I've come to realize that my body is capable of amazing feats. Sleeping 2-3 hours a night, coding 20-some hours per day. But it's no life for me. However, it was a life I was planning on living all the way until Spring Live is finished in late June (right before JavaOne). I'd still like to finish the book by then, but it's going to take a serious shift in priorities. Which basically means, drop everything and work on the book.

I'll probably still try to get AppFuse 1.5 documented and released by the end of the month - but then I really need to virtually abandon all my open source contributions. It's just the only way I can see to pump out 150 pages of Spring stuff in 1 week off + a bunch of late nights. I still plan on blogging a lot b/c when I'm busy I tend to blog more. I think AppFuse could use the lack-of-development for awhile - it wouldn't hurt to stabilize the code-base over the summer.

Posted in General at May 17 2004, 08:56:54 PM MDT 6 Comments

Bleeehhhh

It's been a week and a half now since I started feeling sick. Don't worry, I'm not dead. We used to live out by the intersection where the accident happened and one of our old neighbors drove a blue Dodge Durango. Hopefully they're OK. Regardless, this is a tragedy that my words surely cannot help.

We did make a trip to the Emergency Room on Thursday night (which also happened to be Julie's birthday). We decided to go to the ER because my fever hit 105 and we figured the ER could tell us something about my affliction. After CAT Scans and a spinal tap (among other things), they came to the same conclusion as my doctor on Monday - "some kind of virus, hopefully you'll get better in a week or two." The good news is it's not Menengitis, Mono or West Nile. Wednesday and Thursday of last week were the worst - where I spent pretty much all day in bed. If I was awake, I had a dull-throbbing headache and a fever.

The pain isn't too bad, but the body aches and brain-cloudiness are enough to keep me from working or wanting to do anything. I'm expecting that I'll simply wake up one day and I'll just feel better. I can't wait - I'm tired of having 2-3 fevers per day. I also feel like my todo list is just getting longer with my lack of productivity. Oh well, I'm sure there are some parts of my body that are enjoying the lack of stress.

Posted in General at May 15 2004, 04:23:04 PM MDT 7 Comments

What the hell is wrong with me?

Ever since last Tuesday, I've felt like shit. My sickness has mostly been body aches and dizziness. Body aches like you get when you sleep too much. Dizziness like when you stand up too fast. It started shortly after I finished work on Tuesday and resulted in a 7:00 p.m. bedtime for me that night. The next day, I felt good enough to wake up at 4:00 a.m. and knock out a bunch of code. When I went on a bike ride on Wednesday afternoon, the dizziness started again - fading in and out every few minutes. I was still able to climb the mountain, but I was pretty damn slow. Over the next few days, the dizziness has increased from being prevalent in the evenings to disrupting my whole day.

Yesterday, for Mother's Day, we went out to a nice brunch and I downed a few Mimosas. By the time the meal was over, I was holding my stomach in pain. I cured the pain with an afternoon nap - but woke up with a fever. The fever hung around for a few hours, but eventually broke. Today was more of the same: dizziness, pain in my stomach, body pains and loss of appetite. We figured it was about time I went to a Doctor. We had suspicions - everything from an ulcer to colon cancer. Yeah, Julie kept giggling with the though of a Barium Enema for yours truly.

Unfortunately, the doctor did not have a quick and simple diagnosis of my affliction. He said that I have all the symptoms of West Nile, but it's too early and I haven't seen any mosquitos. He came to the conclusion that its some kind of virus and hopefully I'll be better in a week or so. They extracted my fluids for testing - so hopefully they'll have some more information for me tomorrow. In the meantime, I remain slightly feverish, a little dizzy and my body is engulfed in a dull pain. It's not a crippling illness, just annoying - annoying enough to keep me de-motivated for many computer-related activities. Too bad I have two clients that want releases this week, as well as AppFuse 1.5 final.

If you don't hear from me in the next few days, its likely gotten worse.

Update: The doctor called this morning (the day after the above post) and said all my fluids came back normal. Therefore, they just think it's a virus of some sort. Thanks to all who commented - I wish it was just exhaustion. Unfortunately, it seems to be much worse than that since I tend to recover from exhaustion in a couple of days. Now I'm just hoping that I'll recover before Denver's NFJS.

Posted in General at May 10 2004, 06:23:50 PM MDT 26 Comments

Weekend Releases :: XDoclet 1.2.1, Tomcat 5.0.24 and Cactus 1.6

While many folks were oohing and awwhing over how EJB 3.0 will make their worlds easier and app servers viable again - some folks continued to get things done:

BTW, thanks to all the Symposium Bloggers - with all the good reporting, I felt like I didn't miss a thing.

Posted in Java at May 10 2004, 10:45:03 AM MDT 3 Comments