Ajax

Should I Be Developing Ajax Applications using Google Web Toolkit(GWT)?

0

So why should an Ajax developer be interested in the recently released Google Web Toolkit(GWT)? One possible reason could be to overcome the shortcomings of the typical Ajax web development model as noted in my earlier post. Firstly, a framework always provides a head start to a project, allowing the developers to worry only about writing the application logic; user interface elements, the plumbing work needed for the communication between the client and the server are provided by the framework itself. The more specific benefits of using the Google Web Toolkit are:

The developer is relieved from the thankless job of understanding every single way in which the browsers differ from one another in handling the same web page, allowing them to create websites such that all these web browsers handle a page in (roughly) the same way. GWT allows the developers to interact with the browser’s history stack which means that the Ajax applications created using GWT can allow the users to use the ‘Back’ and ‘Forward’ buttons of the web browser and to bookmark the various pages of the website.

Refer to points 2 & 3 in my earlier post.

Developers can use a more modular and statically typed programming language in Java to create the interface and other components instead of hacking their way out with Javascript. Ultimately, its still the JavaScript code that is generated and served to the web browser, but GWT provides an abstraction layer that shields the developers from having to do much with the JavaScript language. The flip side of this is that for pure interface code, Javascript might offer a more natural solution than Java language when it comes to creating web pages; see the discussion below.

Refer to point 1 in my earlier post.

Being able to use Java to create Ajax applications also means better integration with the rest of the Java web development technologies like JSP, JSF, etc(note that code written using GWT uses the Java Web UI class library which is not related to any of the Java standard libraries and this code is statically translated to Javascript and HTML code before making available to the server. Integration would be limited to sharing something like a Java component between a JSP page and the code written using GWT). This may not appeal to those who are using other server-side technologies like PHP and ASP.NET.

Java language also boasts of better programmer IDEs and tools with good support for Unit Testing and Refactoring. In fact, GWT itself has good JUnit integration through easy to use class libraries in the package com.google.gwt.junit.

Javascript code can still be embedded within the Java code if only the services of the Javascript language are going to solve a particular problem, by using the Javascript Native Interface(JSNI)(on the lines of JNI). See this for more information.

The biggest advantage of using GWT for creating Ajax applications is the relative ease with which the data can be communicated between the server and the client by just creating serializable Java objects. Good support for debugging. Eclipse IDE and GWT host mode form a good combination for convenient debugging of the GWT applications.

Having said all this, I am not a big fan of static translation of one programming language to the other. If it were as unified as in ASP.NET(see ASP.NET WebParts; all the translation happens at run-time), I would have welcomed it whole-heartedly. But different programming languages are created to solve different problems, and they are optimized to that specific job. I hate Javascript language for many reasons(as I do in case of Java) but still believe that Javascript is better oriented towards creating client-side code for the web browsers than Java language is(when the intention is to create a web interface). Are we going to use Java idioms here or are we going to try to imitate the Javascript idioms in the Java code? How many Java libraries are supported by the GWT SDK tools? What about the unsupported libraries whose functionality is needed for the application?

Secondly, the entire translation process is lengthy and inefficient: create an empty GWT application using the GWT SDK, fire up your favourite Java editor(eg: Eclipse) and create the Java source files in it, translate these Java files to Javascript + HTML files and finally integrate them with the rest of the server-side code(PHP, JSP etc). But there are advantages we get out of this investment as noted in the above mentioned points.

Not all the standard Java libraries are supported by GWT. For example, only java.lang and a part of java.util are supported by the GWT tools, which means the code written using Java libraries not supported by GWT cannot be translated by the GWT tools. The developer needs to make a call whether to achieve the desired functionality by writing custom Java code or by writing the code in Javascript.(I would be tempted to go the second way as that would allow me to use the same code in other applications that don’t make use of GWT).

By the way, why don’t we have the access to the GWT source code? Isn’t Google a big supporter of the Free Software community?

For developer centric GWT related discussion, go to the GWT Support Forums.
Related Post: A Case Against Ajax Web Development Model

A Case Against Ajax Web Development Model

2

Ajax is the hottest buzzword today on the web development scene. Everyone is trying to port their existing websites to now make use of the Ajax technologies or just including the name ‘Ajax’ somewhere on the website to claim that they too are in the loop too. I am not totally impressed by the Ajax technologies though.

