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.
You searched this site for "matt". 663 entries found.

You can also try this same search on Google.

DB2 with Hibernate and Tomcat

At my current project, we're using AppFuse for our baseline and (currently) Tomcat and MySQL for our databases. Soon we'll be migrating to DB2 for our database. I'm assuming everything will work smoothly with Hibernate, but there's probably some Ant things I will need to modify. For instance, with MySQL, I currently create a new database with the following script:

create database if not exists appfuse;
grant all privileges on appfuse.* to test@"%" identified by "test";
grant all privileges on appfuse.* to test@localhost identified by "test";

Is this possible with DB2? It's no biggie if it isn't - at my Comcast gig earlier in the year, we tied AppFuse/Hibernate into Oracle and simply didn't use the db-create nor db-init (creates tables) tasks. I use Hibernate's <schemaexport> task to create the tables - hopefully this will work in DB2. As for Tomcat, has anyone successfully configured DB2 with Tomcat's DBCP? We'll eventually be migrating to Websphere 5, hopefully it's not a big leap from Tomcat 4.1.27.

I haven't done any research on this yet, just wanted to put out some feelers and get any helpful advice before I start banging my head against the wall (hopefully I won't have to).

Posted in Java at Dec 08 2003, 10:01:55 AM MST 6 Comments

J2EE Patterns Catalog

J2EE is simple to learn, simple to develop - especially when Sun recommends you follow a mere handful of patterns. Heh.

Posted in Java at Dec 04 2003, 08:53:25 PM MST 9 Comments

Users and Groups on Linux

Now that I've rebuilt my Red Hat 9 box with Fedora, and installed Out-of-the-Box - I really should get my user and group permissions setup properly. If I ever decide to host CVS, shell access or bug tracking for clients, it'd be nice to know my server is secure. Out-of-the-box installs everything as root (save CVS), so I'm constantly doing "chown -R matt $CATALINA_HOME" or "su" to simply deploy files to Tomcat.

How are these open source servers (i.e. SourceForge) setup? If I wanted to setup a SF-clone, I'm assuming I'd need to setup a "developers" or "clientName" group and then create specific cvs repositories for each client. However, I'm not looking to setup a SourceForge-like server right now - I just want to get my permissions right. I'm thinking of creating a "developers" group, and giving it rw rights to Tomcat, Ant, Anthill, etc. Then I'll make myself a user in this group, rather than having to "su" every time I want to do something. What would you do? How would you setup your "dev" box to be more secure with users and groups?

Posted in Java at Dec 03 2003, 05:45:23 AM MST 1 Comment

User-Mode Linux ~ should I switch my ISP?

This User-Mode Linux sounds like a great opportunity for hosting this site. I currently pay around $50/month to host this site, and there's two things that are frustrating:

  • I only get 5 GB of bandwidth, and I pay the same as my provider for any extra - I usually pay $30 extra per month for bandwidth.
  • I get a max of 20 connections per mysql instance. While this should be plenty, it does seem to cause this site to crash, and I'm not motivated enough to dig into Roller/Tomcat and figure out why.

I do have a cable internet connection, so I could host this site myself, but my upload speed is only 241 KB. For you folks that do use UML, does anyone have experience with running Java (i.e. Tomcat or Roller) and MySQL?

Posted in Java at Nov 23 2003, 09:22:02 PM MST 9 Comments

RE: Compressing and Caching in your webapps

Jayson Falkner writes about two Filters everyone should have in their webapps: one for compression (via gzip) and one for caching. I try to add a CompressionFilter to all the apps I write, but I don't have a CacheFilter. So my question is: should I add Jayson's CacheFilter to AppFuse or should I use OSCache? I haven't got to Dave's chapter yet on performance and caching (in JSP 2.0), so I haven't read his opinion - what's your opinion? I like Jayson's solution because I can add 3 new classses with no additional JARs - AppFuse already has 21 jars (Struts, Hibernate, JSTL + a few other taglibs).

Posted in Java at Nov 21 2003, 11:57:41 AM MST 4 Comments

New Tomcat Releases: 4.1.29 and 5.0.14 Beta

