Matt RaibleMatt Raible is a Web Developer and Java Champion. 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.

Roller Searching - Powered by Lucene

Lucene Logo

Thanks to Min, we now have searching in Roller. He wrote a wicked-ass Lucene implementation using the util.concurrent package from Doug Lea. Here's how it works:

  • When Roller starts, it checks to see if the index is OK, and if not, rebuilds it. The index then goes into RAM and stays there until you destroy the servlet context - then it's written to disk. The location is configurable, but defaults to $(user.home} + File.separator + "roller-index".
  • A user's index is updated when they add/delete weblog entries.
  • A user can rebuild their own index via a button on the Website Settings page.
  • An Admin can rebuild a user's index from the "Admin" page and rebuild all users' indexes from the Config page.
  • The IndexManager is the central entry point, and it lives in RollerContext.getIndexManager(). For indexing, searching, etc. you use one of the following operations:

    - AddWeblogOperation
    - RebuildUserIndexOperation
    - RemoveWeblogOperation
    - SearchOperation

    After creating these ops, set any op-specific configuration options and then pass it to the IndexManager.executeIndexOperation() method.
  • Behind the scenes, there is an background thread running. This thread only performs one operation at a time. If an op is added when the thread it busy, the op will be queued. The way Lucene works is that most operations can be threaded. Lucene supports the concept of add, delete, read, query, and optimize. The only methods that cannot be active at the same time are IndexReader::delete() and IndexWriter::add(). Therefore, the operations that perform these operations are put into the background thread queue that garantees that these ops wont be performed at the same time. Searching doesn't interfere with these ops, so it can be run in any thread.

I created a #showSearchForm macro that renders a <form> with a textbox (size=20) and a "Search" submit button. I also added this to all the current themes - so if you developed a theme for Roller - you might want to check it out (username: test, passwd: roller). You can edit it right on the site if you want, then copy/send me the adjusted files. CSS seems to need the most tweaking for these to look right.

Please enter any bugs/enhancements in Roller's JIRA instance. The only one I've seen so far is that a user has to build their index manually before they get any search results. I don't know that this is a bug, just wanted to mention it. Doesn't get comments yet either - a NPE from weblogMgr.getComments() (when adding a new post) kept me banging my head against the wall for an hour - so I commented it out.

Try it, you might like it. ;-)

2 minutes later: Here's a bug - if you update an entry numerous times, it will get presented as numerous times (should be deleted and re-indexed).

Posted in Java at Jul 22 2003, 11:41:59 PM MDT 2 Comments

RE: The Door Is Ajar

no IE Tim Bray (founder of XML) has posted a blog story titled "The Door Is Ajar" that is a call to arms for building a better browser and leaving the Internet Exploder era behind us. Down with IE. I support this even thought Mozilla Firebird just crashed as I was trying to write this. Now I'm using IE because it doesn't crash nearly as much as Firebird. Can't anyone fix the "I crash when I give you remembered drop-down choices" bug? It's been crashing my Phoenix/Firebird installations since the beginning (on different machines, all Windows boxes)!

Posted in The Web at Jul 22 2003, 02:01:45 PM MDT 5 Comments

Luke - Lucene Index Browser

If you're working with Lucene, and you need an easy way to inspect your index, checkout Luke.

Luke is a handy development and diagnostic tool, which accesses already existing Lucene indexes and allows you to display their contents in several ways:

  • browse by document number, or by term
  • view documents / copy to clipboard
  • retrieve a ranked list of most frequent terms
  • execute a search, and browse the results
  • selectively delete documents from the index

Posted in Java at Jul 22 2003, 01:44:58 PM MDT 2 Comments

RE: Which new laptop would you buy?

Thanks to all who left comments about my (possible) new laptop purchase. I did some more tests today, and I'm going to have to go with a Windows machine, especially since I hope to replicate the performance I get from my machine at work (Dell Optiplex GX260: 2 GHz, 512 MB RAM, Windows 2000 SP4):

  • Opening Photoshop (7.0): 3 seconds
  • Starting Eclipse (3.0 M2): 6 seconds
  • Running "ant clean package-web" on AppFuse: 18 seconds
  • Running "ant rebuild" on Roller: 36 seconds

Yep, that's right, my (work) desktop is twice as fast when opening Eclipse and 4 times faster opening Photoshop (than the Powerbook). So if I get a 3 GHz laptop with 1 GB RAM, it should be even faster than that right?

Hibersonic Aviator ZX7 Alienware Area-51m

Right now, I'm looking at the Alienware Area-51m or the Hibersonic Aviator ZX7. At first glance, I'm leaning towards Area-51m, although the Bluetooth USB Adapter (vs. integrated Bluetooth) is disappointing. The Hibersonice has a 17" screen, but that doesn't seem to be that big of deal (after hearing y'all speak up). Also the Hibersonic has a 802.11b NIC, where the Alienware one has a 802.11g.

Posted in General at Jul 22 2003, 09:11:05 AM MDT 5 Comments