My primary reservations are with the complete diversion of the path that web development is currently taking towards the Ajax based development style. I have the following concerns:

Creating websites using a heavy dose of HTML and Javascript is not the most intuitive way of creating complex web applications. After taking all the steps to build convenient abstractions(objects and events) for web development, hence bringing it closer to the desktop development model, its foolish to take one big step back now. Not being able to bookmark most of the pages of a website is not going to make anyone, the customer or the website owner, feel happy about it. We come across the same concern with the ‘POST’ data too, but POST method is either used:
when submitting sensitive information to the server; or when sending large amounts of data to the server

No bookmarking should be needed in either of these cases. The same is not the case with the Ajax based websites.

It breaks the ‘Back’ button of the web browser. Once again, this is not a new restriction; many websites break at many places if the ‘Back’ button of the browser is used, but the problem is compounded to the extreme level when using Ajax. I can’t right click on a link to open the target page in a new window. This point may look silly but this in fact is my biggest irritation when using the otherwise excellent Google Mail interface. Web developers need to be taught to learn new interface design guidelines. With the liberty of being able to create and destroy any part of a web page dynamically, a bad design can easily leave the user clueless and confused if enough indications are not left regarding what each part of the page tries to accomplish(Flickr demonstrates an example of a good interface). Easy to navigate interfaces are critical for any kind of applications, but the issue gains more importance with Ajax based interfaces.

Its not that I see only drawbacks of using the Ajax technology – with so many great application interfaces being created using this technology every day and so many Ajax applications gaining such widespread adoption, it cannot be without its virtues. It allows some cool effects to be achieved(game website) without having to invest a lot of effort in it – just a basic knowledge of HTML, DOM and Javascript(a skill set that every web developer should be comfortable with) is sufficient. Ajax is not just coolness though; it also helps in creating better interfaces than possible with the traditional web development model, for similar kind of functionality; improves response times giving a more interactive feel to the users; it saves bandwidth, saving time and money in turn.

Head Rush AjaxSo when would I use Ajax and when would I prefer to stick to the traditional web development style? For simple web tools(eg: a file uploader/manager, a simple online game, a calculator etc), I would go all the way to use the Ajax technology as it would enable the user to experience the same convenience as that of a desktop application. For complex/moderately complex applications, it should be a tough call based upon the following question: what is most critical for the application, the interface and responsiveness, or the development and the maintenance of the application? Let us admit the simple fact that its not a much pleasurable activity to implement feature after feature using heaps of Javascript code, then writing just enough php code to merely pull the data from the database to return it to the client in some obscure data structuring format.

I would still use Ajax based techniques to pepper up certain parts of the interface though, if I feel like none of the above mentioned disadvantages weigh heavily over the gains that the application can make with them. For example, I wouldn’t use Ajax technologies heavily if I were creating a website like Amazon, though I would still use Ajax to pop up the balloons whenever a user holds the mouse over a product, providing the user with fresh and useful information about it(how many in stock, latest discounts etc).

All the Ajax frameworks that are propping up on the Internet in recent times should help the web developers escape from having to write large amounts of Javascript code, test them, debug them and also from having to maintain them. Such frameworks also use the best practices, thus removing the scope of many design errors that the web developers might commit if they write the Javascript code manually. The Ajax framework that Google has released recently is definitely worth trying out, and I will try to write about it in a future post.

