Easy Does It - Tales of Open Source Coding
It's been quite an experience. Seven years ago I became deeply professionally involved in architecture, team mentoring and project management. Through that era I always made sure to do at least some coding to keep my mojo workin'. But it was not a period marked by intense coding creativity.
Embarking on PigIron, I decided I was going to code as easy and economically as I could while still fulfilling the needs of PigIron's niche target audience in the mainframe world. I was determined to go easy on myself and my users and not sacrifice time and sanity on the pursuit of an illusory perfection, such as chasing nascent standards or popular programming metaphors for their own sake.
The experience has reaffirmed a lot you may have heard about simplicity.
First of all, if you're supporting a communication protocol with lots of similar but maddeningly diverse structures, it's easier to metacode than to code. I used m4 to generate the Java code itself for the 100 function calls and associated parameter types of VSMAPI 5.3.
What the PigIron audience is really looking for is open source browser-based provisioning of z/VM installations. That means a web application. PigIron layers that by providing (soon) a Servlet. It's partitioned that way so that I can author a simple Manager web app hopefully to be superseded by a better web app by someone who does that better. I just have to get as far as a Servlet.
The PigLet Servlet will respond to object streams over HTTP. "Use XStream !" my web-app coding buddy opined. But XStream is a complex, fully mature open source API built on about ten other open source projects. I wasn't ready to shift from coding a small, monolithic NetBeans+Ant project to using the phenomenally bloated Maven to build PigIron.
Instead there the classic reference implementation of JSON that's BSD-style licensed and now checked into the PigIron tree, which incidentally does XML as well. What a relief to find a simple, well-targeted, properly licensed piece of code just to drop in!
"Use Restlet for your servlet architecture!" another friend advised. But Restlet is still overkill for what PigIron does, which is essentially just bridging protocols with some parameter checking thrown in for good luck. Tomcat and a tiny body of hand code in Java appear sufficient, easily debuggable, and allow PigIron to keep most of the core functionality in PigIron itself, keeping minimal the code body residing in the external architecture of Servlets.
I had a minimal PigLet Servlet up and running within three hours of of downloading Tomact.
Open Source seems in danger of losing the K.I.S.S. concept of simplicity as a virtue. PigIron is paddling frantically in the opposite direction.