Wabi-Sabi & Java
I just finished reading a short, but somehow fulfilling book called Wabi-Sabi for Artists, Designers, Poets, & Philosophers, by Leonard Koren. Roughly 50 or so pages filled with various "imperfect" imagery and some thoughtful glimpses into the nearly lost art of Japanese tea ceremonies.
I won't delve into a cultural aesthetic that I hardly comprehend after a brief stint through text, but the back cover sums it up quite well - Wabi-Sabi is "a beauty of things imperfect, impermanent, and incomplete. It is a beauty of things modest and humble. It is a beauty of things unconventional".
Ok, ok - so what the heck does that have to do with programming Java? One line of the book that stood out for me was the following: "Pare down to the essence, but don't remove the poetry."
One of the major downfalls to the Java programming language is its immense complexity and the sheer enormity of technologies built using it - I mean, good grief, when one sets out to learn Java, they'd better have a distinct plan of attack, or they'll get lost in incredibly deep seas of information.
Pare down to the essence - aka get rid of all that complex junk which serves only to make programmers feel better about themselves. The poetry will still exist, in its simplicity.
Take a J2EE project for example. You have three tiers - a model, a view, and a controller. What is the simplest way to achieve functionality within each tier? With Java, there are so many choices and technologies available, it would take someone years and years to find an ideal enterprise solution. Fortunately for us programmer geeks, getting there is half the fun.
I recently took a crack at this and developed a J2EE "spine" for work, simply a complete generic enterprise Java project which utitlizes some fun things (at least fun in my warped programmer's mind). The project can be pulled from the repository, and modified quickly into whatever it needs to be.
1. The database (model) tier.
I put Hibernate to work, which simplifies ORM's (object-relational mappings) and allows Java objects to be easily created from database tables. Add xDoclet into your Ant build file, and the process is simplified even further.
2. The business logic (controller) tier.
EJB 3.0 makes stateless session beans a snap - add in the correct attribute to your class, and you're done. (requires Java 1.5)
3. Web Presentation (view) tier.
I have embraced the amazing powers of Jakarta Velocity - quite simply the best technology to hit dynamic html pages since their creation. Velocity templates (in combination with the equally powerful Struts framework) makes for one jaw-dropping combo. With the Velocity-Struts package, all the Struts beans become readily available to your Velocity page - no more funky JSP tag libs, or hard to remember attributes. Just access your beans and properties as you please. Oh, and did I mention no more stupid pre-compiling of the web pages themselves? Yeah, buddy.
4. Testing - Cactus, JWebUnit, et. al.
I love writing tests with Junit and the associated technologies. I finally figured out how to make Cactus (as a separate web app in my .ear) work as a collected set of tests that can be run from a web site at any time during deployment. Once again, you have to sift through all the complex jargon to find out that Cactus is just a web shell for housing JUnit tests, and that the tests themsleves can be short, simple, and only used when necessary.
This is what really drove home the phrase "Pare down to the essence" to me. Why do Java programmers insist on wallowing in their own superficial magnificence? Beauty and simplicity lie within Java, one just has to first jump the gargantuan hurdles of the language, and the fact that these technologies evolve so quickly, that documentation is usually sparse and difficult to read, if it even exists.
I truly believe now that you can find the poetry in any programming language, as long as you can "pare down the essence" and arrive at a simple, yet elegant solution. Don't make it overly complex just because you can - I've been there, and even if you don't end up being the one supporting the complex (albeit magnificent) application, it will eventually bite someone in their posterior.
I won't delve into a cultural aesthetic that I hardly comprehend after a brief stint through text, but the back cover sums it up quite well - Wabi-Sabi is "a beauty of things imperfect, impermanent, and incomplete. It is a beauty of things modest and humble. It is a beauty of things unconventional".
Ok, ok - so what the heck does that have to do with programming Java? One line of the book that stood out for me was the following: "Pare down to the essence, but don't remove the poetry."
One of the major downfalls to the Java programming language is its immense complexity and the sheer enormity of technologies built using it - I mean, good grief, when one sets out to learn Java, they'd better have a distinct plan of attack, or they'll get lost in incredibly deep seas of information.
Pare down to the essence - aka get rid of all that complex junk which serves only to make programmers feel better about themselves. The poetry will still exist, in its simplicity.
Take a J2EE project for example. You have three tiers - a model, a view, and a controller. What is the simplest way to achieve functionality within each tier? With Java, there are so many choices and technologies available, it would take someone years and years to find an ideal enterprise solution. Fortunately for us programmer geeks, getting there is half the fun.
I recently took a crack at this and developed a J2EE "spine" for work, simply a complete generic enterprise Java project which utitlizes some fun things (at least fun in my warped programmer's mind). The project can be pulled from the repository, and modified quickly into whatever it needs to be.
1. The database (model) tier.
I put Hibernate to work, which simplifies ORM's (object-relational mappings) and allows Java objects to be easily created from database tables. Add xDoclet into your Ant build file, and the process is simplified even further.
2. The business logic (controller) tier.
EJB 3.0 makes stateless session beans a snap - add in the correct attribute to your class, and you're done. (requires Java 1.5)
3. Web Presentation (view) tier.
I have embraced the amazing powers of Jakarta Velocity - quite simply the best technology to hit dynamic html pages since their creation. Velocity templates (in combination with the equally powerful Struts framework) makes for one jaw-dropping combo. With the Velocity-Struts package, all the Struts beans become readily available to your Velocity page - no more funky JSP tag libs, or hard to remember attributes. Just access your beans and properties as you please. Oh, and did I mention no more stupid pre-compiling of the web pages themselves? Yeah, buddy.
4. Testing - Cactus, JWebUnit, et. al.
I love writing tests with Junit and the associated technologies. I finally figured out how to make Cactus (as a separate web app in my .ear) work as a collected set of tests that can be run from a web site at any time during deployment. Once again, you have to sift through all the complex jargon to find out that Cactus is just a web shell for housing JUnit tests, and that the tests themsleves can be short, simple, and only used when necessary.
This is what really drove home the phrase "Pare down to the essence" to me. Why do Java programmers insist on wallowing in their own superficial magnificence? Beauty and simplicity lie within Java, one just has to first jump the gargantuan hurdles of the language, and the fact that these technologies evolve so quickly, that documentation is usually sparse and difficult to read, if it even exists.
I truly believe now that you can find the poetry in any programming language, as long as you can "pare down the essence" and arrive at a simple, yet elegant solution. Don't make it overly complex just because you can - I've been there, and even if you don't end up being the one supporting the complex (albeit magnificent) application, it will eventually bite someone in their posterior.
