Aww crap. I don't want to be a webslinger. But if I don't do it who is going to do it? Whaaaa!
When I wanted to be a web guy, it was 13 years ago, before there were blogs and CMS systems were just vague ideas. The last time I touched Javascript when 1.2 was new and people were still thinking this ECMA thing would be the real standard. Who knows what it is now. Yeah I know, you do and I don't. Poor poor pitiful me. Well, I have training time between contracts and I have to build front-ends to my wonderful scripts. Why? Let's just say that there comes a point when you can no longer stand Windows fat clients no matter how wonderful they are. I have come to that point - the point at which what I need to do for each customer becomes so specialized that a mere CLI is insufficient to its complexity. Also, I'm forgetful and I'd like big fat buttons with instructions I wrote reminding me what happens when I push it.
I have been avoiding this task for too many years and now the future is upon me. What a slag heap.
Six months ago I first picked up Markdown which is a clean simple way of authoring nice texts. I used Markdown (and still do) because cranking out wikis, no matter how good it sounds on paper, is never quite as good for me as straight narrative step by step text. So along with Markdown, I found this supposedly good thing called Jekyll. I used it to build a semi-static website. It was working fairly nicely until I changed one thing, and then the whole edifice collapsed. I still have 40 or 50 odd blog posts from what was supposed to be my daily log in consolidated style. Still nothing comes close to MovableType - the platform I've been blogging on for a decade (and I used to host it myself). So I need to recover all that and find a place to put it.
Some time before I started playing with Jekyll (and hosting Jekyll on linode.com) I went through a Sinatra thing. Sinatra promised to be brain dead simple, and it is, IF you understand REST and you have some clue as to all of the plumbing they have put into webservers over the past 10 years. Guess who has no clue? Nevertheless I have returned to Sinatra this past week because necessity is a mother. The good news is my Ruby-fu is much stronger than the first time I dabbled with Sinatra and so I can make out the difference between its DSL and normal Ruby syntax. Again that time was during the days of rspec too. Three different Ruby syntaxes can be taxing. But now I'm more comfortable.
That doesn't change the complexity. And I can see how a lot of complexity has been injected into the web since I last did some CGI stuff in the Flintstone era. Here's what I gather. There are a bunch of competing Javascript libraries out there. Now javascript is your basic language that runs in browsers that basically turn them into general purpose fat clients that do drag and drop, accordians and fading, spinning two dimensional dialog boxes in color coordinated forms. There is a .js for every occasion and this is the dizzying world I'm stepping into.
Now I've heard of Node.js. There are all kinds of support groups for its fanbase here in LA and I would gather, elsewhere. And there's a bunch of libraries supported by Google as well. It seems to me that these are the equivalent of mini APIs built for making the dialog between browsers and sebservers more complex over the overburdened HTTP protocol. I'm getting somewhere but I'm not sure I'll like it.
So here's what I've got going so far. I have replaced RVM with rbenv. I will use rbenv to support Ruby and JRuby. I will use Sinatra to be my general purpose framework. This may get me into trouble when I want to do some controller stuff. (Five years ago I started playing with Rails. It broke back then before it got sophisticated and stable and so I let it drop, but I liked the idea better than Joomla). So just before I started again with Sinatra this weekend, I installed some rails gems. Now I know a lot of people live inside the complexities of activeBlather-something or other which is a well travelled neural pathway in the Rails world, but I think it probably makes some database stuff stupider than I need it. So for the moment I'm going to sacrifice all the scaffolding fun of Rails for the simplicity of Sinatra. As I said, I might get me into trouble, but we'll see.
Right now I'm figuring out the large gross places to put stuff, and I hope to settle into a decent groove. You see there are a host of oddities with overlap. For convention's sake, I'm going to use a package of standard web-bling called Bootstrap. Apparently when you drop the Bootstrap folder into your Public folder (where Sinatra expects static templates, as contrasted with erbs) then you get a bunch of nifty looking graphics and a new language for blinging out CSS.
Now long ago and far away, I avoided CSS like the plague. Why? Because I used Microsoft Front Page and it put CSS into those gawdawful _vtf subdirectories, and of course it confused CSS with _vtf and generally bastardized everyting. But I see that the CSS baby has been rescued from the .NET scumwater. So now I have to pay attention to <div> tags, which I generally hate to do. Why? Because when I cut and paste into my blog, one unbalanced <div> tag rips a hole in the space-time continuum. Speaking of rips, when did Dreamweaver end up costing over 400 bucks? This digital production economy is crazy inflationary. Oh well.
Tonight I'm checking out AngularJS which seems to be almost reasonable, especially considering what it apparently replaces in raw Javascript. So I have to make sense of it and see what the difference is between it and JQueryUI and JQuery and all the other stuff out there that ends with a .js. What could go wrong?
Well, streaming in Sinatra is going wrong for me right now, and I figure I've got to get into some fundamentals. See there's Puma and Webrick and Thin, all HTTP servers of various capacities and complexities which will augment my ability to write Ruby based websites and services. Since my direction is the multi-threadability of JRuby coming up Java's JVM backdoor, I figure it will be Puma for me, but let's see if I can get the damned thing working.
I splurged on Freeway Pro as an intermediate authoring tool which I expect to help me generate all kinds of pretty webcrap, but I suspect it won't handle all these .js alphabet soup as well as I'd like. On the whole I think there's no easy way out.
On the whole, I think I'm going to enjoy this development more than I did with security in the first half of this year. Instead of incurable paranoia, I will build nice, hackable websites to go along with my backend skills. Thank you big brother, may I have another O'Reilly books please.
Comments