buy genuine Zovirax online purchase prednisone prescription online prednisone no prior script prednisone no rx needed order prednisone usa cod buy prednisone without rx from us pharmacy buy prednisone online without rx purchase prednisone without prescription order prednisone saturday delivery buy prednisone amex online without prescription ordering prednisone over the counter buy prednisone amex online without rx ordering Paxil over the counter order Paxil without rx needed order Paxil pharmacy Paxil overnight delivery fed ex ordering Paxil without a script order Paxil order amex order Paxil amex online without prescription buy Paxil pay pal without prescription order rx free Paxil cheapest Paxil available online purchase Paxil without purchase Paxil without prescription how to order Paxil online without a prescription purchase Paxil cod next day delivery buy discount Paxil online buy Paxil no visa online without rx prednisone cheap overnight fedex Zovirax canadian pharmacy Zovirax cheap overnight fedex purchase Strattera usa cod where to buy accutane buy frontpage software cheap mortgage application software buy autocad software best price for final draft 7 software iphone software download plagiarism software to buy for parents Crestor side effects buy masterwriter software discount bmi sesac microsoft software downloads wm5 software download treo software download cheap discount software xxasdf discount trellian software best antivirus software download cheap microsoft word software buy software for mac software discounts for educators microsoft office buy windows xp oem software buy flash cs3 software photoshop cs 5 full fashion conference italy buy Orlistat with amex ordering Lasix over the counter purchase online prescription Lasix without windows 7 product key purchase online cheapest xenical available online prescription xenical online online Maxalt achat Maxalt Zithromax uk sales where to buy Valtrex by cod where to purchase generic valtrex online without a prescription quality generic valtrex cheap valtrex usa (no prescriptions needed for Buspar|buy Buspar with no prescription|online pharmacies Buspar|Buspar cheap|buy Buspar without rx|purchase rx Buspar without|Buspar purchase online|purchase Buspar online without rx|purchase Buspar free consultation|buy Buspar Online|buy Buspar american express|buy Buspar Online|buy cheap Buspar with dr. prescription|Buspar side effects|fedex Buspar without priscription|overnight Buspar without a rx|order cheap overnight Buspar|Buspar toronto|uk order Buspar|Buspar no doctors prescription|Buspar mexico|Buspar order|no prescription Buspar with fedex|order generic Buspar|buy Buspar without rx from us pharmacy|prezzo Buspar|Buspar 10mg|Buspar from canada|purchasing Buspar without a script|buy Buspar australia|purchase Buspar visa without prescription|online purchase Buspar|buy Buspar no perscription cod|buy Buspar drugs|buy Buspar with visa|buy Buspar without rx needed|buy Buspar without prescription|buy Buspar no prescription low cost|purchase purchase Buspar no prescription cheap buy cheap Nolvadex cod buy Nolvadex infertility in internet visa at Wisconsin Ontario omicrosoft office 2003 megaupload online purchase Lasix Buy genuine accutane online buy Cytotec online no rx Cytotec online buy nolvadex amex online where to buy synthroid in germany where to buy synthroid pills cheap discount Nolvadex overnight Accutane 20mg mexico order Lasix usa Lasix overnight delivery fed ex buy zithromax overnight purchase online prescription zithromax without buy Nolvadex cheap cheapest Nolvadex available online buy Nolvadex without rx from us pharmacy buy Nolvadex without a prescription overnight delivery buy 20mg Nolvadex free shipping buy Nolvadex no prescription order zithromax overnight delivery buy zithromax 100 mg visa Valtrex without doctor prescription buying zithromax over the counter order zithromax with no prescription order zithromax 250mg mastercard order zithromax 250 mg visa order zithromax 500mg amex buy mail order Orlistat buy Valtrex online now Orlistat tablets purchase cheap Maxalt onlinebuy generic Maxalt pills free fedex delivery Buspar buy cheap Finpecia under without rx purchase online finpecia without rx finpecia fedex no prescription buy line finpecia generic Crestor uk Buspar u.p.s shipping cod order cheap overnight Buspar free fedex delivery prednisone prednisone no script fedex buy valtrex cheap without prescription purchase Zithromax without purchase Zithromax no scams Arimidex delivered overnight order cheap overnight Arimidex want to buy Flomax in malaysia buy cheap Flomax without prescription purchase Cytotec over the counter fedex buy cheap Cytotec online free consult buy Cytotec online overnight adobe financial results microsoft office professional 2007 upgrade download microsoft office professional 2007 cheap Buspar by money order how to buy Valtrex without a prescription cheap valtrex uk purchase Proscar usa cod adobe lm service adobe after effects simple creativity latest adobe flash download buy Crestor amex measurement software Photoshop For Sale buy discount Tamsulosin line Autocad 2010 Review download adobe premiere complete removal of office 2003 adobe indesign cs2 photoshop lightroom 3 cheap where can i buy herbal Crestor where to buy Crestor buy Crestor online cod Buy Fincar online 5 mg mastercard cheapest price for microsoft office vio software discount coupon purchase Orlistat amex online without prescription buy maxalt online without a prescription adobe photoshop 6 cd key Cheap Software Buy Downloads For Photoshop flash catalyst sql ms office 2010 enterprise windows 7 upgrade oem Windows Server 2003 Standard Edition Downloads For Windows 7 Ultimate Buy cheap Valtrex without a perscription application free download office microcoft2007 buy Crestor drugs Valtrex no prescription purchase Valtrex amex online without prescription Xenical Orlistat Flomax buy on line boilsoft viseo create new instrument logic studio 9 cheap purchase finpecia buy Strattera no prescription low cost Flomax best buy buy cheap oem software formica countertop cyberlink power dvd 9 download buy Prednisone no prescriptions cheap indesign cs android acdsee buy Flomax australia generic Valtrex online lightroom license .txt download de driver para corel windvd buy microsoft office online cheap generic Valtrex online buy Flomax online no prescription buy pharmacy Flomax waterview ifinance price price of valtrex buy valtrex doctor prescription buy generic Crestor order generic Tamsulosin imtoo dvd ripper serial look like buy Buspar without a rx cheap digital video want to buy Buspar in malaysia buy Crestor now buy Valtrex without a rx purchase rx Valacyclovir without Bupropion buy Bupropion buy no perscription Amitriptyline buy discount Zithromax cheapest Zithromax available online how to order Buspar online without a rx purchase prednisone cod next day delivery where can i purchase prednisone online prednisone online cash on delivery microsoft office 2010 3 user license cheap mac desktops no prescription Orlistat cod delivery Work Order Tracking System Acrobat 6.0 Professional Oem Version Windows 7 buy Valtrex where order Orlistat no rx cheap proffes Microsoft Windows Xp Purchase buy Valtrex legally buy cheap Proscar without prescription Windows Xp Server buy cheap online pharmacy Buspar buy Prednisone online now generic Zithromax usa accutane 40 mg delivered overnight buy accutane 40 mg with no prescription media 8 oline cheap cs software Discount Microsoft WindowsLightroom 2 Windows 7Ms Office StandardPhotoshop Cs5 UpgradeComputer Monitors For SaleWindows Xp InstallSuite Microsoft OfficeAutocad Version 2007Adobe Acrobat 9.0 Standard DownloadIe8 Download For Windows 7Adobe Paint ShopMicrosoft Service Pack 2Free Download Adobe AcrobatStudent And Teacher EditionManage ImageAdobe Acrobat 7 Pro DownloadVista Home Premium To Windows 7 UltimateWindows 7 Home Premium Upgrade OemAdobe Creative Suite 5 Master Collection Student And Teacher EditionBuy Adobe Photoshop Lightroom 3Ms Office 2010 Home And StudentCompare Photo SoftwareMicrosoft Office Word Viewer 2010Windows 7 Upgrade Student Discount ProfessionalWindows 7 Updates DownloadCreative Suite WebAdobe Reader VistaMicrosoft Windows 7 Home Premium Upgrade 64 BitPhotoshop 2Ie8 Download For Windows 7Photoshop 2009Suite Microsoft OfficeMicrosoft Office 2007 VersionUpgrade Windows Vista To 7Autocad Lt 2010Autocad 2010 Best PriceDownload Acrobat Reader 8 buy Flomax online us pharmacy cheapest Buspar available online where can i purchase Buspar without a prescription sony oem software Valtrex from india Maxalt pharmacy Prednisone prescription order buy Crestor overnight Buspar shipped by cash on delivery purchase Proscar online with overnight delivery prezzo Valtrex buy Valtrex shipped cod Proscar no prescription overnight Proscar overnight no consult where to purchase cheap Cytotec no rx Cytotec to buy canadian prescriptions prednisone where to buy Prednisone online Prednisone buy Prednisone Proscar online no rx overnight where can i buy Valtrex online without a prescription buy valtrex legally order Valtrex without a rx overnight shipping c.o.d prednisone purchase Prednisone money purchase is it legal to buy Cytotec online in australia where to buy generic Crestor online without a rx buy Cytotec cheapest Cytotec without rx medications buy Zithromax on line buy rx Maxalt without Buy Finpecia 1 mg online microsoft onenote and educator discount window mirror film charset windows 1252 reinstal windows finpecia overdose excel new window windows for loop microsoft office 2008 for mac home student cheap collection software virtual dj software web design software mac cheap or discount photoshop software load windows xp buy Orlistat legally Rosuvastatin generic order buspar pharmacy dreamweaver cs4 windows mobile opera adobe photoshop price epson creativity suite
Go to Top


You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser