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". 1,142 entries found.

You can also try this same search on Google.

Packaging Velocity

I've made a number of changes to struts-menu this week, and it now supports the ability to render menus via Velocity templates. This allows for easy customization and basically allows for you to create any type of navigation system you want (i.e. drop-downs, tabs, plain ol' links) etc. One of the issues I'm wrestling with is how should I package Velocity with the distribution. Usually, to integrate struts-menu into a Struts-based application, you only need to include struts-menu.jar. Now, if you want to use Velocity for your menus, you must include velocity.jar and velocity-tools.jar in your application's WEB-INF/lib. I think most users will accept this.

However, in the example app, there's a velocity.properties file and a couple example templates. This seems like an opportunity for many users to forget to include these - so I'm wondering what's the best way to package these. Should I put velocity.properties in the source tree, and initialize my VelocityMenuDisplayer using that? Should I do a check to see if the user has their own velocity.properites in WEB-INF/classes for an optional override?

Another question is should I put the sample templates (simple.html and coolmenus.html so far) in the source tree, and then use Velocity to load them from the struts-menu.jar file? Or should I package them in a menu-templates.jar file?

Basically, it all boils down to this question: If you have a project (.jar) that depends on Velocity and plugs into web applications - what is the best way to distribute your Velocity settings?

BTW, I hope to make an effort to decouple this library from Struts someday - shouldn't be too hard.

Posted in Java at Oct 02 2003, 03:38:32 PM MDT 3 Comments

Struts tip o' the day ~ using bean:size

A co-worker turned me on to this one today - you can use <bean-el:size collection="${myForm.list}" id="listSize"/> to get the size of a collection and expose it as a pageContext variable. I've been looking for this sucker for years! Usually, I end up putting a getListSize() getter on my form to accomplish this, since none of the other tags (including JSTL) allow you to get the size of a collection.

Posted in Java at Sep 30 2003, 07:25:59 PM MDT 6 Comments

Pro JSP has arrived!

Pro JSP, Third EditionI received my complimentary four copies of Pro JSP tonight - whooo hooo! It sure is cool having your name on the cover of a book. ;-)

Congrats to all the other authors that feel the same way.

Posted in Java at Sep 29 2003, 10:06:35 PM MDT 16 Comments

Java books I'm considering

Because it never hurts to have a good reference book around, I'm in the market to load up my bookshelf again. Don't know if I'll actually read these suckers, but I use these tools all the time, and I'm tired of searching on Google. I've found that just having these types of books are invaluable for a quick reference.

Any other recommendations - or better alternatives to the ones I've listed?

Posted in Java at Sep 26 2003, 10:00:18 AM MDT 15 Comments

The problem with Deadlines

Keith brings something to the table that I did not know (but I did suspect):

Anyway, back to the likely effects of applying schedule pressure. It is interesting to note that a University of NSW study, quoted in Peopleware: Productive Projects and Teams, concluded that "projects on which the boss applied no schedule pressure whatsoever ("Just wake me up when you're done.") had the highest productivity of all."

The problem is that we, as software developers, will always end up with tight (sometimes ridiculous) deadlines - and customers will always want us to do it for less. This is reasonable considering that this is how the business world runs and thrives. Get it done quicker for less. The interesting thing is I don't think this happens with other engineering projects, such as constructing buildings, houses, public works, etc. Sure the folks who are paying for the project want it to get done cheap and fast, but there's all kinds of permits and inspections that have to take place throughout the process.

Wouldn't it be ironic if someday if folks (from a 3rd party) would come in every so often and inspect and approve our code?

