1. Zakaj sem obupal nad AJAXom?

    subjektivni pogled

    Marko Mrdjenovič Vodja produkcije Parsek interactive
  2. Licenca

    (cc) Creative Commons BY
  3. Kaj je AJAX?

    AJAX
  4. Resno, kaj je AJAX?

  5. Zgodovina

  6. Prazgodovina torej?

  7. Citati o AJAXu

    Now I could jump in here and point out that "Ajax" is a catch-all term for a collection of vague concepts, and we just killed the term DHTML for the same reason, but at least this one doesn't include "HTML" in its name, and besides, nobody likes to pronounce 'XMLHttpRequest'.

    Michael Moncur
  8. Citati o AJAXu

    [Ajax] straddles the worlds of client-side and server-side scripting [...] To use this technology correctly, developers need to understand both worlds. The concept of progressive enhancement is probably a new one to server-side programmers while the idea of data abstraction may be new to client-side developers.

    Jeremy Keith
  9. Citati o AJAXu

    By defining an architectural style as its building materials and not with its underlying philosophy, it will quickly become obsolete. In fact, it's already obsolete: Google Suggest doesn't use XML for data interchange; just JavaScript arrays. Gmail also doesn't use XML and it doesn't use standards-based markup for presentation. Are they no longer Ajax applications? Of course they are.

    Steve Jenson
  10. Citati o AJAXu

    Although it has been around for a while, in terms of its usage JavaScript data retrieval is still a very immature technology. The uses which I have seen are either for manipulation of form data (Google Suggest), or complete web applications (Google Maps, GMail, map.search.ch). The reason that there is no inbetween is because, as with all JavaScript solutions, JavaScript data retrieval has an Achilles heel: you can never rely on a client to have it or allow it.

    Cameron Adams
  11. Citati o AJAXu

    However, let's proceed with caution. What we're talking about is technology, not the user experience. Ajax-based apps certainly have the potential to produce a better user experience, but good experiences never come by default. Good experiences aren't plugged in. Good experiences are crafted by thinking about people, not technology.

    Jason Fried
  12. Če ponovim...

  13. 1. Filozofija - Asinhronost

  14. Zakaj je pa to tok kul?

  15. A je to sploh res problem?

  16. Čakanje

  17. Pozornost

  18. Kdaj se pa zgodi...

  19. Zgodi se ZELO redko

  20. 2. Transport - XMLHttpRequest

  21. XMLHttpRequest [XHR]

  22. XHR koda

    function XHR(){var xmlhttp=false;
    /*@cc_on @*//*@if (@_jscript_version >= 5)
    try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}
    catch(e){
    try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
    catch(E){xmlhttp=false;}}
    @else
    xmlhttp=false;
    @end @*/if (!xmlhttp && typeof XMLHttpRequest!='undefined'){
    try{xmlhttp=new XMLHttpRequest();}catch(e){xmlhttp=false}
    }return xmlhttp;}
    				
  23. XHR koda

    function getData() {
    	var _xhr = XHR();
    	_xhr.open("GET", "/hello-world.txt", true);
    	_xhr.onreadystatechange = function() {
    		if (_xhr.status==200) { // http status OK
    			if (_xhr.readyState==4) { // parsed
    				alert(_xhr.responseText);
    			}
    		} else {
    			alert("Errrr."+_xhr.status);
    		}
    	}
    	_xhr.send(null);
    }
    
    				
  24. XHR problemi

  25. Remote Script Tag [RST]

  26. RST koda

    function RST(src) {
    	var st = document.createElement("script");
    	st.type = "text/javascript";
    	st.src = src;
    	var h = document.getElementsByTagName('head');
    	if (h && h.length>0) h[0].appendChild(st);
    }
    				
  27. RST problemi

  28. IFRAME

  29. IFRAME problemi

  30. IMG+Cookie

  31. 3. Tovor - XML

  32. XML

  33. HTML

  34. JSON

  35. Plain text

  36. Ampak AJAX...

  37. ...ker ne govorimo o

  38. Do sedaj videno - bonbončki

  39. Egotrip

  40. Kaj hočem povedat...

  41. Za konec...

    ... JavaScript is brilliant for presenting content in web applications, but inadvisable for presenting content on web pages. It'll still let you do cool things – really useful things – but it shouldn't change the way that websites are built or used, because 99% of the Internet is not an application.

    Cameron Adams
  42. Uporabljeno

  43. Hvala!

  44. Naslednjič