Slashdot Mirror


Web Browser Programming Blurring the Lines of MVC

lkcl tips his in-depth article up at Advogato on the difficulties for the MVC programming model that are introduced by Javascript and AJAX, and solutions for them. He writes: "This article outlines how the MVC concept is made incredibly awkward by the gradual but necessary introduction of Javascript and AJAX. A solution is found in the form of Javascript Compiler Technology such as GWT or Pyjamas (PyPy's JS backend or Rb2Js could be used, with some additional work). The article outlines how and why the traditional MVC patterns are fragmented by Javascript and AJAX, advocating that if a site is programmed purely in a high-level language that is then compiled to Javascript for the Web Browser sections, the same high-level source code can be executed either client-side on the browser, or server-side, or even both, depending on the requirements. The implications of this approach are discussed in depth."

3 of 303 comments (clear)

  1. Re:Haha, Python programmers by lkcl · · Score: 0, Flamebait

    that's why i mention RubyJS and GWT as well. all three - RubyJS, Pyjamas and GWT - are javascript compilers.

    there are plenty more: see part-way-down the responses to http://advogato.org/article/985.html for a list which one of the advogatians posted.

  2. Re:History of the Internet (not even close) by Threni · · Score: 0, Flamebait

    I use vb.net. I recently took a look at the way you do java web development. It's a bit pre-.net isn't it? There seems to be an awful lot of fucking around to do the sort of stuff you do with drag and drop or a few lines of code in .net. Yeah yeah, drag and drop isn't real coding. I know. Real coding is what I can get on with doing having first created an app for someone in 30 mins using (largely) drag and drop.

  3. Re:History of the Internet (condensed) by Blakey+Rat · · Score: 0, Flamebait

    Call me jaded, old, and behind the times...

    Ok grandpa.

    But what ever happened to a web browser just being a web browser instead of a development platform with three heads breathing fire, half a dozen plugins, six months of combatability testing, and a kitchen sink?

    It was a short period of about 6 months between when Netscape 1 came out and before someone had the bright idea of plugging Java VMs into it. Remember VRML? What you're griping about missing never really actually existed.

    Is there ever a point where a web developer will concede that the web is not the Best Platform for Everything in The Universe(tm)?

    Honest web developers will right now. But a lot of the reason that the web is being used for things like, say, timekeeping applications is that companies that made stand-alone timekeeping applications... well, they did a really shitty job. Compare Sharepoint with Lotus Notes and tell me which is more pleasant to use.

    Or is it just that they were never schooled in the old temple and given a proper appreciation of a real language like C++?

    Wow, you are a grandpa.

    Javascript is a pretty goddamned competent language. No, it's not perfect, but it's a hell of a lot better than (for example) the VBA you're required to use to script Microsoft Office applications. It can emulate a OO language or a functional language, it has reflection, a familiar and simple syntax, it's quick and the interpreter is simple... in short, Javascript's a pretty damned good language overall.

    That all said, DOM sucks ass. But remember, DOM would suck as much ass if you interfaced with it using C++... you can't blame Javascript for DOM flaws.

    Help me out here -- this isn't intended as a flame but an honest question

    Yeah, Javascript isn't a "real" language, yet you're not intending to flame? I guess you just assumed the people reading your post wouldn't be able to remember more than one sentence at a time. Look, if you say someone's language-of-choice isn't a "real" language, you're flaming. And an asshole. You're a flaming asshole.

    -- where does this attitude that everything has to be crowbar'd into a web interface to be considered modern these days?

    That's not even a sentence. But let's assume you meant to put the words "come from" after that sequence of words, and the answer is: from people who were sick of using piece of shit desktop software. It's true that frequently the web applications aren't much better (witness anything from Oracle Apps or Lotus Notes webapps).

    People like you who like desktop software brought this upon yourselves by making unusable, unpleasant pieces of crap for decades. Face it.

    Because a lot of the problems in this article come down to programmers expanding and bloating their platform/language of choice to do something it was never designed for because That's Just What I Know(tm).

    Every web developer is a retard who can't learn anything new! But I'm not intending this as a flame!!!

    I cry for these languages. I know after 5pm they go home and hit the frozen dairy products hard to feel better about how fat they've become.

    Javascript's slimmer than most C++ libraries.