Deadlines suck, plain and simple. The reason they exists is that someone (that's paying your wages) told someone else they could have something done by ${insert date here}. I doubt it'll ever end until we're the ones paying the wages and promising deliverables - to make our businesses profitable and our customers happy. The other option is to get a really cool boss that understands Software Development and actually listens to your estimates. I've had this a couple of times - man those folks are cool to work for. Kudos to Dan and Alan - you guys really know how to run a software shop.

Posted in General at Sep 26 2003, 02:00:54 AM MDT 1 Comment

New Powerbooks ~ I agree with James

I agree with James about the new PowerBooks. My 17" simply rocks. I do have to disagree on one point though - it's actually not that hot. It seems to run much cooler than my 15" 667MHz.

Posted in Mac OS X at Sep 24 2003, 10:46:00 PM MDT 1 Comment

Tiles Tips o' the Day

Here's a couple of things I learned today that might be useful to you Struts developers out there. When using Tiles, you'll normally import all the attributes into your baseLayout.jsp, and then your attributes are exposes as beans/scripting variables (you can actually grab them with JSTL tags). Rather than using:

<tiles:importAttribute/>

Use:

<tiles:importAttribute scope="request"/>

And then all your inserted pages can access these attributes. Pretty slick when you got a little JSTL love in the mix. The second tip is how to implement definition path switching. Let's look at the following baseLayout definition as an example:

  <definition name=".baseLayout" path="/layouts/baseLayout.jsp">
    <put name="titleKey"/>
    <put name="header" value="/common/header.jsp"/>
    <put name="sidebar" value=".sidebar"/>
    <put name="footer" value="/common/footer.jsp"/>
  </definition>

You currently cannot change the "path" attribute with a Controller, so you have to do it as the Tiles author recommends - by changing your path to refer to an action. So I changed the path on this particular definition to be:

<definition name=".baseLayout" path="/do/switchLayout">

Where my action-mapping is defined as follows:

 <action path="/switchLayout" 
   type="org.appfuse.webapp.action.SwitchLayoutAction">
   <forward name="printLayout" path="/layouts/printLayout.jsp" />
   <forward name="baseLayout" path="/layouts/baseLayout.jsp" />
 </action>

Then in SwitchLayoutAction.java, I have the following code:

boolean print =
    Boolean.valueOf(request.getParameter("print")).booleanValue();

// see if a print parameter is passed in the request
if (print) {
    log.debug("switching base layout to printing...");

    return mapping.findForward("printLayout");
} else {
    return mapping.findForward("baseLayout");
}

Pretty slick IMO! It's easy to make the printLayout.jsp only contain some simple wrapper stuff and only do <tile:insert attribute="content"/>. Of course, in this particular example, you could just use a print stylesheet (media="print"), but that doesn't work so well on 4.x browsers (man I hate those beotches).

Posted in Java at Sep 24 2003, 03:01:03 PM MDT 4 Comments

Vanity URLs in Struts

I figured out a way to make your Struts' app have URLs like the following:

http://raibledesigns.com/weblog?method=edit
http://raibledesigns.com/weblog.jsp?method=edit
http://raibledesigns.com/weblog.html?method=edit
http://raibledesigns.com/weblog.php?method=edit
http://raibledesigns.com/weblog.asp?method=edit

Might be a nifty little trick to try. Pump out a version of Roller with this feature enabled and you could say you made a .NET version! ;-)

Here's how:

1.  I created a RequestFilter that maps to /*
2.  This filter checks to see if request.getServletPath() matches any of the
action paths in struts-config.xml.  If so, it forwards to the action.
3.  As an added feature, I added a set of allowed extensions to this
filter's init parameters.  So far I have .jsp,.html,.asp,.cfm (using .jsp
ensures no one links to them directly, MVC enforced!) - so marketing can
choose what technology they want to convey ;-)

This seems to work great.  For example, I have an "advancedSearch" action
defined as follows:

    <action path="/advancedSearch"
      type="org.apache.struts.actions.ForwardAction" 
      parameter=".advancedSearch"/>

(ForwardAction will eventually be replaced, if necessary, with a real
action).  This allows all of the following URLs to work:

http://site.com/do/advancedSearch (works with Struts by default)
http://site.com/advancedSearch
http://site.com/advancedSearch.html + all other extensions listed.

More information (including source code) can be found on the struts-user mailing list.

Posted in Java at Sep 19 2003, 06:23:24 PM MDT 2 Comments

PowerBook Memory from Crucial.com

Crucial.com always seems to have the best prices on RAM - and today I found its no different for the PowerBook - for 512MB, it's $150 vs. $300 from Apple. That's Apple for you - trying to make a buck where ever they can - not a bad business practice when you have so many cult-like followers.

Posted in Mac OS X at Sep 19 2003, 10:57:40 AM MDT 1 Comment

PowerBooks aren't cheap

I priced my ideal 15" and 17" laptops this morning. 15"/1GB RAM/5400 RPM/Extra Battery/AppleCare is $3,702.00, 17" version of the same is $4,002.00. Not much of a difference for a couple more inches on the screen. Is this the only difference between the two - or does the 15" have Aluminum and the 17" is the same as my old 15"/667 PowerBook?

Boy is it tempting to get one, but I can't seem to justify it. The only thing I can come up with is that I really *want* one, no need though. The mind wants, the pocketbook doesn't.

Anyone know when they'll be available in the Retail Stores - I'd love to take one for a test drive.

Posted in Mac OS X at Sep 17 2003, 05:17:49 AM MDT 6 Comments