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.

Sun's Guerilla Cannibal Team

James Governor:

... Sun would do well to build a new team tasked with putting pressure on its own software portfolio. This disruptive influence would ideally eschew technologies associated with the Java Enterprise System. Instead it would concentrate on other issues such as establishing a business model for the Roller blogging platform, or working out a non-virtual machine story for scripting languages. Doing cool things with Rome and Atom. Focusing on mashups, Web 2.0, Read/Write and programmableweb and new ways of getting things done. Oh yeah - AJAX.
...
So who is on the A-Team, in my view?

  • Hal Stern - Hal is a playful, but could play the role of Corporate Guy on the guerilla team. As a Sun Services representative he can bring some very useful resources to the table. Many of the new approaches in web 2.0 require hosting. That's a potential services play. Note that IBM Global Services doesn't like hosting easy software that doesn't require a lot of expensive customisation.
  • Simon Phipps - Simon is currently Sun's chief open source officer. Perhaps counterintuitively, as the rest of the industry begins to realise that Sun isn't "out out get" OSS, his role may become less, rather than more, important. A successful open source strategy requires less top down management of issues. So why not free up Simon to do what he does best. Contrarian Evangelism.
  • Tim Bray - developers respect Tim almost without reservation (although his championing of ATOM has left some people scratching their heads). He even thinks of himself as the honourable opposition. Needs to be on the team because he has a visceral dislike of space architecture and WS-I.
  • Dave Johnson - the developer behind Roller. He just gets the new new thing, and he builds stuff, rather than talking about it.
  • Matt Raible - doesn't work for Sun, but works well with Dave. And RedMonk just likes him...

It's not every day you get listed with a line-up like that! Like Simon Phipps commented - where should I send my resume? Looks like I owe the RedMonk guys a beer or 6. ;-)

Posted in Java at Mar 01 2006, 05:45:33 PM MST 4 Comments

DbUnit Tip: Turn off foreign key constraints when importing into MySQL

One of the issues I've had with using DbUnit is getting tables to load in the proper order from XML. The XML datasets I use to load table data are flat and don't really have any notion of foreign keys and such. Therefore, when you get into a situation where tables have a circular reference, using DbUnit can be a real bitch. I ran into this situation yesterday.

Luckily, I was able to figure out a solution thanks to the help of Mark Matthews. Just add "sessionVariables=FOREIGN_KEY_CHECKS=0" to your JDBC URL. Here's how the "db-load" target in AppFuse looks with this in place:

    <target name="db-load" depends="prepare"
        description="Loads the database with sample data">
        <property name="operation" value="CLEAN_INSERT"/>
        <property name="file" value="metadata/sql/sample-data.xml"/>
        <dbunit driver="${database.driver_class}"
            supportBatchStatement="false" 
            url="${database.url}&amp;sessionVariables=FOREIGN_KEY_CHECKS=0"
            userid="${database.username}" password="${database.password}">
            <operation type="${operation}" src="${file}" format="xml" transaction="true"/>
        </dbunit>

    </target>

Does your preferred database have a similar mechanism for turning off foreign key checks using the connection URL?

Posted in Java at Mar 01 2006, 04:16:48 PM MST 25 Comments

Why I like Tomcat 5.5.12 better than Tomcat 5.5.15

Here's what happens with Tomcat 5.5.15:

alotta:~/dev/appfuse mraible$ export CATALINA_HOME=$TOOLS_HOME/apache-tomcat-5.5.15
alotta:~/dev/appfuse mraible$ ant deploy;tstart
Buildfile: build.xml

...

deploy:
    [unwar] Expanding: /Users/mraible/Work/appfuse/dist/webapps/appfuse.war into
 /opt/dev/tools/apache-tomcat-5.5.15/webapps/appfuse

BUILD SUCCESSFUL
Total time: 3 seconds
Using CATALINA_BASE:   /opt/dev/tools/apache-tomcat-5.5.15
Using CATALINA_HOME:   /opt/dev/tools/apache-tomcat-5.5.15
Using CATALINA_TMPDIR: /opt/dev/tools/apache-tomcat-5.5.15/temp
Using JRE_HOME:       /Library/Java/Home
alotta:~/dev/appfuse mraible$ ant reload
Buildfile: build.xml

reload:
   [reload] FAIL - Encountered exception java.lang.NoClassDefFoundError: 
org/apache/log4j/spi/VectorWriter

BUILD FAILED
/Users/mraible/Work/appfuse/build.xml:1063: FAIL - Encountered exception 
java.lang.NoClassDefFoundError: org/apache/log4j/spi/VectorWriter

Total time: 1 second
alotta:~/dev/appfuse mraible$ 

Here's what happens with Tomcat 5.5.12:

alotta:~/dev/appfuse mraible$ export CATALINA_HOME=$TOOLS_HOME/apache-tomcat-5.5.12
alotta:~/dev/appfuse mraible$ ant deploy;tstart

...

BUILD SUCCESSFUL
Total time: 4 seconds
Using CATALINA_BASE:   /opt/dev/tools/apache-tomcat-5.5.12
Using CATALINA_HOME:   /opt/dev/tools/apache-tomcat-5.5.12
Using CATALINA_TMPDIR: /opt/dev/tools/apache-tomcat-5.5.12/temp
Using JRE_HOME:       /Library/Java/Home
alotta:~/dev/appfuse mraible$ ant reload
Buildfile: build.xml

reload:
   [reload] OK - Reloaded application at context path /appfuse

BUILD SUCCESSFUL
Total time: 3 seconds
alotta:~/dev/appfuse mraible$ 

Looks like I'll be sticking with 5.5.12 for the foreseeable future.

Posted in Java at Mar 01 2006, 12:17:13 PM MST 10 Comments

Canoo WebTest Firefox Plugin

Canoo WebTest now has a Firefox plugin, similar to Selenium IDE. I gave it a 2-minute test using Deer Park (a.k.a. Firefox) on my MacBook Pro. Thumbs down, not intuitive enough. Of course, if it had a video like Selenium's video, it might be easier to figure out.

Posted in Java at Mar 01 2006, 11:54:20 AM MST 1 Comment