Saturday, November 6, 2010

Sproutcore finally functioning

So the first thing I did was check for Javascript dependency management. I've been down this road a little way before, and I know that the last thing I want to be doing is writing everything from scratch. There are probably 500 frameworks out there that want to be the last word in cool RIA development and will be patronisingly offended that all I want to do is write a pissy little engine in them. That's fine, they'll tolerate me until they get an option on a 3rd user and then I'll be out in the cold again.

I need something that's going to minify, lint check, modularize and autoinclude. I want to be able to split up my code into as many files as I need to for the logic to make sense to me, without having to go back to some big kludgy main.html includer and append into the head.

I want a framework that does that for me. If it can also bring in jQuery, Raphael, Flot, that sort of shit automagically and guarantee compatability that would be nice. Obviously I need to be pretty cross browser, right up to the point of not having HTML5 canvas to work with. Even then there are probably hackarounds. I'm honestly not looking to push it too hard. I think the bulk of my logic will be scene graph handling, which is quite similar to model stuff.

Key handling is important. No, fuck it. I'll just have a point and click interface. Not like there's a keypad on an iThingy.

So yeah, I went and fished around. JavascriptMVC, Cappucino, Sproutcore all sort of look the business. I don't care how many Desktop style widgets they ship with because I won't be using them. I do care about whether they give me a hot compiling server off the command line so that I can one click build, deploy and run. I don't want to fuck around with Windows 7 trying to server its own files locally, I want to write a little green guy walking around the screen.

My fucking god SproutCore took forever to get running.

First I made the terrible mistake of using the newest versions of everything. That 'everything', by the way is:
sproutcore
thin (these two are both gems, thin is a webserver. And how the FUCK did I end up in Rubyland? Anyway...)
devkit (some thing we apparently need to build on windows - has MinGW in it or something)
ruby

So after about two hours of trying it with ruby 1.9.2 because someone in a Sproutcore field note said it was possible on 1.9.1rc something (it wasn't), I went back to 1.9.1rc. And then 1.8.7. Each time, reinstalling all the gems and whatnot. When did I figure out that it's 5000 times faster if you don't install the fucking rdoc? At the end. Of course, at the end.

Then there was a pleasant time of me hitting localhost:4020 when it really needed to be localhost:4020/myApp, and of course it didn't say a word. Neither in server output nor in client land.

Let's hope it gets nicer. I'm optimistic. At the very least it seems to me that it's going to make a bunch of deployment stuff work more nicely than my fucked up bundles of js.

1 comment:

  1. Hey me! This is me!

    Remember this:
    http://sixrevisions.com/web-development/html5-iphone-app/

    ReplyDelete