So I'm in the process of doing a big refactor at work.  I'm totally overhauling the front-end of my project.

Refactoring, especially large scale refactoring, is kind of like spring cleaning.  You rearrange the furniture, find the stuff under the couch, dust in the corners, look for ways to do better the things you're already doing.

So, not that you asked, but you're reading my blog, so you kind of did, I stumbled across something big today.  Something I thought I understood about Grails, but actually only barely grasped.  It has to do with how Grails renders a page, using a layout for stuff that repeats across multiple web pages.

<html>
    <head>
        <title>An Example Page</title>
        <meta name="layout" content="main" />
    </head>
    <body>This is my content!</body>
</html>

That little boldfaced line of text up there, that's one of the ways Grails tells a page to use a layout.  But it's not the only way.  I won't bore you with the details, if you really want to know, you can read it for yourself over at the Grails documentation.  

The big thing I figured out was that there was this resource, this layout in the project that wasn't being used at all.  I figured out it wasn't being referenced in any of the ways it could be, and that I could refactor that sucker right out of the project altogether.

On my own, by myself.

Man, that feels good.

Posted
AuthorMako Allen
Categories365 Gratitude