Thursday, December 14, 2006

Still wicked busy...

I've been putting off posting to this blog longer and longer, and I really dislike doing that. The subject of today's post is more a rant than anything else. I've had to switch off dealing with projects that use Spring WebFlow for the moment and switch back to reporting, which means that I've had to deal with JasperReports and iReport again. This time it means looking into the Charting capabilities of iReport, and from what I'm seeing, they're so piss-poorly documented by everyone (including the people who make it) as to be a pointless and useless feature. I'd kill for a good tutorial on it right now, but the fact remains that there's nothing useful out there. At best there's a couple tutorials that scratch the surface, and don't lend themselves to any practical implementation. Ok, bitching done. I'll start coming out with much more useful posts in future, most notably with code and examples to hopefully fill the gap that is a lot of the internet as far as I see it when it comes to development.

Monday, December 04, 2006

Go with the flow

I've recently discovered the joy that is Spring WebFlow. For those not in the know, it's a Java web component specifically meant for the C in MVC (Model-View-Controller architecture). It allows you to declaratively define logical flows of information within an XML file, define a few Java beans to fit into the flow, and combine them all together to get your work done in a very short amount of time. Does my description sound kind of high level, abstract, vague, airy-fairy ? Well, then that description goes pretty well with Spring WebFlow (SWF) because SWF abstracts a LOT of gory details. I'll go into detail on it in a later post, I just thought that I'd bring it up now because I'm super busy at the moment, haven't posted anything in a while, and thought that I should.

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.

Sunday, October 29, 2006

Wow

Today is officially my 21st straight day without a day off, though I suppose that technically this counts as a day off because I'm working on something I actually want to work on without getting bugged by anyone, and I'm not working on other stuff that's far more important. Suffice it to say that I'm working on a major project for my employer that's supposed to be taking the back-burner, but I like it enough to work on it in my free time. I've been realizing more and more of the power of Spring's dependency injection features by refactoring all my reusable code out into Interfaces and libraries. When I applied a total refactoring of this on my major back burner project (call it Project "Catch the Assholes"), I finished the refactoring and took a look at what was actually left, and I was quite shocked but not surprised: the only things left were my form and persistence beans, and my controllers. And there were so few connections between what was there that it could almost literally be counted on one hand, because everything was wired together through Spring's XML configuration. I've never decoupled my code to such a degree before and it was quite a pleasant surprise.

A second pleasant surprise I had not long after that was to go through Appfuse and see what it could add to what I had already learned, and I was surprised to see that it was very little. I'd like to take this as a sign that I've gained a lot of valuable knowledge and I'm moving my code to higher levels of cohesion and lower levels of coupling than ever before. I guess we'll see where this goes.

Friday, October 20, 2006

The real post for today

I suppose you have to have an inital post to kick things off, so that's what my last post was. This post is about the ever useful DisplayTag library. ( http://displaytag.sourceforge.net/11 ). It's an oh-so-useful library that's used for displaying collections of java beans and other things on JSP(X) pages. And man does it ever simplify things.

Mmm, software

I hate blogs. People who post on them are usually jerks. I guess this makes me a jerk. But I wanted to start this one for my own personal benefit to log and track my progress as a software developer. To give some background, several months ago I was hired at a small internet startup and have been working at developing reports and small applications for them. My first task was a reports system that generates reports based off of an external developer's system. The external developers are typical (at least from what I've heard) software developers : they're slow to respond to feature requests, there's bugs all over the place (which they're reluctant to fix because it gets in the way of adding new features), and there's no documentation for anything.

As a result of the lack of documentation, everything I do for my work on the reports system is basically a guess. The only real good thing that's come out of developing that reports system is that it has kickstarted the learning process for my learning Java (AJAX even if you will) web development. I started off with writing basic servlets in a simply configured container, as well as very simple JSP(x) pages for displaying my content. The next step was learning to use Jasper Reports (and it's exceedingly useful GUI tool, iReports), and then integrating that into my web environment. From there I learned how to secure the container, and then after that I started learning how to use frameworks in order to write web applications.

My chosen framework has been Spring. Even though it has its quirks (like everything else I suppose), I've found it to be a very easy-to-get-along-with framework overall and it's made my development so much easier that I can really be nothing but grateful to its developers for making it. (Yes, spring kicks ass, so the mantra goes, but that's the last I'll say of it. Dependency Injection and AOP kick ass !). After starting with Spring, I then moved on to leaning Hibernate as my persistence framework, and that led me to getting all of my data access code (SQL, SQL-DDL, JDBC, JTA) automated for me and handled without me having to do anything, which is quite a nice replacement for manually coding JDBC and having to manually deal with Connections.