Move Over AJAX, Make Room for ARAX
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."'"
If they extinguished it, who would notice? Seriously -- I'm not trying to troll. WTF is Ruby and what is so great about it? It just seems like Java for people who hate Java from what little research I've done on it, but it also seems to be very popular (of course, hating Java is popular, too).
Can someone please tell me?
Weak security because of dynamic typing? You really have to elaborate on this, because like this it just makes no sense. How is a strong typed languare more secure than a dynamic typed one?
I just don't trust anything that bleeds for five days and doesn't die.
Its syntax isn't like C? Cry me a river. Sure, the syntax could have been made more c-like (braces instead of do/end - and you can use braces if you like anyway) but the syntax isn't where you get the benefit of ruby.
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.
http://www.google.com/search?q=%22Type+conversion+error%22+attack
Dynamic type conversions are a pretty common way to exploit SQL injection holes and circumvent input validation.
"The cup is in turn designed for holding hot or cold liquids, and has an open rim and closed base." --US Patent #5425497
Ok, I'll bite. What makes MVC a "piss poor model" for web applications?
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.
Because Ruby on Rails developers will not have to switch to JavaScript in order to do AJAX like stuff.
.NET, but Silverlight in order to take over the Flash market. The funny thing is that Flash is probably peeking in popularity. The problem is one of the shear diversity of web browsing platforms that will be coming out soon. The iPhone is just the first such device, and already sites are removing flash from their webpages in order to make them iPhone compatible. Yes, Adobe is going to release flash for the iPhone, but what happens when Android comes out? Is Adobe really going to build flash for each and every version of an Android handset? They simply don't have the resources. Microsoft will find the same situation with Silverlight. They simply won't be able to support all the platforms that people want to use.
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.