Slashdot Mirror


The Future of AJAX and the Rich Web

jg21 writes "This AJAXWorld Magazine article indicates how far AJAX has come since devs complained here two years ago that it sucked all the time. Eight experts were asked what questions we should now all be asking about where AJAX is headed next. The suggested questions are refreshingly hard-headed, including: 'How are we to fix the web?'; 'When will AJAX development finally be easy?'; and 'Do we really need JavaScript 2.0? Won't it be somewhat irrelevant by the time it becomes commonplace and thus usable?' One of the most interesting questions came from Kevin Hakman, co-founder of TIBCO's General Interface: 'On what timeline will AJAX skills become commoditized like HTML skills became?'"

56 of 303 comments (clear)

  1. will AJAX development finally be easy? by doroshjt · · Score: 3, Interesting

    It already is. What is so hard about it?

    1. Re:will AJAX development finally be easy? by brunascle · · Score: 2, Informative

      i was thinking the same thing. there's all of about 5-10 methods/properties to learn, and then you just need to know basic DOM functions for the response. it's not hard at all.

    2. Re:will AJAX development finally be easy? by The+Clockwork+Troll · · Score: 2, Funny

      What is so hard about it?

      Not using it.

      --

      There are no karma whores, only moderation johns
    3. Re:will AJAX development finally be easy? by misleb · · Score: 2, Interesting

      Doing simple AJAX stuff is easy. Drag/drop a few lists. Insert a new div into the page... Anyone who's used Ruby on Rails knows that. The hard(ish) part is making an app that is completely AJAX. As in, loads from a single page and never refreshes after that. Though I haven't tried toolkits like GWT. Maybe using one of those is just as easy as developing a desktop application.

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
    4. Re:will AJAX development finally be easy? by Larry+Lightbulb · · Score: 4, Insightful

      Ok, point me to a place where I can pick up all the knowledge I need to use it, I've got a free afternoon. And I mean that seriously.

    5. Re:will AJAX development finally be easy? by jma05 · · Score: 4, Insightful

      The challenge is not technical. Devs need to change their mindsets while about thinking about web applications. I am not talking about putting an occasional AJAX widget. The change is from synchronous to asynchronous web applications. That's about as big a change as writing distributed applications for someone who mostly wrote 1-tier applications. Design is different as is debugging.

    6. Re:will AJAX development finally be easy? by Dragonslicer · · Score: 2, Insightful

      Doing simple AJAX stuff is easy. Drag/drop a few lists. Insert a new div into the page... Repeat after me: DHTML/DOM manipulation has NOTHING to do with XMLHttpRequest.
    7. Re:will AJAX development finally be easy? by SnapShot · · Score: 2, Interesting

      Unable to focus on it to the exclusion of other Java development, I found GWT very hard to get used too. My fingers and brain want to write Java, but when in GWT you're really only writing a sub-set of Java 1.4. The lack of generics (which have become second-nature; I can't write "Set" without instinctively putting a "" after it) and of Java 5 support in general was very difficult to get over. For me it was harder than working in another language where I expect things to be different.

      Maybe, if GWT was re-released for OCaml (or some other language that I'd learn in conjunction with GWT) I might have an easier time working with it.

      That being said, GWT is a very powerful and very cool system and you can do a "single page" AJAX app that's fairly cross-browser compatible and never have to leave your Java environment. A little work with the existing maven plugins and you can deploy your complete app just like you'd build a Swing application (almost ;-)

      (P.S. My experience with GWT was last spring which is probably about 10 versions old so things may have changed...)

      --
      Waltz, nymph, for quick jigs vex Bud.
    8. Re:will AJAX development finally be easy? by SharpFang · · Score: 5, Insightful

      It is not quite as easy.

      Assuming you start from zero...

      The beginnings are easy. Learn basics of HTML and CSS. A week and you're intermediate. You still don't know all the hacks and caveats but you know quite enough.

      Learn basics of Javascript. Say, 3 days. Simple JS is easy. If you think all JS is easy, read some scripts by Douglas Crockford and see how wrong you were. But for a starter, you need simple JS.

      Then learn using DOM. This isn't all that hard. There are some caveats like some browsers inserting whitespace text nodes between tags and such, but that's all doable. One evening to master it.

      Learn some backend language. PHP probably. With some database too. Quite easy but the amount of knowledge you need to absorb is at least 2 weeks of learning.

      Next you learn basics of using xmlHttpRequest. This is one evening and you know how it works and you know there's no sense using it as-is.

      You spend the next afternoon picking an AJAX framework/library/toolbox and another day learning it.

      They you spend another year writing AJAX and learning how to properly react to unreliable connections and handle all kinds of errors, corrupted data, browser incompatibilities, how to protect your apps from script injection attacks or exploiting your application server by someone "from outside", deal with load ballancing on the server side, sharing scripts between domains, making the code non-conflicting with other JS and self (2 instances of the same AJAX-based tool on one page? It's broken more often than you think!), creating javascript files dynamically using PHP to allow better flexiblity of your app, parsing, traversing, modifying and extracting data from style sheets, interacting with Flash, Java and APIs of a dozen external services, writing XUL based apps, optimizing data for transfer, porting large parts of business logic to JS to offload your application servers, then finally using the advanced javascript where modifying system methods and objects is not a taboo anymore.

      Then you know AJAX.

      --
      45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2
    9. Re:will AJAX development finally be easy? by truthsearch · · Score: 4, Informative

      Fair enough. I was awfully obnoxious, so I should make up for it with some actual information.

      For a quick, but useful and accurate, starting point I like Mozilla's introduction.

      Then I recommend downloading and trying prototype. It saves the mundane tasks, makes code a little easier to read, and is used by other popular frameworks.

      Those cover the base scenarios. I haven't seen any good intermediate documentation. After the intros I suggest reading more reference documentation and just trying things out.

    10. Re:will AJAX development finally be easy? by brunascle · · Score: 2, Informative

      here's a good intro. this assumes you have a file time.asp on your site that just outputs the time.

      if, instead, time.asp outputs an XML file, in the code change .responseText to .responseXML, and from that you can use DOM functions (e.g. xmlHttp.responseXML.getElementsByTagName("time")[0].childNodes[0].nodeValue.

    11. Re:will AJAX development finally be easy? by misleb · · Score: 2, Insightful

      True, but there's little point in doing XHR if you're not manipulating the DOM. They go hand in hand. Together they make up "AJAX" as is commonly implemented. While doing XHR and manipulating the DOM are, in and of themselves, not particularly difficult, making a a truely rich desktop-like application using them can be tricky. Especially considering the relative sparseness of HTML with regards to application control.

      --
      "THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
    12. Re:will AJAX development finally be easy? by Just+Some+Guy · · Score: 2, Insightful

      porting large parts of business logic to JS to offload your application servers,

      Whoa, hey, full stop. I was with you until then, but... You're really trusting your business logic to the least controlled (both in the "security" and "standardized" sense) part of the stack? Ouch. Good luck, man.

      --
      Dewey, what part of this looks like authorities should be involved?
    13. Re:will AJAX development finally be easy? by iamacat · · Score: 2, Informative

      I am sorry for the abuse you went through. I dabbled a bit with JavaScript and gave up when I found out that does not work in IE, even the latest version of IE7. So I installed http://code.google.com/webtoolkit/>gwt and gwt-ext and had the first page of my application running in a couple of days using nothing but the plain Java code. I create a tree of serializable Java objects on the server and get the same tree on the client and then use it to update my UI.

      My only complaint is crappy documentation. To understand gwt-ext I actually have to read the documentation of ext itself, with is Javascript based. I wish they copied the comments to javadoc. Then also to have a standalone text box on your page you need to put it inside a form and then set a bunch of options to make sure the form does not try to decorate the space around the text box in any manner.

    14. Re:will AJAX development finally be easy? by hobo+sapiens · · Score: 3, Informative

      How well do you know javascript?

      As someone else pointed out, XMLHTTPRequest is what makes AJAX tick. But without knowing Javascript, what are you gonna do with it?

      Assuming you are very good with javascript, here are two resources for you. 1 will help you see what the XMLHTTPRequest object does. 2 will help you tame it a bit and abstract things.
      [1]: http://w3schools.com/ajax/default.asp
      [2]: http://www.prototypejs.org/learn

      The thing is, the AJAX bit is a very small part of the total AJAX package. Then you'll need to learn JSON (a good data interexchange format) and how to use Javascript to create elements.

      There, now that I have provided what you asked for and not just some smart alek remark about how you need to google it, this has to be said...If you seriously expect to master a useful skill in an afternoon, then you have some expectation issues. If there's one thing life has taught me, it's that something worth having doesn't come in a day, and if it does come in a day, it's probably not worth much. Did you learn to program in one day? No? Then why would you expect to learn a complex object and a totally new technique for making web applications on one day? But if you really want to learn then you'll thank me for those links later when your web development reaches the next level. If you are just bashing AJAX with a cudgel of ignorance, then you'll ignore those links and keep griping about AJAX being too hard. I guess time will tell.

      --
      blah blah blah
    15. Re:will AJAX development finally be easy? by CandideEC · · Score: 2, Insightful

      You can skip of a lot of that crap if you just learn Java and use GWT. I mean *really*...is there any other option?

    16. Re:will AJAX development finally be easy? by sackeri · · Score: 5, Informative

      You just can't say it any better than that.

      From a lot of the comments I get the impression that most people really don't get it. AJAX is incredibly useful, but it's mostly a really clever hack. The need for dynamically updating elements on the web page is definitely there, and AJAX manages to fill that need somewhat. But Javascript/DOM + XML/HTML is a terrible set of tools to build GUI widgets with.

      AJAX works by sweeping the nitty-gritty details under the rug, but scratch the surface, and you realize how filthy the whole thing is. The first time you try to use a cool feature of your favorite GUI widget, and expect it to work the way your favorite desktop widget does, the cool-factor quickly degrades into frustration. Even with some of the best libraries out there, they still don't seem to have the problem licked.

      It's amazing how far we have gotten with the tools available, but there really is a threshold forming due to these weaknesses. I'm not smart enough to envision how to get there, but there really needs to be a fundamental change that better integrates these technologies. Otherwise we're gonna be in spaghetti-code hell for a quite some time to come.

    17. Re:will AJAX development finally be easy? by hobo+sapiens · · Score: 2, Informative

      Please do not take offense, but the fact that you tried using the position property shows that you don't really understand CSS that well. That's not meant as an insult, just a statement of (apparent) fact. I just wrote a very simple page (just a div and image tag, no doctype or anything) that had this content:

      <div style="width:40pt;height:40px;border:solid;">
          <img src="foo.png" style="width:50%;height:50%;" />
      </div>


      That displayed the image correctly in Firefox and IE6, the image's dimensions being 50% of the div's width and 50% of the div's height. Not that you *should* use points for dimensions, but that's just in keeping with what you said you did.

      That said, browser behavior is very flaky. Your frustration is not unjustified. Especially with IE. IE sucks. There's not much more to say about it.

      "It would be even better not to use the defective product at all, but that is hard when the vendor has a monopoly status."
      Preaching to the choir, dude.

      --
      blah blah blah
  2. Reduce the Quirks and Exceptions to HTML/CSS by JoeCommodore · · Score: 3, Insightful

    Probably the biggest thing I see is that we live with a 'quirky' web where you write an HTML/CSS document and have to adjust for problems with one browser or another (or not support some because of such things), while the use of standard libraries and tools have provided automatic solutions for much of the quirks they still limit the possibilities.

    --
    "Enjoy what you're doing! If it becomes drudgery, you're doing it wrong!" - Jim Butterfield
  3. HTML skills are a commodity? by Bogtha · · Score: 3, Insightful

    On what timeline will AJAX skills become commoditized like HTML skills became?

    It seems to me that developers that can write decent HTML are still an extreme minority. I still see href="javascript:", "<div> s are better than tables for layout", a chronic amount of invalid code, and all kinds of other idiocy all the time. Sure, if you want monkeys to throw tag soup all over the place it's not hard to find them, but that doesn't mean they know what they are doing or that it's easy to find people who actually understand HTML.

    --
    Bogtha Bogtha Bogtha
    1. Re:HTML skills are a commodity? by Frosty+Piss · · Score: 4, Insightful

      Repeat after me: tables are not intended, nor suited, for layout.
      What a particular tag was meant for when it was first implemented is entirely irrelevant as to if it can be effectively used to do something.
      --
      If you want news from today, you have to come back tomorrow.
    2. Re:HTML skills are a commodity? by brunascle · · Score: 2, Informative

      How else would you like people to make clickable text that executes a JavaScript method, and how would it be better than that approach?
      use the onclick attribute, with return false at the end to cancel the href. that way, you can use the href for a URL to degrade gracefully. for example, if it's opening a popup window, have the href be the URL of the page that loads in the popup.
    3. Re:HTML skills are a commodity? by Bogtha · · Score: 4, Insightful

      How else would you like people to make clickable text that executes a JavaScript method, and how would it be better than that approach?

      Add an event handler to a normal <a> element with a proper href attribute. It works when JavaScript is switched off, it works when your event handler has an error, it works when you try to open something in a new tab or window, it works when the browser doesn't support whatever it is you are trying to do in your event handler, it just plain works.

      DIVs are better than tables for layout.

      No, they aren't. They are absolutely useless for layout.

      They let the designer create more elaborate layouts more efficiently than tables, but they also make even simple layouts much more consistent and easy to implement.

      You have confused the <div> element type with CSS. They are totally different things.

      This is not pedantry. If you are thinking that layout is somehow achieved with <div> elements, then you are looking at things completely upside-down. You use the most appropriate element type for the information at hand, whether that's a table, a list, a paragraph, or whatever. You then arrange those elements with CSS. The particular element types you've used are not relevant to the layout. If you think <div> elements are in any way interesting for layout purposes, then you don't understand how the whole picture fits together.

      --
      Bogtha Bogtha Bogtha
    4. Re:HTML skills are a commodity? by Osty · · Score: 5, Informative

      This is not pedantry. If you are thinking that layout is somehow achieved with <div> elements, then you are looking at things completely upside-down. You use the most appropriate element type for the information at hand, whether that's a table, a list, a paragraph, or whatever. You then arrange those elements with CSS. The particular element types you've used are not relevant to the layout. If you think <div> elements are in any way interesting for layout purposes, then you don't understand how the whole picture fits together.

      A div is just a non-semantic block (just like a span is a non-semantic inline bit, though of course either of those could be changed by CSS). A table is very specific. Semantically, only tabular data should go into a table, and thus tables are completely wrong for layout. Divs, on the other hand, do make sense. For example, you're building a page with two columns, perhaps for a nav sidebar and a main content area. You have two separate components to your page, but they don't have any semantic meaning other than being blocks to put stuff (that is, they're not tabular data, list data, paragraphs, headings, etc). In that case, a div (short for "division", as in "page division" or something logically separate from other bits on the page) is absolutely correct to use. So now you have two divs on your page, one for the sidebar and one for the content. Using CSS, you can make these look however you like. Put the sidebar on the left or right, it doesn't matter (can't do that with a table without editing content). Put the "sidebar" along the top or bottom of the content area (can't do that with a table without editing content, either). Obviously that's CSS's doing, but you need something to work with in order to style appropriately. Within the sidebar, you have semantic data, as nav data can be considered a list. Within the content division, you have semantic data consisting of paragraphs, headings, etc. If you modelled your page as a table with a single row, with the sidebar being one cell and the content being another cell, your page is not semantic. Modelling it with divs, it is.

      Divs can definitely be over-used. There are a lot of specific layouts that require wrappers and such, which usually means using divs. While you can avoid much of that, there's still some tag soup required if you want specific layouts with today's browsers, and you just have to deal with the fact that reality is intruding on your perfect little world. For my part, I would much rather have two divs wrapped in a third in order to do a two-column page layout than have a single table with columns as cells in the table.

    5. Re:HTML skills are a commodity? by LordLucless · · Score: 2

      Wake me up when the semantics of a tag changes the way it renders in the browser. Alternatively, give me a call when something other than a table-cell supports the vertical-height attribute, or there's an easy, cross-browser, standard-compliant way to make a div only use the minimum amount of vertical space required for it's content the way a table does by default.

      I would prefer to write semantic code, but there's just too many bizarre design decisions made in the development of CSS and the float model, and far too many browser incompatibilities.

      --
      Just because you're paranoid doesn't mean there isn't an invisible demon about to eat your face
    6. Re:HTML skills are a commodity? by Bogtha · · Score: 2, Insightful

      For an AJAX project, the ability to work with javascript disabled is a moot point--thus invalidating your event handler argument.

      Did you read past the first few words? I gave examples of opening links in a new tab or window. This is a problem for javascript: links regardless of whether Javascript is switched on or off.

      In any case, why is the ability to work with JavaScript disabled a moot point just because Ajax is used? Just because you use Ajax, it doesn't mean that you need to give up on situations where JavaScript is disabled.

      You seem to be completely unaware of the fact that clients pay for the way the page/app LOOKS

      We're talking about how well a developer understands HTML, your tangent about what clients pay for is irrelevant to that.

      --
      Bogtha Bogtha Bogtha
    7. Re:HTML skills are a commodity? by Osty · · Score: 2, Insightful

      Yes, and what was the motivation for using elements? If it was because you have two separate components without a more appropriate element type to describe them, then that's a structural issue, not a layout issue. If it was because you are building a page with two columns, then you are screwing up and don't understand HTML. Either way, saying that "divs are better for layout" is not a sensible thing to say.

      Now you're just being pedantic. Obviously it's the CSS that positions things in your layout, but when discussing table layouts versus CSS layouts, most people will call the latter "div layouts" just because it's easier to understand ("I laid out all of my stuff using table cells. What should I use if I can't use those?" "Divs styled by CSS"). If you're doing a layout that would traditionally require a table, you have several blocks of information that need to be positioned correctly. Those blocks usually don't have any semantic meaning other than "I'm a block", in which case divs are appropriate. I'm going to lay out my page using CSS regardless, so if not divs then what? Spans marked as display: block?

    8. Re:HTML skills are a commodity? by Bogtha · · Score: 2, Insightful

      Now you're just being pedantic.

      No, it's not pedantry. This isn't merely a case of wrong terminology, it's a sign that a developer is looking at something in a completely upside-down way.

      most people will call the latter "div layouts" just because it's easier to understand

      "Div layouts" is not easier to understand than "CSS layouts".

      "I laid out all of my stuff using table cells. What should I use if I can't use those?" "Divs styled by CSS"

      If you tell people to replace layout tables with divs, then you don't understand HTML. You replace layout tables with the most appropriate element type available.

      I'm going to lay out my page using CSS regardless, so if not divs then what?

      I'm not telling you not to use divs. I'm telling you that you are confusing content and presentation. What element types you use is not a layout issue.

      --
      Bogtha Bogtha Bogtha
    9. Re:HTML skills are a commodity? by hobo+sapiens · · Score: 4, Insightful

      Ah, the old divs vs tables flamewar.

      I used to be on the side of using semantically neutral elements like divs and css to specify layout.

      Most layouts work fine with semantically neutral elements (divs). Some don't. I have used tables for layout in one or two cases, but not before trying VERY hard to make a purely CSS driven solution. To approximate it using no tables, I'd have to put javascript in my CSS expressions to make IE simulate min-width and min-height, among other things. Since that's a clever but ultimately sucky solution, tables won out. We're talking very specific layouts here. Usually you shouldn't need tables.

      I said it in another nearby post, but I'll say it again here: being a professional is knowing the rules. Another part of being a professional is knowing when to break them. Yes, using tables for layout is a semantic faux-pas. But sometimes it makes the most sense.

      If you find yourself having to cobble together a collections of hacks to make a certain layout work without tables, then you either need to abandon the layout, or if you cannot, use tables. Semantically incorrect, but it's better than some of the hacks that you have to use to work around browser (IE) flakiness. I am not talking about wrapping floating divs in a container with negative margins. That's a pretty elegant solution. I am talking about several layers of nested divs with wacky CSS tricks and IE hacks on top of Javascript magic. That stuff is ridiculous. In short, use the best tool for the job and get over your prejudices about a certain design methodology being "bad".

      --
      blah blah blah
    10. Re:HTML skills are a commodity? by elbobo · · Score: 2, Insightful

      Sounds to me like you don't know as much as you think you do about CSS then. Getting CSS layouts right isn't just a matter of knowing the appropriate CSS properties - it also requires considerable experience. But once you've got that experience you can do everything with CSS that can be done with tables, and much more, and with relative ease. If you're giving up and going back to tables, then you've got more to learn and more experience to gather.

      Looking at your website I see you're using divs and spans in places where there are more appropriate semantic tags. It also looks as if you're using more nested block elements than should be necessary for that layout. I'd also suggest trying multiple CSS classes per element in some cases. An example (that will be entirely wrong because I haven't spent the time to learn how your layout is working): class="wrapper outer float-wrap center" instead of five separate divs with one class each. You're also often using classes that describe the CSS properties, rather than semantically describing the content. eg class="float-wrap" instead of class="newsitem" or some such.

      I'm not trying to be condescending. I really like your design. I'm just saying that if you're ending up with the answer being tables then you need to acquire more skills so that you can better answer the question.

  4. Let's see by smittyoneeach · · Score: 3, Insightful

    In the beginning, there was client server.
    Then, there was n-tier with the thin client.
    Now, the client seems past the bout of anorexia, we've gone back to client/server, and AJAX has fattened it right up.
    Next (mis)step? N-tier, repackaged as "federated", with an emphasis on thin, mobile clients. But you knew that. The real question is, what will AJAX for the hand-held be called? I say: BORAXO.
    I will confess some guilt that this has not been reduced to a Burma Shave troll, but I'm still slightly under the weather.

    --
    Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    1. Re:Let's see by morgan_greywolf · · Score: 2, Funny

      Next (mis)step? N-tier, repackaged as "federated", with an emphasis on thin, mobile clients. But you knew that. The real question is, what will AJAX for the hand-held be called? I say: BORAXO. How about JAXOFF?

  5. Re:Ajax will be obsolete before it becomes mainstr by e4g4 · · Score: 4, Informative

    Ajax *is* mainstream - Google, Yahoo, Microsoft, Apple - all using ajax in one form or another in their web applications. Now - as to your other claim, that Ajax doesn't stand up to Silverlight or Flash; I say Flash!?! Have you every built an application in flash? It's a nightmare to maintain. I can't speak to Silverlight, as I've not yet played around with it. But the design theory of ajax combined with a good JS api (like prototype) Makes it a much more maintainable and IMHO a nice way to build interactive web apps.

    --
    The secret to creativity is knowing how to hide your sources. - Albert Einstein
  6. marchitecture alert by anomalous+cohort · · Score: 4, Insightful

    I claim first serious post.

    Most of these questions appear to me to be either leading questions, whose intent is to foment desire in the questioners product(s) and/or service(s), or marketing questions.

    Some of the questions are legit, however. For example, those questions concerning security, performance, unit testing, and analytics.

    With regards to the question about which framework to choose, I have posted my favorites here.

  7. the suck/non-suck divide by abes · · Score: 4, Informative

    I think a large part of the people's opinion on AJAX depends on what they're doing. It's difficulty depends in part on the framework/libraries you use. For example, script.aculo.us and RoR hide many of the details for you. On the other hand, if you do outside of what they do well, the difficulty level quickly rises.

    I think one sign of this difficulty is that just about all AJAX libraries do the exact same thing. The same basic special effects, field additions, etc. The fact that none of the libraries go beyond these, points to what's hard to do.

    Javascript isn't a great language. It's not robust, and it's difficult to really do good architecture with libraries using it. HTML is a pretty decent method to mark up text, but wasn't meant originally to ever be interactive.

    Tying together a hacked together language with HTML doesn't make for the greatest programming experience. Especially compared to any real GUI framework.

    Maybe most people don't want/need a real GUI framework, and AJAX covers all the bases for them -- in which you're probably going to say you like AJAX.

    However, I suspect if AJAX and HTML were really so great/powerful/easy, many people would have stopped using flash already. I have no love for flash, but it can do things much more easily/faster than AJAX can for many tasks (disliking both technologies I'm pretty non-biased here).

    What I would love to see is a standard *real* GUI for the web that is non-language dependent (i.e. whatever scripting language you prefer you can use). I'd even use something like Jython with newer/better GUI libraries. But we really need something written from the ground up with GUI in mind.

    1. Re:the suck/non-suck divide by Osty · · Score: 5, Interesting

      Javascript isn't a great language. It's not robust, and it's difficult to really do good architecture with libraries using it. HTML is a pretty decent method to mark up text, but wasn't meant originally to ever be interactive.

      Once you understand it, Javascript is an awesome language. It's C/C++/Java-like syntax hides its fundamentally functional underpinnings. The core datastructure in Javascript is a method. Everything can be represented in terms of methods, even to the point of not using any variables. With that in mind, it's a very powerful language that is often maligned precisely because of what it is -- many people just don't "get" functional languages (why C/C++/Java/etc are so popular and Lisp/ML/Haskell/etc are not), though you can certainly write procedural or even OO code in Javascript. It's also very easy to shoot yourself in the foot with Javascript, depending on implementations (using anonymous methods is a good way to leak memory in IE if you're not careful, for example).

      As a scripting language, Javascript has a lot too offer. Too bad it's been forever tied to HTML and web stuff.

      However, I suspect if AJAX and HTML were really so great/powerful/easy, many people would have stopped using flash already. I have no love for flash, but it can do things much more easily/faster than AJAX can for many tasks (disliking both technologies I'm pretty non-biased here).

      People like Flash because it gives you lots of pretty, shiney bits for very little work. It's also vector-based, so you can build a pixel-perfect layout like so many bad web designers want ("Our web site must look exactly like our magazine"). Too many people associate "AJAX" with flashy Web 2.0-y visual effects (fading highlights, rounded corners, wet reflections, large fonts, etc), when AJAX is really about communication. If all you care about is glitz, go ahead and use Flash. If you want to build something that actually works well, I'd go with javascript+HTML.

      However, I suspect if AJAX and HTML were really so great/powerful/easy, many people would have stopped using flash already. I have no love for flash, but it can do things much more easily/faster than AJAX can for many tasks (disliking both technologies I'm pretty non-biased here).

      You may not want to hear it, but Microsoft has much of that with ASP.Net AJAX, as have others like Script#. In each case, you're writing most (or all, in the case of Script#) of your code in a .NET langauge and the compiler handles generating the javascript appropriate for your target browser(s). These work with at least Firefox and IE, and should also work with Safari, Opera, and others with minor tweaking.

  8. when will AJAX skills become commoditized? by Ralph+Spoilsport · · Score: 5, Insightful
    'On what timeline will AJAX skills become commoditized like HTML skills became?'"

    Easy: when a WYSIWYG editor, a la Dreamweaver, can accomplish all basic AJAX functionality without having to mess with much, if any, code.

    Yeah - sure - Dreamweaver is suboptimal, but for 95% of what you need in a site (and if your site is fairly simple, 100%) it does the job, just fine, and you don't need to mess with that messy HTML and javascripty goopety glop. you just treat it like InDesign or Quark, and design your page - no muss, no fuss, nothing too fancy.

    When Dreamweaver (or some similar app yet-to-be-developed) can do Exactly That - let me do AJAX without touching code, then you know AJAX coding skills will commoditise and disappear. How many hear can read PostScript, raise your hands! Not too many. I figured as much... FreeHand, Fontographer, and Illustrator removed the need to know how to program a page description in PostScript. Dreamweaver ate HTML and trivial Javascript. AJAX is next... I'd say, give it 2 years. Tops. I'm sure the programmers at Adobe are hard at work mulling over how to do just that.

    RS

    --
    Shoes for Industry. Shoes for the Dead.
  9. Re:When did AJAX stop sucking? by secPM_MS · · Score: 2, Insightful
    The rich web is all well and good for those with nice screens and good vision. It does not do so well for those with highly constrained devices and/or bad vision. I would love it if companies pushing commerce web sites started having acessibility requirements.

    If a user has bad vision, they can feed text into a text to speech converter. GUI into a speech converter doesn't work so well. There are an increasing number of older folks using the web, and expecting a large screen real state is not appropriate - they may have large screens, but they may have increased the font size for readability.

    As for me, I am paranoid. I don't believe in running script unless I have a good reason to trust the site in question. Thus by default, I have Java, Javascript, Flash, ActiveX, et al off. Thus, no rich web for me. Too bad.

  10. how far HAVE we come? by vsync64 · · Score: 5, Insightful

    It does suck.

    As for the "refreshing[] hard-headed" questions, all I see are questions about performance and silly flitting about with their own buzzwords and pipe dreams about getting rid of real applications in favor of their toys.

    Here are some questions:

    • Whatever happened to degrading gracefully? If you look at the apps produced by Google, the poster child for "AJAX", you'll see that they took the time to make most or all of the functionality work without JavaScript, without images, without CSS, or with a deranged hodgepodge of those. I don't see others making the same efforts.
    • How about semantics, and security? We're getting back into the mess of data intermingled with code. I'm seeing more and more sites out there have a blank page that loads, and then JavaScript that loads the content. Now you have to have scripting enabled for every site you visit. MS Office macros all over again. And forget trying to spider the content without having some sort of bizarre Turing machine debugger to try to get at the real content.
    • Yeah, how about mobile devices? If you were doing it right (see above) you wouldn't have to worry about the iPhone or about a special mobile AJAX. It would work fine within the constraints of any device. Google does.
    • How do you plan to interact with the local filesystem? Java has an effective sandbox, signed codebases, and granular user permissions (although the latter are kind of sucky). Are users not allowed to retain control over their own data?
    • How are users supposed to have any confidence about what you're doing to them? The previous model was good. Users knew when they were sending anything to the server, and if the UA vendors would do their jobs they would also know when they were affecting data. What are users supposed to do now, have wireshark running all the time? Not acceptable.

    I'm implementing Web-based applications as of this writing, and I plan to have some dynamic features to simplify some of the UI (such as cascading follow-up questions during user signup). But these will be an optional extra.

    These jokers forget that the World Wide Web is a repository for mutual citation of academic-style documents. New stuff is good, just don't break the old stuff.

    Every improvement on the Internet has been in the direction of better user controls, decentralization, caching, peer-to-peer, transport tunnels, etc. The AJAX people are swimming against the tide and they need to realize it and shape up.

    --
    TO BUY A NEW CAR WOULD MAKE YOU SEXUALLY ATTRACTIVE.
  11. silverlight by wwmedia · · Score: 5, Interesting

    i know alot of people here hate microsoft (duh!)

    but i believe silverlight will be a large part of the rich web

    now this is my personal opinion and heres why:
    *it was designed with web applications in mind (XAML) unlike the current html/css/javascript mess
    *its more or less crossplatform
    *it brings C# to the clients browser (see javascript mess above)
    *has vector and hd video supprt of the box
    *is designed to be easily updated

    1. Re:silverlight by moreati · · Score: 2, Informative

      You are wrong, the web is a sloppy combination of repurposed standards and half-implementations that has evolved. It isn't clean, it isn't pretty but it works for the widest range of people: those with a web browser.

      Silverlight is like flash, only worse:
      * It ignores all the work on document layout and styling, instead it chooses to reinvent the wheel. XAML is untested beyond a few Windows developers and power users on Windows with a PC. HTML has been deployed, tested & debugged on about every platform in existence.
      * It is in no way cross platform. The DLR class libraries are not an open specification beyond 'do what MS does', whomever independently implements it will be forever playing catchup. Needless to say MS will not be releasing the a DLR runtime for Solaris on SPARC anytime soon.
      * It brings C# to the browser. It is my opinion that this move to a less expressive, more heavyweight language would be a step backward. In my opinion it would be better to fix Javascript, than to rip and replace with another language.
      * Granted, the web does not have universal vector and HD video native to the browser. Neither would DLR/Silverlight, only Microsoft's implementation could be relied on to have full support of any given video format, due to restrictive licensing of US software patents. SVG support is improving in all browsers except Internet Explorer.
      * Ease of update of a runtime is an implementation issue. It has nothing to do with how widely deployed implementations of a revised standard would be.

      Silverlight is not the web and it is not an improvement in my opinion.

  12. Do you also welcome AJAX hosts holding your data? by compumike · · Score: 3, Insightful

    Lots of people seem to welcome AJAX, and it does provide a huge step in the interactivity of web interfaces without sacrificing platform compatibility or development time.

    However, one thing that continues to surprise me is how willing most people are to having a third party store all of their data. All AJAX apps essentially require that you do not hold your own data -- it's held by the application provider. A big reason is because Javascript can't touch your local filesystem, but another is that Javascript isn't powerful enough to really be useful for all of the processing, so back to the server-side scripting it goes.

    In fact, one of the things that scared me today was how excited a friend was to discover that Google's chat application logged all of their Jabber conversations -- even if they had been made with a 3rd party GUI client (Pidgin). This, to me, would just be scary.

    --
    Educational microcontroller kits for the digital generation.

  13. Re:Do you also welcome AJAX hosts holding your dat by AKAImBatman · · Score: 3, Informative

    However, one thing that continues to surprise me is how willing most people are to having a third party store all of their data. All AJAX apps essentially require that you do not hold your own data -- it's held by the application provider.

    How does that differ from regular web applications holding your data? There's been well over a decade of time for users to become comfortable or uncomfortable with the idea of entrusting a third party with their data. So far, users have been leaning toward "comfortable".
  14. Re:AJAX vs. Flash is the real question by LWATCDR · · Score: 2, Insightful

    Why?
    Yes people that use flash for layout and menus are just as stupid as people that used Java buttons.
    But Google doesn't need to read applications.

    --
    See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
  15. Re:Ajax will be obsolete before it becomes mainstr by asaivan · · Score: 2, Interesting

    I've made dozens of web video streaming applications and interactive web pages and right now am working on a multi-user video conferencing app. I maintain them myself, which I know is always easier than maintaining someone else's, however, I always try to write code (any code-HTML/CSS, Actionscript, PHP) very cleanly and clearly. Anyhow, I know Flash isn't the answer to the world's problems, but I do appreciate the advances in Actionscript 3 they've made, by turning it into a full-on OO language which resembles Java in many ways. In fact, I like the clean structure of AS3 so much that I wont program in AS2 or (defintely not) AS1 anymore. Peace.

  16. Re:Do you also welcome AJAX hosts holding your dat by Bogtha · · Score: 2, Interesting

    All AJAX apps essentially require that you do not hold your own data -- it's held by the application provider.

    You're referring to software as a service, not Ajax. An application ran as a service by an outside vendor can hold your data hostage, whether or not it uses Ajax, and an application running within your organisation doesn't, whether or not it uses Ajax. The key is who runs the application, not whether it uses Ajax.

    --
    Bogtha Bogtha Bogtha
  17. Re:When did AJAX stop sucking? by hobo+sapiens · · Score: 3, Insightful

    Well too bad for you.

    Developing for the web is about knowing your audience. If I were designing a site like ebay or amazon, in other words, trying to have the widest possible user base, or if I were working for some entity that had to abide by ADA requirements, then maybe avoiding AJAX would be advisable. For a site that is not a necessity, like, for example, youtube, slashdot, digg, flickr, etc AJAX is great. When done properly, AJAX makes more efficient applications that enhance the user experience.

    Also, if you really want to, you can develop sites that use AJAX but also degrade nicely. Everyone here (at least, anyone who calls himself a serious web developer) is using web standards and writing good semantic markup, right? Well, that will make your site at least accessible. If you just use the noscript tag to handle non javascript user agents (where necessary, obviously not where there isn't ROI anyway) then your site should work pretty well.

    As someone else who replied to you mentioned, we cannot develop web sites around people who for some crazy reason refuse to use new technologies (if you call javascript new, as if!). That, along with MSIE, are holding the web back.

    I think people who hate AJAX just hate it because of all the bad AJAX sites. But that's like hating the web because there are bad non-ajax sites. AJAX, like other technologies, makes things better when used properly.

    --
    blah blah blah
  18. AJAX directions by Stan+Vassilev · · Score: 3, Interesting

    I see few recurring themes in the questions asked, so I'll try to cover them briefly:

    Q1: How do you deploy an AJAX application offline?
    A1: You can use integrated HTML/CSS/JS/Flash/PDF runtime, like Adobe AIR.

    Q2: How do I deliver bulky complex AJAX applications over the net, if it's a lot of code?
    A2: You don't. It's not a suitable deployment model, at least until we have a simple delivery vehicle for bundling multiple app elements into a single file, such as a browser downloading and directly reading a ZIP file with collection of resources/JS files (as with Java's JAR). Until then, and for complex UI-s in general, look into established compiled solutions like Flash.

    Q3: Do we need JS2.0?
    A3: No, we don't (right now), since JS2 delivers benefits for larger projects only (refer to Q2 why large online JS projects are not viable). If this is resolved, then JS2 will be highly desirable.

    Q4: Hand-made AJAX or AJAX framework?
    Q4: Framework. Cuts development time, provides consistent code, avoid wheel reinvention (Exception: very large projects may need custom code. Are you Google? Yahoo? If not, use a framework).

    Q5: Is AJAX wide-spread / easy / hard / common?
    Q5: It's easy, wide-spread, and accepted. Fallback is usually present, unless the AJAX is a component of a complex online app that can't have no-JS fallback (example: rich text editor).

    Q6: Do I pick AJAX or Web 1.0 / iPhone SDK ?
    A6: Apply common sense. In general, when a new technology comes around, people abuse it and try to shoehorn it into replacing everything before it. Then comes the backlash ("AJAX sucks"). Only then, people settle to use said tech in moderation, co-existing versus replacing, evolution versus revolution, and solving unique problems not solved before.

  19. Re:Do you also welcome AJAX hosts holding your dat by rmerry72 · · Score: 2, Insightful

    There's been well over a decade of time for users to become comfortable or uncomfortable with the idea of entrusting a third party with their data. So far, users have been leaning toward "comfortable".

    I'd say users have been leading towards "don't care". Of course the solution is to host your own web/app server. Then your client talks to your server and stores your data.

    Javascript and HTML are for content and presentation, not processing data. That's because browsers are optomised as display platforms, because they are built to display documents. Javascript is not a programming language its a script language to allow designers to customise your display, just like CSS.

    Want a customisable, interactive, client-server GUI. Code one in a real language. Use C, C++, C# or even Java, then throw an XML over HTTP client comms library in. Easy. Well easy for programmers with a little training. Not easy for script monkeys who can't code. AJAX is just a bastardisation of what was easiest for most people to build with.

    AJAX is to the Web what Lego is to the building industry. Useful in its place.

    --
    We do not inherit the Earth from our parents. We borrow it from our children.
  20. Re:Do you also welcome AJAX hosts holding your dat by AKAImBatman · · Score: 2, Insightful

    No offense is intended, sir, but your comment reeks of inexperience. Javascript is far more capable than you give it credit for. And I say that as someone who's coded a variety of applications (including client/server) for well over a decade, in a variety of different languages. The number one problem I've found in Javascript critics? They have no idea how to actually code in the language. They don't understand that it's object oriented, they haven't given more than a cursory glance to the W3C specs, and they are blissfully unaware of where the WHATWG is taking HTML applications.

    Want a customisable, interactive, client-server GUI. Code one in a real language. Like Javascript. If you know what you're doing, you'll actually find it a LOT easier than writing a comparable C, C++, C#, or Java GUI.

    Oh, and Javascript was NOT designed as a "display customization language". It was originally designed to script (drumroll please...) Java. As in Java, Java. Not Java Applets (though that was included in the spec), but straight-up, plain-Jane, gosh-darn-that-looks-like-semantically-funny-Java Java. Mozilla still supports the full Livescript API in case you want to play around at some point.

  21. AJAX still sucks by Animats · · Score: 2, Insightful
    Reasons AJAX still sucks:
    • The concurrency model is lame and buggy. Open Google Maps in Firefox 2. Roll the mouse wheel rapidly to zoom in and out. Watch the maps break up as the browser gets out of sync with the server and doesn't properly repair the window damage. It's like a window system from 1990 or so.
    • Firewalls and AJAX still don't play well together. Rewriting JavaScript source in the firewall is not the answer.
    • The conflicts between cross-site scripting, mashups, and security illustrate that Javascript's security model is inadequate.
    • The JSON concept opens security holes. JavaScript has the wrong primitives. In LISP, there's the reader, which takes in a string and turns it into an S-expression, and there's "eval", which executes an S-expression. In JavaScript, there's only "eval", which takes a string and runs it. Oops. Not the right tool for marshalling.
    JavaScript itself isn't that bad a language, though. It's the integration with browsers that's not good enough.
  22. Re:Do you also welcome AJAX hosts holding your dat by Xabraxas · · Score: 2, Informative

    Oh, and Javascript was NOT designed as a "display customization language". It was originally designed to script (drumroll please...) Java. As in Java, Java. Not Java Applets (though that was included in the spec), but straight-up, plain-Jane, gosh-darn-that-looks-like-semantically-funny-Java Java. Mozilla still supports the full Livescript API in case you want to play around at some point.

    Not exactly true. Javascript was not invented to be a scripting environment for Java. It wasn't named Javascript initially and the syntax is similar to C just as Java syntax is similar to C. In fact the name Javascript was more of a marketing ploy than anything else. Javascript was developed by a Netscape engineer and indeed seems to be invented for the purpose of web-based scripting, not Java scripting.

    --
    Time makes more converts than reason
  23. Re:Do you also welcome AJAX hosts holding your dat by rmerry72 · · Score: 2, Insightful

    Oh, and Javascript was NOT designed as a "display customization language". It was originally designed to script (drumroll please...) Java.

    Please check thy facts, kind sir. Javascript was conceived of as a Java-like script language. A poor man's Java for those that found object oriented concepts a little too brain intensive. Thrown in the first netscape browser to allow a little customisation of the DOM on the fly, for things that then then HTML 3 couldn't do properly.

    Javascript is not an object oriented language. It is at best what can be called object-based, but then anything that uses "objects" can make that claim. There is no polymorphesm or inheritance, strong type checking, nor even much encapsulation. Its all function based monolithic code. And even if javascript, per se, is capable of the above, examples of such are very, very rare indeed.

    As for the W3C specs, they aren't worth that much as most of the javascript interpretors - aka browsers - haven't given much more of a cursory glance at them either. No point writing code to spec if the interpretor won't run the code in the same way. At least Sun managed to force JVMs to be written to a more standard standard.

    My brother builds model planes in his spare time. According to your Javascript defence guess he can call himself an "Aircraft Engineer" now. Everytime I see recruitment ads for "HTML / Javascript Programmer" I kack myself. Well, at least it leaves the real programming jobs for those of us that can.

    --
    We do not inherit the Earth from our parents. We borrow it from our children.
  24. Re:Do you also welcome AJAX hosts holding your dat by AKAImBatman · · Score: 4, Informative

    Please check thy facts, kind sir. Javascript was conceived of as a Java-like script language. A poor man's Java for those that found object oriented concepts a little too brain intensive. Thrown in the first netscape browser to allow a little customisation of the DOM on the fly, for things that then then HTML 3 couldn't do properly.

    You may be surprised to know that I am well in possession of the facts. I used to believe that Javascript (formerly Livescript, formerly Mocha) got its name in simply a cross-branding deal. In fact, it was far more complex than that. Javascript was created to script Java as well as the DOM. The original concept would have blown today's AJAX out of the water in usability. Alas, it was not to be.

    Here's more history for you: http://safari.oreilly.com/0768666775/ch01lev1sec1

    Also, here's a bit of Javascript for you, demonstrating how powerful it was intended to be:

    <script>
    var myobj = Packages.javax.swing.JOptionPane;
    var Frame = java.awt.Frame;

    var frame = new Frame();

    frame.show();

    myobj.showConfirmDialog(frame, "Hello from Java! See Ma? No applet!");

    frame.hide();
    </script>

    (That will work in FireFox with a recent Java plugin. I guarantee that it will not work on Internet Explorer.)

    You have to remember, Java already existed in the browser when Javascript was created. Netscape internally discussed just using Java itself for scripting, but decided that a new, more dynamic scripting language would be more useful. (Source) Thus the birth of Javascript. Eich described the first revision as "having gotten out of the lab a bit earlier than intended". Javascript 1.1 was much closer to his vision, and what we think of today when we talk about Javascript.

    You also need to understand that the Javascript language went beyond just the browser. Much of its development was driven by its use as a server-side CGI language. So it became a "real" language very quickly, despite its slow start.

    And if you think that's cool, remind me sometime to tell you about how multipart/x-mixed-replace could have been server-side push long before AJAX, Comet, or <event-source> ever existed. ;)

    Javascript is not an object oriented language.

    Incorrect. Prototype-based languages are very much OO languages. They're different from class-based, languages, but that doesn't make them any less powerful.

    There is no polymorphesm

    I think you misunderstand the very meaning of polymorphism if you believe that.

    Here's the "Runnable" interface implemented in Javascript:

    var MyObject1() {}
    MyObject1.prototype.run = function() { alert("Running 1!"); }

    var MyObject2() {}
    MyObject2.prototype.run = function() { alert("Running 2!"); }

    var objarray = [new MyObject1(), new MyObject2()];

    for(var i=0; i<objarray.length; i++) objarray.run();

    The polymorphism appears to work fine?

    or inheritance

    Funny, Netscape's Client Guide has an entire chapter on that.

    strong type checking

    Strong typing is not a OOP requirement. It is a feature of some languages. Nothing more, nothing less. In any case, Javascript actually has quite a few typing fe

  25. Re:Do you also welcome AJAX hosts holding your dat by AKAImBatman · · Score: 2, Interesting

    There's a lot of confusion over the origins of Javascript, but it basically went like this:

    Self Java -> Mocha -> Livescript -> Javascript

    Brendan Eich practically never talks about the Self Java/Mocha days of Javascript. Not all that many people even remember the working title "Mocha". (Implying its early relationship to Java.) Scripting of Java was the goal in those revisions. Javascript 1.0 was kicked out the door incomplete, but 1.1 addressed the initial issues. The JavaClass and Package objects were added, and it became possible to run Java code without an Applet. It was pretty darn nifty, and still can be if you have Firefox with a Java plugin. (See my response lower in the thread for more info.)

    The branding concept was stupid, but there was solid reasoning behind it. And it was more than just because Netscape and Sun were partners.

  26. Re:Do you also welcome AJAX hosts holding your dat by AKAImBatman · · Score: 4, Insightful

    Microsoft implemented Javascript with full DOM access at the time Netscape Navigator had rather limited and tedious Javascript support.

    Correct. And what happened to Netscape's market share?

    Now a bunch of folks came together and declared that Microsoft got it all wrong and has to re-implement its browser with 80% market share to conform to minority's opinion of how a web browser should behave.

    I hardly think that a "minority" of the development community are the ones mad at Microsoft. Anyone who has used IE to any appreciable degree is mad at them. When 5.0 came out back in '99, it was incredible. The best browser, bar none. Microsoft released a fairly insignificant update called 6.0 in '01 and that was where the browser sat. For about 5 years. Then when everyone had almost given up hope that Microsoft would keep developing their browser, they announced 7.0. They also announced how they were going to meet W3C standards and make developer's lives better. 7.0 came out, and it turns out that Microsoft couldn't even be bothered to add support for simple things like DOM2 Events or SVG. (Things which they effectively already had support for, just in a proprietary-yet-not-quite-dislike manner.) In reality, they stamped out a few CSS bugs, screwed up the IE interface, then developed a new certificate scheme that was practically the same as the old one but made more money for all involved.

    I say punish Microsoft for illegal use of its monopoly power, but otherwise let critics develop their own software and let the best program win.

    The funny thing is, the only reason why IE hasn't died out is aforementioned monopoly power. I have met very few users who prefer IE over Firefox or Safari. However, I have met managers who force the use of IE (thus leaving themselves vulnerable to IE's massive security holes) for the purpose of 100% Microsoft "corporate standards". As a result, IE has lost market share in the home computer segment, but is not taking any losses in the B2B arena. And it's NOT because it's a good product.