Move Over AJAX, Make Room for ARAX 409
sasserstyl writes "eWeek reports that Microsoft's Silverlight platform will support Ruby client-side scripting, enabling ARAX — or Asynchronous Ruby and XML. Would be cool to have the option to script client-side in something other than Javascript. 'In essence, using ARAX, Ruby developers would not have to go through the machinations of using something like the RJS (Ruby JavaScript) utility, where they write Ruby code and RJS generates JavaScript code to run on the client, Lam said. "Sure, you could do it that way, but then at some point you might have to add some JavaScript code that adds some custom functionality on the client yourself," he said. "So there's always that sense of, 'Now I'm in another world. And wouldn't it be nice if I have this utility class I wrote in Ruby...' Today if I want to use it in the browser I have to port it to JavaScript. Now I can just run it in the browser."'"
Look at ol' MS (Score:4, Interesting)
Doing a little something for developer mindshare. But then this is really just a way to push .NET.
Questions:
Re:Um, my browser doesn't support Ruby (Score:5, Interesting)
Can someone please tell me?
Re:Somebody update NoScript. (Score:2, Interesting)
Re:Somebody update NoScript. (Score:5, Interesting)
Re:Um, my browser doesn't support Ruby (Score:2, Interesting)
It's syntax is "intuitive" which would mean good things if you were someone off the street, but for the rest of us who've spent decades working with languages that are basically C syntax, it's a p.i.t.a, and the syntax doesn't really add anything.
Rails is a cool new idea, but the implementation is horrorshow; Django got a later start and is already ahead in performance.
Re:Look at ol' MS (Score:3, Interesting)
What's malicious about it? They're not going to be able to kill Ruby by adding it to Silverlight.
I have no doubt that AJAX works just fine in .NET, but nothing gets developers more excited than a surplus of options. Even if the options don't add anything other than choice.
It will be interesting to see how much traction IronPython and IronRuby are able to get with non-MS devs. I have no experience with Ruby and only a little with .Net and Python, but I keep hearing about these integrations in places I least expect.
Re:Um, my browser doesn't support Ruby (Score:5, Interesting)
The most important thing that Ruby has done, in my mind, is to make blocks, closures, and runtime metaprogramming mainstream. So while the syntax may not add much, the language features add a hell of a lot. After writing code in C and Java for a number of years, switching over to Ruby took me all of a week.
That being said, the supposed productivity gains are mostly hype, because you end up spending the time you gained in writing the code to begin with having to write a lot more integration tests to ensure correctness for things that the compiler deals with in a typesafe language.
Rails has been pretty important insofar as it's given a kick in the ass to a bunch of other languages. I agree though that the implementation is a bit of a nightmare, and the lack of built-in dependency injection is a hassle.
Re:Somebody update NoScript. (Score:5, Interesting)
Dynamic type conversions are a pretty common way to exploit SQL injection holes and circumvent input validation.
Re:Um, my browser doesn't support Ruby (Score:2, Interesting)
Fact of the matter is, MVC is a piss poor model for stateless client-server applications, but it's not till you've wasted your time building a solution in this fashion and watching it fail to scale that you realize that.
Re:Look at ol' MS (Score:3, Interesting)
Ajaxcontroltoolkit is nice, but far from complete.
Lots of things I have to do with JScript/JavaScript
There are other frameworks that help with Ajax, but at the end of the day, you need to work with JS.
Re:Um, my browser doesn't support Ruby (Score:3, Interesting)
Am I the only one who sees something bad about that?
Does a plumber do electrical work? No? Then why does anyone but a programmer do programming in a professional environment?
It must be this nasty cold I've contracted, I can't seem to understand anything today.
Re:Somebody update NoScript. (Score:3, Interesting)
Embedded Python on the web? (Score:3, Interesting)
Just think how much more awesome projects like TurboGears/Pylons could be if you could run Python on both the client side as well as the backend.
Where's APAX when we need it?
Re:Um, my browser doesn't support Ruby (Score:5, Interesting)
The only thing you mentioned was scalability.
Personally, I find the MVC pattern applies to web apps wonderfully. Being able to "plug and play" views is far more helpful in the web universe than it is in rich client programming.
I can create a default view, lately that's been a standard XHTML interface with Ajax, usually leveraging the ext.js library.
And I also create a simplified HTML-only view for graceful degredation on clients that are not using JavaScript.
And a view for mobile interfaces.
On "data grid pages" I can plug-in a view that outputs the data in XML or Excel format.
For reporting I can create a view for an on-screen HTML based report, or I can plug in a view that displays it as a PDF or, again, XML or Excel.
Meanwhile, I only create the data models and controllers once.
This is FAR easier and faster to create and maintain.
And in todays world, unless you're a top-1% web destination it's a FAR wiser move to optimize for development time and cost than it is to optimize for the machine.
Adding a server is much cheaper than adding a developer.
Believe it or not, I'm not a fan of Rails. I'm especially not a fan of ActiveRecord. In ruby, DataMapper is a much better Db layer than is ActiveRecord.
But to denounce Rails because it's MVC? I'd love to hear why you feel that way.
Re:Um, my browser doesn't support Ruby (Score:2, Interesting)
Silverlight on linux, is in my opinion, broken.
Re:Somebody update NoScript. (Score:3, Interesting)
Re:Um, my browser doesn't support Ruby (Score:4, Interesting)
*: somebody always counters this with "but you don't control the server!!!1!" Look, no small business has its own mail server. Google's is just as secure as Joe Blows ISP.
Re:Sh@tload of buzzwords stuffed into a paragraph (Score:3, Interesting)
I occasionally use it in a very rudimentary way - I use the AJ part and forget about the AX. What I mean with that is that I simply reload part of a page, whatever it may contain. It's a simple GET, no bells and whistles. The XMLHttpRequest part and the connection handling are abstracted away in a drop-in function that handles everything for me. It's not very flexible but usually it's enough.
Of course it does get more complex once you want to do anything that goes past putting the reply to a GET into a <div>, especially if you use JSON to pass around tuples and don't trust the server to send clean code...
Re:This time (Score:3, Interesting)
People dislike Javascript, but in fact it's very powerful. Its Achilles' heel seems to be that no one cares to really learn Javascript like a regular programming language. Rather, people doing Web development look at it as a hacky tool to add bling to their website. They learn small bits of it whenever they want some new effect they saw on the other guy's site, but never stop to learn how to use the vast array of built-in functions effectively, how to create objects, how closures and functional primitives work. Javascript is very much a "real" programming language, but its niche causes most to overlook its powerful and one-of-a-kind features and instead view it through the multitude of browser quirks one has to deal with when using Javascript in Ajax.
Learn JavaScript? (Score:4, Interesting)
Puh-lease... Ruby Is Redundant.(tm) (Score:3, Interesting)
Usually the reason I've picked a language to do a job has had nothing to do about syntax. The three biggest factors have always been: what do I already know, what has the best performance, and what can be developed quickest? It's always a balance of those 3.
I'll never use Ruby until it's supported widely enough, matured enough, and provides me with some reason to bother learning its API.
Considering I'm already intimately familiar with C, Java, PHP, and SQL, I think hell freezing over is a safer bet. In my limited observation, most of the people who tout Ruby as the future have never extensively programmed in another language (except maybe a handful of people who coded in the much older languages similar to Ruby.)
I especially love it when somebody claims to write a web server in 10 lines of Ruby... and all it took was using a 10,000 line library and a however-large interpreter. I'd like to see that stand up to a slash-dotting. Puh-lease...
Why Ruby? (Score:5, Interesting)
One of the problems in Web Development is using one language for the back end (whether Java, Ruby, or PHP) and then when you need some asynchronous action on the client side, you have to switch your syntax to JavaScript. It can be a bit of a pain. It's not that you may not know both JavaScript and Ruby, but that you have to keep switching between the two and that can make brain hurt.
I take it that Silverlight will be doing the "ARAX" side of things. It's actually a neat idea. You can use a single language for both the Client and Server side, but where JavaScript is built from the ground up to live inside a webpage, Ruby isn't. I guess that's why there's IronRuby which will be a bit more "JavaScript" like.
The big problem is that the Ruby interpreter will be Silverlight. Where as JavaScript is built into WebKit, an open source project, Silverlight is proprietary. If you create a new web browser, you can easily adopt WebKit and get a standardized JavaScript implementation. With ARAX, you're either going have to role your own or depend upon Microsoft to create a Silverlight interpreter.
The whole thing is to push not
In the old days, this was okay because it brought people into the Windows world. But, as people move from the desktop, Windows isn't the end all/be all platform it use to be. People like their iPhones and iPods. People will start buying Android based stuff. Symbian and RIM both are larger platforms. Windows Mobile is a distant fourth in sales this year. Measured in licenses, Windows Mobile is still more popular than the iPhone, but that doesn't include all the devices laying in some drawer gathering dust. Assuming a 2 year average product lifespan, Windows is fourth behind the iPhone which hasn't been out for a year yet. Can Microsoft (or is Microsoft even willing) to put Silverlight on all the various platforms out there? If not, developers just won't use ARAX.
Sorry, not impressed... (Score:3, Interesting)
Browser compatibility aside, JavaScript is actually very solid and is a great language to program in for people who actually bother to learn it (unless you are really stuck up about static typing or class based OO, in which case, sorry...) Why so many people work so hard in trying to convert Ruby or Java into JavaScript (e.g. RJS or GWT) or make JavaScript look like a language that it isn't (e.g. ASP.NET AJAX) rather than just learning the damn language I will never figure out.
This of course brings me to JavaScript's second biggest problem - it's users. Why is it that JavaScript, apparently alone among languages, can attract so many programmers that have absolutely no desire to even try to learn the language? I've heard people who programmed professionally in JavaScript for years claim that it doesn't support inheritance. In any other OO language that would be the sort of thing that a new programmer would learn in the first week. Most experienced programmers when learning a new language would sit down with a book or a quickstart guide or tutorial of some sort and learn at least the basics of the language before they tried to take on a meaningful project, but apparently with JavaScript it's OK to just jump in and learn as little as you have to as you go along.