I know these have already been announced on javablogs.com, but no insight was given - so here's some lovin'. 4.1.29 seems to be merely an upgrade to DBCP 1.1 - which is great AFAIK because the "kill abandoned connections" hasn't been working for me. Hopefully DBCP 1.1 fixes this. Unfortunately, I'm running 5.0.12 on this site (where I'm still having connection issues) and the 5.0.14 release seems to only have DBCP 1.0. Oh well, maybe they'll upgrade to 1.1 in the next release. I'll still upgrade this site to 5.0.14 - maybe sometime this weekend.

Later: I upgraded this site to 5.0.14 and it does appear to have DBCP 1.1. Also, the abandoned connection timeout might actually work - or at least it's doing some logging - as indicated by the following message:

AbandonedObjectPool is used (org.apache.commons.dbcp.AbandonedObjectPool@1077fc9)
   LogAbandoned: true
   RemoveAbandoned: true
   RemoveAbandonedTimeout: 60

Posted in Java at Oct 31 2003, 11:37:06 AM MST 3 Comments

AppFuse and all it's libraries

I received a question about AppFuse that I've been pondering every since. The question basically boils down to two things:

  • How do you manage Eclipse's .classpath file in conjunction with lib.properties (the file that manages it for Ant)?
  • When using AppFuse for multiple projects, do you put a "lib" folder in each project or use a central repository?

Quick Answers: I replace files in the appfuse/lib directory and update lib.properties. Then I update my project properties in Eclipse to reference the new jars. A pain, yes - but only a 2 minute process. I run all my tests before I bother changing the Eclipse classpath. As for multiple projects - the easiest thing to do is to move $yourProject/lib to a folder called "libs" in the same directory as $yourProject and change the ${lib.dir} property in properties.xml to point to the new folder.

Begins Rambling... I'm currently using AppFuse on 3 different projects. 1 is AppFuse itself, the 2nd is Struts Resume, and the third is for a client I created a webapp for in August. Right now, when I synch up Struts Resume with AppFuse, I copy paste from appfuse/lib to struts-resume/lib and update the lib.properties appropriately. I can't just copy lib.properties to struts-resume/lib because struts-resume uses libraries that appfuse doesn't. Yes, this is admittedly a pain in the arse. It's almost as bad as changing all the method signatures when moving the Hibernate Session from all method signatures into the constructors (can your IDE do that?!). I don't want to make people download appfuse to build struts-resume though, so I doubt I'll change this process.

The whole "massive lib folder" has been bouncing around in my head for quite some time. I'd like to use Maven or Greebo to download the dependencies for AppFuse, but at the same time, it's nice being able to download the whole thing at once and be up and running. I don't want to go the Maven route because I don't really want/need a website for AppFuse and it sounds tough to get it working with XDoclet (though WebShop looks like it might be a good template). KISS

The project.xml in AppFuse is my feeble 20-minute attempt to get it Mavenized (it's currently not used). I tried Greebo this morning, and it really does nothing for me. Especially since I've setup separate compile/test classpaths (read from lib.properties). It'd be a real pain with Greebo to separate out the classpath's for testing and building - it seems to only support one long classpath. Also, who wants to make their whole best-practices open-source app dependent on a 0.1 open-source app?

As for having my IDE (wether it be Eclipse or IDEA) reading the classpath from Ant - that would be the sweetest feature of the year! Currently in Eclipse and IDEA, I have to give an absolute path to j2ee.jar since I don't want to distribute it (it's 11 MB). When I switch b/w OS X and WinXP, I always have to change this classpath. I'm sure there's an easier way with setting variables in the IDE, I just haven't figured it out yet.

The other thing that is annoying is that IDEA doesn't seem to read my $ANT_HOME environment variable. Does it have it's own $ANT_HOME? It's annoying for me b/c I check for JUnit classes in the classpath in my "init" task, and IDEA doesn't find them. Don't worry Eclipse bashers - it doesn't work in Eclipse either. This is fine with me b/c I prefer the command line, but those "I use my IDE for everything" folks might not like it because they can't run AppFuse's build.xml file from w/in their IDE.

Posted in Java at Oct 23 2003, 06:21:59 PM MDT 7 Comments

Blogging leads to Free Book

This blogging thing rocks. Today I got one of the books I've been meaning to buy - for FREE! Check out the following e-mail I received from Manning:

Hello Matt:

We are contacting you regarding Vincent Massol's new book, JUnit in Action, which Manning will be publishing in November. Vincent mentioned that you might be interested in certain parts of the book which relate to topics recently discussed on your blog http://www.raibledesigns.com/page/rd. There is a chapter on unit testing tag libraries.

He has asked us to offer you a complimentary copy of the PDF ebook which just became available today. We hope you will find it of interest.

Sweet! Thanks Vincent! I read the chapter on unit testing tag libraries - very clear and to the point. Unfortunately, for tags with bodies, you still have to verify HTML, so tagunit might be better for these. I like the coverage on the Maven Plugin for Cactus and also how to use JSTL's ExpressionEvaluatorManager for reading tag attributes. The link I found, the chapter has code samples.

I've never really liked eBooks, but I have to admit, this is pretty damn convenient. Especially since I tend to pack around 10-20 books to each new contract. What about sharing? Can I let co-workers borrow my PDF like I let them borrow my books?

Posted in Java at Oct 22 2003, 01:43:16 PM MDT 4 Comments

My IDEA Evaluation - Eclipse is better

I've been trying to use IDEA (on OS X) for the past few weeks and I keep reverting back to Eclipse for features that seem to be missing. I know the features must be there, but I just can't find them. Why else would everyone like it so much? Sidenote: I've never used IDEA for a feature that doesn't exist in Eclipse - I'm sure there are some, I'm just not using them. It sure would be cool if someone created a HowTo explaining how to migrate from Eclipse to IDEA. In the meantime, I'll settle for posting my questions here:

  • Debugging in Tomcat - I'm currently using Sysdeo's Tomcat Plugin in Eclipse for Tomcat 4.1.27. It's super easy to setup and use - I expect the same ease-of-use from IDEA. I haven't looked much, but I'd love to hear feedback on IDEA's Tomcat debugging support.
  • Renaming a variable in a JavaBean renames getter and setter methods. Sounds simple enough, in my 10 second search, I couldn't find it. In Eclipse, right-click -> Refactor -> Rename.
  • Override/Implement methods (from parent classes and interfaces). Right click -> Source -> Override/Implement methods in Eclipse.

I'll add more as I think of them throughout the day. So far, I like IDEA, but to be honest - it's not saving me any time over Eclipse. It also locks up as much as Eclipse and it's responsiveness is still a big sluggish on OS X (10.2.8) with 1 GB of RAM (1.33 MHz processor). Hopefully Panther will make both IDEs faster. Two weeks ago, I was thinking of buying it (as well as Dreamweaver) - now I'm frustrated with IDEA's lack of features and Dreamweaver's slowness. I'll probably pass on shelling out the cash since Eclipse and BBEdit are giving me all the features I need in IDEA and Dreamweaver.

Posted in Java at Oct 20 2003, 06:17:51 AM MDT 22 Comments

Web Frameworks - which one should I learn?

I've seen a lot of talk about Web Frameworks these last couple of weeks - particularly JavaServer Faces, WebWork and Spring. There's also been great articles posted comparing Spring and WebWork as well as an Introduction to Spring from TSS. Spring, WebWork and JSF all look like excellent frameworks to me, but I also continue to believe that Struts is a great framework. And I would go so far as to say that it's the best web application framework. Yep, I said it - Struts is the best web application framework to learn if you are a web developer wondering what to learn. Why? Because it will get you a job.

I've continued to receive a fair amount of calls and e-mails over the last couple of weeks - and they're all calling because of my Struts experience. Good luck in finding a company that wants you to build their web application using WebWork or Spring. Maybe someday I'll be lucky enough to hire employees for Raible Designs and build web applications in my own office with my own employees. Then we'll get to choose whatever technology we want to build customers' apps. Until then, I'll stick with Struts and continue to be an employed developer.

I strongly believe the best way to learn anything is to get paid to do it. I've learned Struts over the past couple of years, not because I wanted to, but because someone else wanted me to - and they paid me to do it. Of course, there are some companies that will probably pay you to learn WebWork or Spring, but most would rather not.

Another thing to consider is that WW and Spring will probably someday develop "migrating from Struts" documentation. Sounds like a good idea to me - until then, and until someone pays me to learn the others, Struts is #1 for me.

Now it's your turn to tell me why my logic is flawed... if you can. ;-)

Posted in Java at Oct 17 2003, 01:22:23 PM MDT 21 Comments