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.

Postcard from Hawaii

My Mom and Dad are having a rough week - we received the postcard below from them today. My sister, Kalin, and I surprised them with a trip to Hawaii for their 30th wedding anniversary (November 16th). They never had a honeymoon when they originally got married, so we figured they'd enjoy one now! My dad was stationed at Waikiki beach when he was in the Navy - so he's having a lot of fun re-living old memories. I used Kurt's sharpen, resize, sharpen again technique on the scanned postcard below - seems to have worked pretty well. My gung-ho mom writes that she went running at 5:30 in the morning and there were a lot of folks already up and about. Running!? At 5:30 in the morning?! Yeah, she runs marathons too! She hadn't exercised in her life, in the traditional sense - we always got plenty of exercise living at the cabin - until my sister and I moved out. Now she's over 50 and in the best shape of her life! Go Mom - you're awesome.

Postcard from Hawaii

Posted in General at Dec 09 2002, 11:01:23 AM MST Add a Comment

Application Configuration - Roller Style

Lance jumps into the application configuration debate:

To comment on Jeff's continuing configuration quest, I would add my vote to trying out Betwixt/Digester as the engine. I used this to build the RollerConfig object (for Roller, duh) and it was stupid-simple. I spent a couple hours futzing around trying to get it "perfect" (Betwixt has some inclusion/exclusion rules that I was unable to get to do what I want) but it was unnecessary work. So Jeff, if you want an example, check out the Roller cvs for RollerConfig. The roller-config.xml is here if you want an example of that as well.

I thought Roller used the Castor-way I suggested, but nope, it uses Betwixt. Betwixt is a commons project, so it's got to be good, eh? I especially like the ease of reading, writing the XML files. From RollerConfig.java:

/**
 * Read the RollerConfig from a file,
 * as specified by an InputStream.
 */
public static RollerConfig readConfig(InputStream in)
{
    try
    {
        BeanReader reader = new BeanReader();
        reader.registerBeanClass( RollerConfig.class );

        Object obj = reader.parse( in );
        if (obj instanceof RollerConfig)
        {
            RollerConfig alpha = (RollerConfig) obj;
            //System.out.println("RollerConfig readConfig:"alpha);
            return alpha;
        }
    }
    catch (Exception e)
    {
        System.out.println("Exception reading RollerConfig:" + e.getMessage());
    }
    return new RollerConfig();
}

/**
 * Write RollerConfig to file,
 * as specified by a String path.
 */
public void writeConfig(String path) throws Exception
{
    FileOutputStream out = null;
    try
    {
        out = new FileOutputStream(path);
        this.writeConfig( out );
    }
    finally
    {
        try {
            if (out != null) out.close();
        } catch (java.io.IOException ioe) {
            System.err.println("RollerConfig.writeConfig() unable to close OutputStream");
        }
    }
}
/**
 * Write RollerConfig to file,
 * as specified by an OutputStream.
 */
public void writeConfig(OutputStream out) throws Exception
{
    BeanWriter writer = new BeanWriter(out);
    writer.enablePrettyPrint();
    writer.setIndent("    ");
    writer.setWriteIDs(false);
    writer.write(this);
}

One thing I noticed in this class is the long and painful-looking toString() method. How about a little reflection to improve that sucker:

public String toString() {

    StringBuffer results = new StringBuffer();
    Class clazz = getClass();

    results.append(getClass().getName() + "\n");

    Field[] fields = clazz.getDeclaredFields();

    try {
        AccessibleObject.setAccessible(fields, true);
        for (int i = 0; i < fields.length; i++) {
            results.append(
                "\t"
                    + fields[i].getName()
                    + "="
                    + fields[i].get(this)
                    + "\n");
        }
    } catch (Exception e) {
        // ignored!
    }

    return results.toString();
}

Posted in Roller at Dec 09 2002, 08:25:40 AM MST 2 Comments

Random Text Generator

Here's one to bookmark, the random text generator. As Zeldman says,

On some corporate sites, Lorem ipsum dolor sit amet, consectetuer adipiscing elit would be an improvement over the actual copy.

Posted in The Web at Dec 09 2002, 07:34:07 AM MST Add a Comment

The headache that won't end

I've had a headache ever since I had the stomach flu last week. It's pretty bad in the mornings - almost a migrane/throbbing type of headache. Of course, it could be due to stress from writing these chapters, or from staring at the computer screen too long. BUT, Julie's mom, who also got sick, has been experiencing the same never-ending headache. I can't help but wonder if this is something related to the war on terrorism - did I catch some type of virus that is going to kill me in a month?! Julie thinks I'm full of it - she doesn't have a headache. I wonder if I should go to the doctor or just quite staring at this damn screen.

Posted in General at Dec 09 2002, 05:18:53 AM MST Add a Comment

J2EE 1.4 as Open Source!

Erik gave me the link to this article from The Register. This sounds like big news to me.

Marc Fleury, Atlanta-based JBoss' founder, told ComputerWire yesterday the company has finished its implementation of Java 2 Enterprise Edition (J2EE) version 1.4. J2EE 1.4 is due for official publication by the Java Community Process (JCP) in the first quarter of 2003.

Fleury said JBoss would now seek standards certification for its implementation. JBoss stands to become the first open source group to deliver a version of J2EE 1.4 under the revised JCP.

JBoss received the green light last week, after Sun told ComputerWire that it would allow all of the APIs contained in J2EE 1.4 to be open sourced. Fleury had expressed concern that certain critical APIs, including Enterprise Java Beans (EJB) 2.1, would be not be made available to open source organizations.

That reminds me that Marc Fluery will be speaking at the next Denver JUG meeting. That's Wednesday of this week. The Basic Concepts preso is covering Ant. I could probably skip this as these are usually pretty basic, but I'm expecting the place to be packed so I'd better get there early. Now I just have to see if I can get a few friends to buck up and go. I know a fair amount of developers that don't use Ant - how bad would that suck?!

Posted in General at Dec 09 2002, 04:01:59 AM MST Add a Comment