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.

PHP vs. Java - which is better?

I have a former client that has a customer. This customer asked them - "so when are you migrating from Java to PHP?" So evidently this person has the impression that the next wave of web applications will be written in PHP. My former client has asked me to provide an answer for their customer. If I translate it, I think they mean to ask "what is different between Java and PHP and why should we use Java over PHP." Here are my opinions - please add yours as you see fit. I must admit I don't know a whole lot about PHP, except that it's widely popular among the Linux/Apache/MySQL crowd and that it's similar to ASP in it's lack of a MVC architecture (yes, I know about the PHP MVC project).

  • I think Java is more of an industry standard, whereas PHP seems to be popular among hackers and hobbyists.
  • Java provides better separation of layers - key for testability. PHP has all the code embedded in the page, so you have to run it through a browser to test if database connections work (for instance).
  • Java is more scalable.
  • More folks know Java and it's easier to qualify someone's Java skills. How do you test someone knows PHP? Is there a certification?
  • More for-profit organizations use it.

If you're a Java or a PHP-lover, I'd love to hear your opionions (facts are always better). I'm going to point my client to this post, so keep it clean.

Posted in Java at Aug 22 2003, 03:52:33 PM MDT 98 Comments

Maven Questions: Webapp best practices and local repositories

I can't seem to subscribe to the Maven User Mailing List for the life of me, so I'll ask my questions here, and hopefully get some answers. The first question is regarding local repositories. Ideally, I'd like to put this on a network drive, so all developers can get to it by mapping a drive or something. When I try to use a network drive, I get the following error (WinXP, Maven CVS pull from yesterday):

Artifact '\\server\share\repository\velocity\jars\velocity-1.4-dev.jar' 
    not found to add to classpath 
java.lang.ClassNotFoundException: velocity 
        at java.net.URLClassLoader$1.run(URLClassLoader.java:199) 

The reason I'd like to use a network share (over an FTP server or HTTP server) is because then we can easily add the .jar files to the classpath in Eclipse or JBuilder. If Maven downloads the files to each user's local hard driver - then we can use an FTP server. Another option is to use the default (~/.maven/repository), but then each developer has to copy javamail and our custom jars onto their hard drive.

My second question is regarding webapp best practices with Maven. The Maven Tomcat Plugin seems nice, but it mangles my server.xml file. I'd like a solution similar to the way I've done it with Ant. I use a context.xml file and place this in $CATALINA_HOME/webapps and then I "deploy" the expanded war into Tomcat. Tomcat detects when any files change under WEB-INF/ and reloads the app. Works great. A better solution would be to point the docBase to target/webappName. So I guess what I'm saying is - should I just create a context.xml file and make my own custom "setup-tomcat" task (which does an ant:copy)? Then use war:webapp to refresh the app's files from source? How are you experts doing it?

Posted in Java at Aug 22 2003, 11:51:35 AM MDT 3 Comments

Good Comedy for the Road?

One thing I've found that's enjoyable on road trips is a good comedy track. I don't like the books on tape because you have to pay attention and I tend to day dream while I drive (or play passenger). Comedy routines are great because you only have to catch a line or two - and you're good to go. So any recommendations out there? I'd love to download some for the ol' iPod.

Posted in General at Aug 22 2003, 06:59:43 AM MDT 7 Comments

Make money drinking beer and discussing MySQL

I got a call from a nice lady from a Market Research company on the way home from a mountain bike ride this afternoon. She said she'd pay me $100 if I came in and discussed MySQL for 30 minutes! Sounds great, eh? She asked me if I'd attended a paid "research discussion" before. I told her, "Yes, in college we drank beer for $50."

Well, guess what - she's paying for drinking beer too. I can't attend either one because we're heading out to California next week. You should probably live in (or near) Denver to make it worth your while. For the beer taste test, contact Kari Allen at 303-980-1909 (must be male 21-29). For the MySQL Discussion, contact Christine at 303-980-2262. Good luck - hope you make some cash and catch a buzz! ;-)

Posted in General at Aug 21 2003, 10:17:32 PM MDT Add a Comment

Maven and Automation of Build/Test/Deploy process

