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.

[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