Can Java Be Saved? Part Four
Part Four—My philosophy going forward.
I have finally thought about this enough, at least for now. I have decided that I’m going to create a framework for use in my classes and for any personal java programming I might do in the future. I know, I know, the world really doesn’t need yet another framework. But, this one is a bit different, I promise.
The first step toward creating my framework is to establish a philosophy to guide me along this journey. I have looked at almost every java framework out there and I think that this is sometimes missing. The authors are usually very good programmers and have deep experience. This leads them to create what they like and what appeals to them. I think this is great for all the other people out there on their level. But, there is a crisis in the java world and its name is complexity.
The Philosophy
So, here is my philosophy. I want to make a framework that is easy to teach. Notice that I didn’t say easy to learn? That’s what everyone says. I am the one who has tried to do the teaching with things that are supposed to be easy to learn. Well, they might be easy to learn if you are a seasoned pro, or an up-and-coming computer superstar. While I’m sure that some of my students are going to be superstars, most of them are quite new to web programming. They have never heard of an HTTP request and couldn’t really tell you the difference between a GET and a POST. I have come to the conclusion that there isn’t anything out there for them.
How am I going to do this? I am going to start by keeping in mind that my students are looking at me to teach them the basics. That every shop in my area uses a different approach so I can’t teach it all. That if they learn the basics of web programming well enough they should be able to learn any new whiz-bang framework that comes along. I am going to get them ready to learn the next Struts, JSF, Spring, Stripes, etc., that comes along. And there is one thing we can guarantee in the IT world, that tomorrow will bring something new. I am going to get them ready for that, not for what is here today.
The Basic Idea
The most frustrating part of trying to teach using java is that it takes too long to create the basic structure of every concept. We have to get Ant setup and a full web application source and build structure. We have to learn how to create servlets and how to add them to the web.xml file. We need to learn how to create JSP pages and where to put them. We spend days just getting a .war file ready to deploy. We have to then make sure that we have Tomcat setup correctly for deployment. All of this has the philosophy of, “EVERYTHING TAKES TOO DAMN LONG!”
Phew, I’m glad I got that out of my system.
Now, on to my idea. I am going to create a structure building framework. Some of my ideas come from Ruby on Rails, but maybe not what you think. I am not going to attempt to recreate Rails in java; that is a mistake. Instead I’m going to take a hint from the part of Rails that helps you generate all the structure of your application. This is going to be a command-line tool that helps you create all the directories and files while you code. I have been looking for a good word that will be my command. I have decided on a working command name for the framework. I might change it but for now the command will be “simple.” Here is an example of how it might be used:
$ simple new action com.bigco.controllers.store.MyFabulousAction
This would check that all the directories are in the right place. Then it would create a new Servlet, and add configuration and mapping to the web.xml file.
This is just a taste of what I’m working on. So far I have lots of ideas and lots to do, but I have chosen one technology. I am going to write my framework in Ruby.
That’s all for now, take care.
Eric, I think you’re really on the right path here. I can only speak for myself, but just getting a new web application working, using java, is a big hurdle. However, the reward is a huge sense of accomplishment and the ability (confidence) to tackle harder concepts.
i have to admire your willpower in even working with java. i cut my teeth programming in your java class, but i never really felt that “light on my feet”. trying to slog through a learning curve is never fun, so i just want to say thank you for lowering my angle of approach for everything you have taught me, and for continuing to spearhead this community of… lets say ‘enlightened’ programmers.
Would it be possible to have this be a wrapper on top of another framework? You wouldn’t have to reinvent the wheel, again, but just provide a better, easier to teach interface.
I think rails-like generators would be nice to see in Java, particularly on the model side, but also for servlets. I’m not that experienced in Java web programming, so we’ll see what I think by the end of the semester.
Oh yeah, and if you need some ruby slave-work, I know a bit of ruby and would love to build my resume and contribute to the removal of grief from web programming in java. Simple – the whiz-bang way to remove grief from teaching Java web programming.
Any chance we will get a follow up to this post?
I’d be willing to lend you my 10 fingers and brain to the job. I may even be persuaded to learn Ruby (might take me all of 10 minutes considering how abstract I think when programming) and Linux (It’s not that I like Windows as an OS, it’s that the machine that was actually worth using met an early demise (the Amiga) and PCs were what I had to fall back on so that’s what I got used to. Don’t hate the usah, hate the frame!). I guess the question remaining is… is there work that an Eric-dubbed “library-writer” could contribute?
And one more thing…
BLOG (insert expletive here) it!
Kevin
wanders off muttering something about a lack of blog entries setting a poor example