Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

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."'"
This discussion has been archived. No new comments can be posted.

Move Over AJAX, Make Room for ARAX

Comments Filter:
  • Not only... (Score:3, Informative)

    by ncannasse ( 976609 ) on Friday June 06, 2008 @01:52PM (#23684657)
    There's already Java (with GWT) and haXe [haxe.org]
  • Re:Look at ol' MS (Score:4, Informative)

    by Bryansix ( 761547 ) on Friday June 06, 2008 @01:54PM (#23684701) Homepage
    But AJAX works great in .NET already and it does everything you want it to do and you don't need to know javascript to make it work. All you need to do is set the right attributes in the controls you call and presto you have AJAX. The server takes care of generating all the javascript for it to work. Why they would move to this is totally beyond me besides malicious intentions.
  • It's a scripting language that was under the radar until Ruby on Rails came around. Rails is a well done framework for Ruby that opened up the language to the masses.

    And because you brought up Java too, there's also JRuby, a Java implementation of Ruby.
  • by Fallen Andy ( 795676 ) on Friday June 06, 2008 @02:08PM (#23684893)
    It's IronRuby in other words Ruby compiled to MSIL. So in principle it should inherit all the (in)security of that environment (winks).

    Really this isn't a suprise as SilverLight was supposed to be the first outing of the Dynamic CLR (support for IronPython, IronRuby etc.). MS has been quite enthusiastic about dynamic languages ever since Jim Hugenin (former JPython author) started working for them.

    Andy

  • Why is this news? (Score:1, Informative)

    by Anonymous Coward on Friday June 06, 2008 @02:15PM (#23684981)
    Seriously! The entire PREMISE to Silverlight 2.0 is that you run a .NET runtime on the client. So C#, VB, boo, etc. are all possible. Absolutely not a surprise that IronRuby works too.

    Is this news because of some kind of "OMG, TEH RUBY!" factor?

    Are we seriously going to have another news item for IronPython ("APAX"), J# ("AJ#AX"), F# ("AFAX") or IronLisp ("ALAX")?
  • by bob.appleyard ( 1030756 ) on Friday June 06, 2008 @02:21PM (#23685081)

    Strong and weak are often confused with dynamic and static. They're orthogonal concepts.

    An example of a weakly statically typed language would be C. You have to declare the all the types, so you know what type you're dealing with compile time, but a boolean can be treated like an integer or a pointer. An example of a strongly dynamically typed language would be Lisp. You don't have type declarations (well in Common Lisp they're optional), and you don't know the type of a variable at compile time, but a list cannot be treated like a number.

    You do get dynamically weakly typed languages, like PHP. You also get statically strongly typed languages, like Haskell. Assuming that strong and static are the same thing, or that weak and dynamic is the same thing, is a big mistake.

  • Uh... (Score:1, Informative)

    by SatanicPuppy ( 611928 ) * <Satanicpuppy@OPENBSDgmail.com minus bsd> on Friday June 06, 2008 @02:21PM (#23685083) Journal
    A strongly typed language is much less vulnerable to injection/overflow issues because it won't try and play with anything that doesn't match its strict criteria. A weakly typed language, when presented with something that doesn't "fit" will try various methods to make it fit, and this has serious security implications.

    Ruby is weakly typed, and dynamically typed, which means, as a programmer, you have a huge amount of freedom in what you can feed into a variable. It also means that you can effectively give it any input maliciously, and it will try and do something with it instead of rejecting it.

    Java is the opposite. It will not accept data that does not match the variable declaration, and it will not allow variables of different types to interact without an explicit cast.
  • by Anonymous Coward on Friday June 06, 2008 @02:27PM (#23685159)
    Because, for instance, the Java type system will not allow you to replace the String implementation with a custom one, whereas in duck-typed languages, the string can be completely replaced and used to capture sensitive information.
  • by Jugalator ( 259273 ) on Friday June 06, 2008 @02:39PM (#23685341) Journal

    Does yours?
    Who cares about that. It runs in Silverlight. It's whether your browser supports the Silverlight plugin that matters. IE does, Firefox on Windows (2, not yet 3) does, Opera does inofficially (to be official in the future), Safari on OS X does. Firefox on Linux is WIP and a Mono project.
  • by srussell ( 39342 ) on Friday June 06, 2008 @02:46PM (#23685457) Homepage Journal

    It's like java, but not as fast, secure, or scalable.

    It's like Java, only without hacks like "primitives". Unlike Java, it is a pure OO language, where everything is an object, and it provides a few significant OO features that are missing from Java, such as mix-ins and closures.

    --- SER

  • by DragonWriter ( 970822 ) on Friday June 06, 2008 @02:52PM (#23685557)

    It just seems like Java for people who hate Java from what little research I've done on it


    Its nothing like Java.

    Now, if you said it sounds like "Python for people who hate Python", that would be more reasonable. Or, say, "Perl for people who can't read Perl". But those, though better than "Java for people who hate Java", still miss the point.

    Its a dynamic scripting language whose strongest initial influences were, IIRC, Smalltalk and Perl; it was more OO from the start than Python, though I think that's less of a gap now. It seems to have stronger influences from functional programming than Python, and its design follows more of Perl's "There's more than one way to do it" philosophy than Python's more "There's one way to do it" approach. It has good support for metaprogramming and internal DSLs. Its frequently criticized for the fact that the main current (1.8.x) implementation is slow, even among dynamic scripting languages, though faster implementations (the new, but less stable, 1.9 implementation, and the alternative, Java-based, 1.8-compatible JRuby implementations) exist.

  • by Qbertino ( 265505 ) <moiraNO@SPAMmodparlor.com> on Friday June 06, 2008 @02:57PM (#23685633)
    This time I'm gonna shoot the guy who came up with the acronym. No, honestly, I'm gonna F*CKING BLAST HIS HEAD OFF WITH A 12 GAUGE SHOTGUN! This is no f*ckin' joke, man, I'm gonna kill him. I swear. Where's he at? Where you at, hu? Show yourself. You ain't gonna come up with no g*ddamned hairbrained acronym no more, I swear.
    SHOW YOUR FACE, MOTHERF*CKER!
  • by gbjbaanb ( 229885 ) on Friday June 06, 2008 @03:06PM (#23685767)
    I thought the web was a MVC model. The browser is your View and the server side is your controller (and you have model data from somewhere, DB or static files or whatever).

    I think he's referring to interactivity, ie in a thick client MVC system, you can interact with the GUI and changes are seen immediately, but the problem here isn't one of MVC being poor, its the relatively slow network that's the problem.

    I suppose you could download a lot of data to the view and only show part of it as the user selects things, but that involves moving the controller to the client. I guess some people would think that's breaking the paradigm, but that's how a MFC app works - data tends to be all in the client.

    So.. maybe he sees Rails as poor because it is always making roundtrips to the server.

    Either way, who cares. The decoupling of presentation from logic is one of the best paradigms you can use for any application.
  • by Anonymous Coward on Friday June 06, 2008 @03:09PM (#23685811)
    Actually, all of Internet Explorer's scripting support comes via the Windows Script [microsoft.com] architecture, which is supported by various script language developers. ActivePython [activestate.com] is one of them, so it's possible to use Python in IE right now if you want.

    The two major problems are lack of sandboxing (at the language feature and library levels), which makes it a security risk for anything from untrusted sources, and lack of widespread use to enable it on the web at large.

    One thing Silverlight brings to the table is a security architecture, so things running on top of it -- like the DLR Ruby implementation -- are already sandboxed.
  • Re:Uh... (Score:1, Informative)

    by Anonymous Coward on Friday June 06, 2008 @03:39PM (#23686279)
    Wrong, pal. Ruby is strongly typed. Or can you provide examples of it being weakly typed?
  • by encoderer ( 1060616 ) on Friday June 06, 2008 @04:06PM (#23686631)
    "So for the web, it degenerates both object oriented programming and MVC into mere ways to organize your code"

    That's nonsense.

    If for no other reason than the fact that displaying a page often involves some real work. Some real heavy-lifting. Often far more than just a couple database queries being fed into a grid or report.

    OOP brings order, structure, reuse and quality control to large, complex systems (and website/webapps can certainly be very large and very complex) That's true no matter what context it's being used in, web, rich client, whatever.

    Yes, there is overhead involved in creating objects. But even in your worst-case scenario where there is no shared state, the overhead is hardly a deal breaker: It's far better to optimize for the developer than it is to optimize for the machine. Unless you're working on a website in the 99th percentile of traffic, you probably don't have a lot to worry about.

    Further, your scenario IS worst-case.

    For example, we have an in-house framework. It's not all that different than the ones you've seen. Take, for example, a simple web form:

    You instantiate the data model (need to pre-populate the form), you instantiate a webform object, which is view-tier and is just a widget that binds to a data model and presents an HTML form.

    When that form is rendered in HTML, the webform object and the data model it binds to are serialized and stored in the session.

    When the user submits the form the front-controller will look at the formkey submitted with the form and unserialize the form and model objects. It pulls the values from the HTTP Post into the data model and they're validated and saved.

    This is nothing revolutionary. It's not even complicated. And it's just one of a dozen ways to overcome the no-shared-state problem.

    The idea that OOD is "degenerated" in a web environment is ludicrous. Procedural development is a thing of the past. The idea of 1 page : 1 script that runs from line 1 to line n is just not adequate for MOST modern web apps.

    Todays systems are not your mothers web applications. We're doing far too much on the web. Applications the size of the web applications that are written today would collapse under their own weight if done procedurally.
  • by jhoger ( 519683 ) on Saturday June 07, 2008 @01:34AM (#23691305) Homepage
    Somehow I recall closures, blocks, metaprogramming commonly used and usable in Perl before I ever heard of Ruby.

    I'm sticking with Perl and CPAN, thanks.

The last person that quit or was fired will be held responsible for everything that goes wrong -- until the next person quits or is fired.

Working...