{"id":4464,"date":"2015-08-01T07:54:40","date_gmt":"2015-08-01T07:54:40","guid":{"rendered":"http:\/\/a1webdesignteam.com\/blog\/?p=4464"},"modified":"2015-08-01T07:54:40","modified_gmt":"2015-08-01T07:54:40","slug":"ajax-programming-with-java","status":"publish","type":"post","link":"https:\/\/a1webdesignteam.com\/blog\/ajax-programming-with-java\/","title":{"rendered":"AJAX Programming with Java"},"content":{"rendered":"<p>Prior to JavaScript and other client-side languages, Web browsers<br \/>\noperated as if they were HTML dumb terminals, merely presenting Web<br \/>\npages generated on a server. For such pages, every user action requires<br \/>\na full page refresh, with a round-trip over the Internet, which<br \/>\ndegrades performance and thus user satisfaction. It may be fine for a<br \/>\ngreat many Web sites, but it is completely inadequate for<br \/>\nhigh-performance dynamic Web applications. Even e-commerce sites using<br \/>\nwholesale page refreshes every time, find that users can encounter all<br \/>\nkinds of problems. For instance, e-commerce sites often exhort<br \/>\ncustomers to not use their browser\u2019s Back button while shopping online,<br \/>\nand to not click the Submit button twice should the purchase page fail<br \/>\nto respond. But what if the network hangs and customer does not know if<br \/>\nthe purchase went through?<\/p>\n<p>Traditional use of JavaScript made it possible to embed<br \/>\nfunctionality on the client-side, with far superior speed, by<br \/>\neliminating network traffic. It was \u2014 and continues to be \u2014 ideal for<br \/>\nsuch needs as user form validation. But such JavaScript code does not<br \/>\ncommunicate with the server, and thus has no way of accessing<br \/>\napplication data from a database, or even maintaining state in between<br \/>\npage refreshes.<\/p>\n<h2>AJAX Overview<\/h2>\n<p>AJAX (Asynchronous JavaScript and XML) evolved in an effort to solve<br \/>\nthe aforesaid problems, by allowing the browser to communicate with the<br \/>\nserver, behind the scenes, without having to refresh the entire page.<br \/>\nIt accomplishes this by using JavaScript to only change that portion of<br \/>\nthe current Web page that needs to be changed. AJAX can make the user\u2019s<br \/>\nbrowser behave more like a desktop application, combining server<br \/>\ninteraction with far greater performance than traditional server-side<br \/>\nlanguages. AJAX is asynchronous in the sense that the needed data is<br \/>\nobtained from the server and loaded without interfering with the<br \/>\ndisplay and behavior of the current Web page. The data is requested<br \/>\nthrough use of the XMLHttpRequest object, and typically formatted in<br \/>\nXML \u2014 hence the rest of the acronym.<\/p>\n<p>But raw AJAX programming can be quite difficult, partly because AJAX<br \/>\ncode is typically quite daunting, and partly because Web browsers have<br \/>\nimplemented JavaScript differently, despite a convergence upon<br \/>\nECMAScript standards, promulgated by the European Computer<br \/>\nManufacturers Association (ECMA). As a result, AJAX programmers can<br \/>\nspend much of their development time dealing with incompatibilities<br \/>\namong browsers and operating systems.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prior to JavaScript and other client-side languages, Web browsers operated as if they were HTML dumb terminals, merely presenting Web pages generated on a server. For such pages, every user action requires a full page refresh, with a round-trip over the Internet, which degrades performance and thus user satisfaction. It may be fine for a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4466,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0},"categories":[1],"tags":[51],"_links":{"self":[{"href":"https:\/\/a1webdesignteam.com\/blog\/wp-json\/wp\/v2\/posts\/4464"}],"collection":[{"href":"https:\/\/a1webdesignteam.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/a1webdesignteam.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/a1webdesignteam.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/a1webdesignteam.com\/blog\/wp-json\/wp\/v2\/comments?post=4464"}],"version-history":[{"count":0,"href":"https:\/\/a1webdesignteam.com\/blog\/wp-json\/wp\/v2\/posts\/4464\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/a1webdesignteam.com\/blog\/wp-json\/wp\/v2\/media\/4466"}],"wp:attachment":[{"href":"https:\/\/a1webdesignteam.com\/blog\/wp-json\/wp\/v2\/media?parent=4464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/a1webdesignteam.com\/blog\/wp-json\/wp\/v2\/categories?post=4464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/a1webdesignteam.com\/blog\/wp-json\/wp\/v2\/tags?post=4464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}