Archive for October, 2008

Feast or Famine

Wednesday, October 8th, 2008

It seems a bit odd to hear of the collapsing economy when I have more work than I can handle. As of last Friday I had 5 projects in queue. I busted tail and knocked one off and shipped it yesterday. But now I am running 4 concurrent development threads in 3 languages (not counting a couple of personal development experiments I’m playing with – one is a GLORP based active record implementation – the other is some enhancements for JambaLaya).

Quite a change from the beginning of the year when my one client scaled back his work drastically. Too much work is a good problem to have in a busted economy. If this continues, I may have to farm some work out.

I’d forgotten what a lame pile J2EE is

Sunday, October 5th, 2008

I’d kind of sworn off doing Java a few years ago but a little contract fell into my lap that seemed like it would be some quick cash for not too much work. I already had a lot of code in the can that would help me do it quickly. Also, I still have IntelliJ 6, which can make Java almost tolerable.

Unfortunately, part of the system required a servlet to handle http requests (using http as an RPC mechanism). I’ve used Jetty in the past with good results so I downloaded it. Despite the existence of a “plugin” for IDEA to work with it, the debugger never worked.

So I moved on to Tomcat. I finally got IDEA configured to use Tomcat, the debugger worked, but the servlet was ignored every time without any kind of error message being logged. Did it fail to link or something (it used a lot of external libs I had to bring in). No clue. I simplified the servlet to just printing “Hi there” and still it refused to load.

This resulted in a refamiliarization with web.xml files and all the rest of it. In disgust I switched back to Jetty. Jetty at least logged the errors to the console and I fixed all the link issues, but still no debug. Back to Tomcat but it still wouldn’t load my servlet at the url I wanted. Eventually, I found the invoker servlet settings, turned that on, and the servlet began to work.

The bottom line is that the entire J2EE architecture, the servlet containers, the zillion xml files specifying garbage I never want to change anyhow, all of it is MUCH TOO FRIGGIN COMPLICATED FOR WHAT IT DOES. Too many descriptors. Too much config. Too much cargo cult xml.

Compare to PHP where I just drop a file in a folder under document root and I’m good to go. Or rails, which is pretty much the same deal – just putting the file in the folder ought to be all that’s required to make the thing work.

I think this will be my last foray into Java hell. At least for a few years until I forget how stupid it all is again.

BaseTen Rocks!

Friday, October 3rd, 2008

Like a lot of long time Cocoa developers, I’ve long lamented the loss of EOF for doing database applications. CoreData is lame, too complicated and fiddly for document based development, too light weight for multi-user.

OTOH, EOF wasn’t perfect either. Having been doing Rails, I find I really like ActiveRecord. It strikes just the right balance between SQL and objects and I like its use of the database schema as the primary meta model.

So I was excited to learn about BaseTen. Right now it is PostgreSQL only, but that’s fine – I like PG. It allows for use of controllers and bindings like CoreData, but it is designed for multi-user use and it doesn’t have a separate model file – you just design the schema along with foreign key constraints and start using it. It really is kind of the best of all worlds. Bonus is it wires the database for notifications so applications stay in sync. In autocommit mode – all objects are hot sync’d. Usually this is exactly what you want for small business apps (think less than a dozen simultaneous users).

Definitely makes development of small business database backed apps easy.