Web Stew
Why don't you subscribe to my blog while you're here? I'm a freelance web developer and I blog about Ruby, Rails, and business online.
Go ahead and subscribe to my RSS feed. Thanks for visiting!
I’m beginning to become very irritated with the low-tech developments methods we’re stuck with for web development.
The problem is that the view portion of web applications are applications in themselves. They also follow the MVC pattern inside the applications MVC pattern. Each view ‘thing’ has data, view (css, html), and control (javascript). We’ve gone and complicated everything by throwing other programming languages in to the stew - PHP, Ruby, ASP, Java. So when you go to create a view of your site you need to hang the following technologies together *somehow*:
* XHTML
* CSS
* Javascript
* Ruby (or your language of choice)
Let me get this straight, by weaving Ruby with all the other technologies we have _increased_ the complexity. The solution? Ruby needs to replace, and not merely complement the other technologies. Here’s an idea… replace Javascript and XHTML with Ruby. So then you have:
* CSS
* Ruby
Beautiful! That’s _two_ less things to think about while coding. OK, is it possible? Yes. You will need to weave HTML and Javascript behind Ruby, but that’s the point!
Here’s an example of what I’m after.
p1 = p {’This is placeholder one’}
p2 = p {’This is placeholder two’}
p2.hide
link do
p1.toggle_visibility
p2.toggle_visibility
end
link.value = ‘toggle’
This turns in to something like
This is placeholder one
That’s a big difference in my opinion.
Note how you will have to programmatically assign HTML ID’s to elements that are referenced. This would then bind the HTML and Javascript.

