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.

What's up with Google Ads?!

At first, I thought that Google's AdSense was kind of annoying. Then I realized, from Russ, that you can actually pay for your hosting costs with it. So I tried to sign up (this was about a month ago now). I was denied with a vague reason like my site was too personal or something. "Oh well" I thought, "at least I tried." But now I'm seeing these suckers on almost everyone's blogs. "Sheot" I say to myself, "those bastards are making money and I'm still stuck paying $50+/month for this site!!"

So on one hand, I'm jealous of all your Google Ad Bastards, but on the other hand, I'm proud to be Ad Free!

No wait. I take that back. I'm just jealous. Money talks...

Posted in General at Dec 02 2003, 05:16:28 PM MST 2 Comments

Is it possible to disable CVS Notification of certain files?

I use Anthill for automated building and testing of my webapps. I think it's a great product. The UI could use some improvements, but I know that if I really cared, I'd fix it myself. It's only competition is CruiseControl as far as I know. CruiseControl (at first and only glance) looks to have a not-so-intuitive XML file that needs to be setup. Anthill was easy to figure out without even reading any documentation.

I am using Anthill on a number of projects and most of these projects use some sort of e-mail notification of CVS commits. When using CVS on *nix, I use CVSSpam, or the one built in at SourceForge. When using CVS NT on Windows (like my current *paid* project) I use CVSMailer. Both of these work great, however, when Anthill does a commit of my anthill.version file - everyone gets a notification of it.

Does anyone know how to configure CVSMailer or CVSSpam to "not" send e-mails for this specific file? I'd love to configure this from Anthill, but I realize it relies on committing this file.

Posted in Java at Dec 02 2003, 05:06:18 PM MST Add a Comment

Hibernate Blog

Sweet, the Hibernate guys have a group blog. Very nice - I subscribed. Gavin's post on Designing "query by criteria" is a should read if you're a Hibernate user. You might recall a while back, I was looking to use the QueryByCriteria API to construct dynamic queries. I ended up doing this with session.find and SQL, which turned out to be much easier. That being said, what's the advantage of using the Expression API over plain ol' SQL?

Posted in Java at Dec 02 2003, 09:58:22 AM MST Add a Comment

House Project: Garage has started

New Garage has a floor The Garage crew showed up last week and began working on Saturday. Today they poured concrete - this builder isn't wasting any time! They expect to have our garage done by Christmas. Click on the image to zoom in.

Posted in General at Dec 01 2003, 01:56:24 PM MST

Struts Menu 2.0 Released!

This release is a significant refactoring of the 1.x codebase. The source and site is now built using Maven. Menus can now be defined using Velocity templates and support has been added for looking up dynamic values. This means that if you have ${variableName} in your menu-config.xml (in a link), the tag library will look in all scopes for a variable with the name "variableName". The example app has been updated to improve documentation.

IMO, the Velocity templates is huge because it means "if it's possible with HTML" - it's possible with Struts Menu.

