Random

>Getting my butt kicked by the Spring Framework

>I’ve recently embarked on a web services adventure. Some work that I have been doing for a Buddhist Monastery gave me ideas for a great company. I dialed up a couple talented friends and after a prolonged transcontinental huddle (alla Skype and British Airways) we’re rolling along. The first stumbling block was deciding whether to implement the service in PHP or to do it in Java. I did a bunch of reading and picked some brains. I considered Python, and even admired RubyOnRails for a few days. After digging up some compelling arguments in favor of using PHP and being directed to read an interesting case study by Sun, I concluded that Java was the way to go. In many ways, this meant that I had to start off at square one, due to the fact that the vast majority of my programming experience is with PHP. While I have long been familiar with the theory of Java, JSP and Patterns-driven Object Oriented Programming, I never came around to actually getting my hands dirty.

Thus it began. I fired up a trial version of myEclipse IDE and started beefing up on the latest trends of Java Dev. It quickly became clear that I needed a wholistic context to use as a reference point while trying to grok the relationships between all the myriad frameworks floating around in Java land. I poked around a bit and settled on Spring Framework due to the fact that it forces you to use relatively sophisticated design patterns while ensuring that your code remains easy to test. A late night trip to Borders left me $44 poorer with a copy of Spring in Action in hand.

Thence followed four days of exasperation. It only took me about a day to absorb the necessary concepts, but actually implementing them was another issue altogether. I took a serious butt kicking trying to deploy and run even a simple web app. Every time I thought I was making a bit of headway, I would meet a new wall of error messages. Even the examples from the book wouldn’t run.

Refusing to be deterred, I kept at it. In areas where the book glossed over a topic, I supplemented by reading through more detailed tutorials I found online. When I couldn’t figure out an error message, I turned to Google or just took a break and read a few chapters of Neal Stephenson’s Cryptonomicon. This evening, my efforts were rewarded. A bunch of interlocking confusions all cleared up at once and after a bit of tweaking, I had gotten a relatively elaborate web app to deploy and run on JBoss without any errors. Huzzah.

In my experience, whenever I try to learn a new programming language, or start using a complicated technology, there’s always an introductory period where nothing makes sense and nothing works right. After a bit of tinkering, the haze clears a bit and then it starts to click; my head adjusts to the paradigm and then everything flows along much more smoothly. While I didn’t expect it to take quite this much effort to click into the Java paradigm, I think I’ve broken through now. It feels good.

Keep an eye out for the first deployments of my new project.

tags: java, spring, eclipse, php, huzzah

Advertisements
Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s