Monday, November 06, 2006

You can alias beans !

That sounds like a a crazy statement to any normal person not familiar with Java, or at least to my coworkers, as normal as they are. I discovered several days ago that you can assign aliases to beans in the Spring framework for J2EE, and at the time I wondered why you'd ever want to do that. I now realize why: say you have a datasource that you share among numerous aspects of your system: transactions, reports, other stuff (but most importantly the first two.) Now say that your database is growing along with your customer base and it's getting way too (computationally) expensive to run reports on your production database. Just point your report bean aliases to a new data source bean after setting up a DB replication of your main database that gets updated every night, or every few hours. Then you've effectively switched your system over to a load balanced method without changing any of your production code. Genius!

Sunday, November 05, 2006

CSS Goodness

In my attempts to make pretty web pages to go along with my web applications, I've been spending numerous hours Googling around, seeing different techniques, and by far the one I like the best so far is using CSS. It's nice and modular through external style sheets and you can do some pretty powerful stuff, just through style sheets, with no extra images or scripting, and every browser supports all (or most) of it. In my searching, I just came across what I think is by far the greatest CSS reference on the web : Stu Nicholl's site.

It's chock full of great samples that you can pretty much just rip straight out and put in your own site, and all he asks in return is a reference back to his site. A pretty fair trade, I think.