I've convinced the folks at my new project to use Maven for organizing, building and testing our projects. It's my recommendation because they have many (5+) webapps that all have the same dependencies. Maven was the obvious choice to eliminate duplication and standardize directory structures, etc. So my question is - how do I automate our build/test/deploy process? I currently use Anthill with Ant, and wish I could use it with Maven. Last time I checked, I couldn't. I've heard I could use CruiseControl. If that's true (and recommended over Anthill) - anyone got a HowTo?

Posted in Java at Aug 21 2003, 02:33:18 PM MDT 5 Comments

Tomcat 5.0.9 Alpha is now available for testing.

Download and Changelog. I won't be downloading or trying any more Tomcat Alpha's - I just don't have the time. Nor will I announce any more releases until a beta comes out. I can hear the Thank You's already... ;-)

Posted in Java at Aug 21 2003, 11:11:05 AM MDT Add a Comment

MySQL Problem: No operations allowed after connection closed

I asked the following question on the Hibernate Forums, but thought I'd put it here to see if anyone can help.

I'm using the open-session-in-view pattern and getting the following error at random:

2003-08-21 07:00:08,873 WARN [Thread-27] JDBCExceptionReporter.logExceptions(38)
    | SQL Error: 0, SQLState: 08003
2003-08-21 07:00:08,874 ERROR [Thread-27] JDBCExceptionReporter.logExceptions(46
    ) | No operations allowed after connection closed
2003-08-21 07:00:08,875 ERROR [Thread-27] JDBCException.(37) | Could not execute
    query java.sql.SQLException: No operations allowed after connection closed
at com.mysql.jdbc.Connection.checkClosed(Connection.java:2497)
at com.mysql.jdbc.Connection.prepareStatement(Connection.java:1287)
at com.mysql.jdbc.Connection.prepareStatement(Connection.java:1267)
at org.apache.commons.dbcp.DelegatingConnection.prepareStatement
    (DelegatingConnection.java:187)
at net.sf.hibernate.impl.SessionFactoryImpl.getPreparedStatement
    (SessionFactoryImpl.java:537)
at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:56)
at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:482)
at net.sf.hibernate.loader.Loader.doFind(Loader.java:136)
at net.sf.hibernate.loader.Loader.find(Loader.java:620)

I've used my same ServiceLocator.java class for the past 6 months on a couple of different projects (MySQL and Oracle), with no issues. But now I've developed a new app for a new client, and this error is popping up a LOT. Any ideas? I'm only closing the connection after my doFilter() method in a Filter.

It doesn't happen at all on my Windows XP machine (I've never seen the error). Only on Linux.

uname -a gives me:

Linux kgb08 2.4.20-8bigmem #1 SMP Thu Mar 13 17:32:29 EST 2003 i686 i686 i386 GNU/Linux

Tomcat 4.1.27, MySQL 4.0.13-Max-log, JDBC Driver mysql-connector-java-3.0.8-stable-bin.jar.

I've also seen it happen on MySQL 3.23.56, but now I can't seem to reproduce it.

Any ideas?

Posted in Java at Aug 21 2003, 07:50:12 AM MDT 11 Comments

RE: Mozilla Firebird Extensions

Kenneth Hunt (via Erik) hooks us up with a link to Mozilla Firebird Extensions. I tried to install one of my favorite Mozilla extensions - Autoform. No dice - Not a valid installer package. Damn.

Posted in The Web at Aug 21 2003, 06:24:24 AM MDT 2 Comments

AT&T Wireless will have Unlimited Data soon!

I called AT&T this morning to increase my data amount on my wireless plan. I bumped it up to the max (8 MB) so we could do choose our hotels as we go (using GRPS and our PowerBook). The lady put me on hold for a minute to two, and then came back with "actually, there is the Unlimited Data plan you were looking for - it's $24.99." I said - "hook me up!" But when she tried to select it, it said "not active." So it's in AT&T's system, just not activated. Cool!

Another tip she gave me when road-tripping was when you receive "No Network" - turn the phone off and back on so it can re-initialize with the nearest tower. BTW - how is AT&T's GSM coverage in California?

Posted in General at Aug 20 2003, 10:13:43 PM MDT 1 Comment

Tired of copying paths?

Are you tired of copying paths for environment variables and such. If so, checkout Ninotech's (free) Path Copy. I've used it for years - a very cool tool IMO.

Click me to download

Posted in General at Aug 20 2003, 12:24:38 PM MDT 3 Comments