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.

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

Another cool photo album

Dave Watson has one of the coolest photo albums I've seen yet. And how does Kurt Eastwood make these images so sharp. Oh yeah, and he's got a nice photo album too. Those are some nice pictures - especially for the web! Can my images be this sharp? Is iPhoto making them look bad and I just need to use Photoshop to trim for the web?

Posted in The Web at Dec 08 2002, 04:29:25 PM MST 3 Comments

Colors that hurt

This java.blog seems to have some good content, but the author's use of colors hurts my eyes. It it worth reading when it causes pain?

Posted in The Web at Dec 08 2002, 04:17:33 PM MST Add a Comment

Roller Improvement I'd like

It'd be cool to have a feature where you could find/replace a string in all your weblog entries. This would be especially nice if you changed domains or found invalid links from months ago. Is this possible with SQL?

Posted in Roller at Dec 08 2002, 12:13:35 PM MST Add a Comment

Phoenix Tips and Tricks

From Matt Croydon:

The Phoenix Tips and Tricks site is a must-visit if you're running Phoenix.  The page rendering speedup makes zippy Phoenix even zippier.

I'll visit when I have more time, looks cool!

Posted in The Web at Dec 08 2002, 11:20:11 AM MST Add a Comment

Naples 0.5 Released!

The latest release of Naples (formely known as Phoenix) has now been released. I liked the name Phoenix better than Naples - what are the developers trying to imply? Life is better in Arizona or Florida? Downloading now...

This release features the ability to have multiple homepages and support for five-button mice, and fixes a number of bugs that plagued earlier releases. It is also the smallest and fastest Phoenix to date.

Oh yeah - it's faster all right!

Posted in The Web at Dec 07 2002, 04:55:24 PM MST 4 Comments

Struts Menu - Improved!

Well after working until 4 in the morning last night and most of the day today - I'm happy to say that I've completed my desired changes on Struts Menu. I've been talking with the inventor, Scott Sayles, and hopefully I can get these changes committed in the next day or so. The biggest improvements I made were adding new Displayers - one for CoolMenus (CoolMenu4) and one for DHTML Lists (ListMenu). I also added support for a roles attribute (comma-delimited) that will hide menus when users are not in that role. Of course, you will have to use container-managed security for that to work, but it's easy - right? I'm thinking we should probably add a denyRoles attribute as well, as its a pain to add 5 roles just to exclude 1.

The problems I ran into with CoolMenus4 seem to be CSS related, and the Dropdown DHTML List is a little funky when you have too many nested items. Please feel free to dig in and fix these -> should be easy using good ol' view-source copying some files locally if you like. I can also post the source if you'd like, but I think you're more interested in just a demo.

Click here for a demo (expires on 12-15-02), or download the source.

The coolest thing about this bad-ass menuing system is that you can choose a new type of menu just by changing your JSP. Of course, a little magic and you can do it based on request variables or something of the sort. Check out the permissions page for an example.

The sweetest improvement I can think of is to now make the menu-config.xml file editable through a browser - and it'll save the results for you. Even sweeter - if you're really nuts - have this UI talk to struts-config and allow you to select forwards for locations! I could dig in and work on this thing for a week - but alas, I have a chapter to write! Too bad I'm only halfway done and it's due tomorrow :-( Oh well, at least the chapter will demonstrate some good code!

Posted in Java at Dec 07 2002, 10:28:21 AM MST 2 Comments