Changes (from http://struts-menu.sourceforge.net/changes-report.html):

- Renamed package structure to net.sf.navigator.
- Added support for using Struts' actions and forwards for links in menu-config.xml.
- Added support for using dynamic variables in menu-config.xml.
- Updated build process to use Maven for building/deploying.
- Refactored to use Velocity and allow dynamic variable substitution.

You can read the nitty-gritty details about the Velocity enhancements, check out the sample app or download this tag library for yourself.

Posted in Java at Dec 01 2003, 04:03:09 AM MST Add a Comment

AppFuse 1.0 Released!

I feel this release deserves the big 1.0 designation because it is an up-to-date representation of my learnings and my perceived best practices in building web applications. Of course, as I learn more, I will continue to push out new releases.

In this release, I did a lot of refactoring and enhancements to existing features. The DAO and Manager interfaces are no longer tied to Struts or Hibernate. Hibernate's Session object is now passed as an argument into Manager and DAO constructors, rather than method signatures. The DAOFactory was refactored by Bear Giles to use reflection to instantiate Hibernate DAO's. Now, if you add a new DAO, you don't have to edit DAOFactory and DAOFactoryHibernate. To insantiate a new DAO, the code is now:

LookupDAO dao = (LookupDAO) DAOFactory.getInstance(conn, LookupDAO.class);

...where conn is a connection object retrieved from ServiceLocator or ActionFilter. When you add new POJOs, you still have to add them to ServiceLocator (for JUnit tests) and hibernate.cfg.xml, which is kindof a pain. I'd like to figure out a way to tell Hibernate to just look in appfuse-ejb.jar.

<tangent>
I still don't have a Factory for Managers, and I don't know that there's a need for one, but it's something I might add in the future. Managers are still creating using: LookupManager mgr = new LookupManagerImpl(ActionFilter.getConnection());. One thing I've been thinking about is the ability to switch webapp frameworks - kindof like you can do with Persistence Frameworks and the DAO Pattern. It'd be cool to add a way to switch (at build time) to use WebWork or Tapestry. Maybe by replacing values for the controller in web.xml. It'd probably be a pain since I'd probably have to create new JSPs for the new frameworks - but it would probably be a great learning experience.
</tangent>

The Remember Me feature has been refactored so the username and password cookies are only available under the /appfuse/security url-pattern. I also changed the posting to "j_security_check" in LoginServlet from response.sendRedirect to an HTTP POST, using Jakarta Common's HttpClient. The reason I have a LoginServlet vs. just using action="j_security_check" in my <form> is to encrypt passwords.

I've developed 3 different applications using AppFuse (struts-resume is one of them), and I have found that it's a pain to upgrade to new versions of AppFuse. Because of this, I don't recommend upgrading unless you really need to. I will be upgrading struts-resume to AppFuse 1.0, but I doubt I'll upgrade it to any future AppFuse releases - it's just too much work for not much reward.

Posted in Java at Nov 30 2003, 06:35:24 PM MST Add a Comment

JSTL Tips o' the Day

Here's a couple of tips to help you in your JSP development with JSTL:

  • The <c:out> tag has a default attribute you can use to provide a default value when the value in your the variable you're trying to write is null. This is much easier than using if statements. Example: <c:out value="${user.firstName}" default="None Given" />.
  • You can populate dynamic values in a key from your ResourceBundle using the <fmt:param> tag. For instance, if you have a message with a link in ApplicationResources.properties - and you want to populate it with a struts-forward, it's easy with JSTL:

    ApplicationResources.properties:

    mainMenu.link=Click <a href="{0}">here</a> to return to the Main Menu.
    
    In your JSP:

    <fmt:message key="mainMenu.link">
      <fmt:param><html:rewrite forward="mainMenu"/></fmt:param>
    </fmt:message>
    

Usually I try not to put any HTML in ApplicationResources.properties, but I don't think a minimal amount hurts anything. Of course, you could put all the HTML in your JSP, so mainMenu.link changes to "Click {0} to return to the Main Menu." and your JSP changes to:

<fmt:message key="mainMenu.link">
  <fmt:param>
      <html:link forward="mainMenu">here</html:link>
  </fmt:param>
</fmt:message>

Enjoy!

Posted in Java at Nov 30 2003, 06:14:20 PM MST 1 Comment

Archives now available

I finally got enough motivation to spend 5 minutes and make my archive page presentable. Enjoy! View source for the CSS. Most of the work on this page is accomplished with a macro in Roller: #showBigWeblogCalendar().

Posted in Roller at Nov 29 2003, 08:10:47 PM MST 3 Comments

Memory and Disk Space is Cheap

Memory and Disk Space sure is cheap these days. I got 1 GB of RAM for $150 last week, and I bought a 160 GB Hard Drive today for $80. Gotta love that!

Posted in General at Nov 29 2003, 11:38:43 AM MST Add a Comment

Happy Thanksgiving Y'all

Happy Thankgiving!

Happy Thanksgiving to everyone! This year I'm thankful for continued employment, a thriving Java community and an awesome family. Abbie and Julie are the most incredible women I've ever met. My parents, sister, and in-laws deserve a "Thank You" as well - you all rock. Here's a smile from Abbie to brighten your Turkey Day. Happy Turkey Day!

Abbie on a bench

Posted in General at Nov 27 2003, 05:10:38 AM MST