• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

AJAX in Practice: OK for Ajax newbies?

 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Authors,

I'm a new comer to Ajax. How good does the book help me in getting familiar with AJAX?
[ April 10, 2007: Message edited by: Bear Bibeault ]
 
author
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jothi,

I'd like to think that we get you up to speed pretty well with this book. We start out with a comprehensive review of the asynchronous request techniques at the heart of Ajax, but most of the book is then concerned with how to make those capabilities work with all aspects of your application - interactivity, usability, maintainability, etc.

By the end of the book, we're looking at some fairly complex stuff, but we guide you there step by step.

Dave
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
David,

So this book as well serves a newbie...that sounds good.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, the first four chapters of the book are designed to get you ready for what's coming in the rest of it.

The first two give you a thorough understanding of Ajax and the XMLHttpRequest, the third a study of advanced Javascript techniques, with an emphasis on writing object-oriented Javascript that you'll neeed to understand, and the fourth is a survey of open source Ajax tookits that are employed in the rest of the book.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
AJAX in portlet...

Is there a way to access AJAX javascripts written in .js files from the portlets? It is difficult to manage & reuse when all the javascripts are written in the JSP file.
 
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bear Bibeault:
Yes, the first four chapters of the book are designed to get you ready for what's coming in the rest of it.

The first two give you a thorough understanding of Ajax and the XMLHttpRequest, the third a study of advanced Javascript techniques, with an emphasis on writing object-oriented Javascript that you'll neeed to understand, and the fourth is a survey of open source Ajax tookits that are employed in the rest of the book.



How much javascript knowledge is required before reading this book though?
 
David C. Crane
author
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Is there a way to access AJAX javascripts written in .js files from the portlets? It is difficult to manage & reuse when all the javascripts are written in the JSP file.



Hi Vins,

Don't do it, please!! In an Ajax app, there's enough Javascript in there to warrant keeping it in separate .js files, which are served as static resources by the server. If you're writing Javascript inside your JSP's, keep it to a minimum. Think of the JS files as a separate tier in your app, if you like.

Dave
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Matt Kidd:


How much javascript knowledge is required before reading this book though?



Basic stuff. If you don't know how to write simple Javascript statements, that's something to tackle first.

But advanced Javascript concepts like object-orientation, functions as first-class objects, function contexts, constructors, closures and the like are handled in chapter 3.
[ April 10, 2007: Message edited by: Bear Bibeault ]
 
David C. Crane
author
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Matt Kidd:


How much javascript knowledge is required before reading this book though?



Hi Matt,

To write a moderately complex Ajax app, you'll need to know a fair bit about Javascript. Most web devs are familiar with using small Javascript snippets. Chapter 3 is designed to address the jump from knowing that much to getting to grips with the language for use with Ajax.

The frameworks that we cover in chapter 4 (and use throughout chapters 5+) make it a lot simpler to write and maintain Ajax-level Javascript than in the good old days of wrestling with cross-browser quirks by hand.

So, yes, there is a learning curve, but I think we make it as gentle as possible.

Dave

PS: On a personal note, I should add that learning Javascript has improved the way that I write Java and C#. JS has a strong functional lineage, and it's worth every coder's time to understand how functional languages work - recent trends inboth Java and .NET have shown a renewed interest in functional coding in the enterprise. There are other ways in - Lisp, OCaml, Erlang - but Javascript is a gentle, practical and rewarding way of doing it.
 
Sheriff
Posts: 3063
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm sure the technical stuff is great. Does the book also give examples of how to use Ajax effectively? I don't like to shove new technology onto a page just for the sake of being new. (Well, actually, yes I do, but I have to justify it to management somehow.)
 
Author
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by David C. Crane:


Hi Vins,

Don't do it, please!! In an Ajax app, there's enough Javascript in there to warrant keeping it in separate .js files, which are served as static resources by the server. If you're writing Javascript inside your JSP's, keep it to a minimum. Think of the JS files as a separate tier in your app, if you like.

Dave



Another pet peeve of mine is that sometimes, in DOM element event handlers (onClick and friends), I MUST write some JavaScript, which really offends my sense of keeping presentation and logic separate. In our event handling chapter, we'll show you how to register those event handlers w/o having to write these event handling attributes in your HTML. This way you can really separate out your logic and layout, and prevent inadvertent bungling of the JS in your HTML.
 
Jord Sonneveld
Author
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Greg Charles:
I'm sure the technical stuff is great. Does the book also give examples of how to use Ajax effectively? I don't like to shove new technology onto a page just for the sake of being new. (Well, actually, yes I do, but I have to justify it to management somehow.)



Hi Greg,

We do have lot of examples + code in the book that shows you how to apply these techniques into situations you'll come across in the real world (e.g. data pre-fetching). So the book isn't just a discussion of what you can do; it also shows you how to do it by way of little examples that showcase the techniques in question.

I hope that answers your question.

j\s
 
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[Edit: reply removed. Rashid, please don't post the same content in multiple topics]
[ April 10, 2007: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jord Sonneveld:

So the book isn't just a discussion of what you can do; it also shows you how to do it by way of little examples that showcase the techniques in question.



Sounds good.

Thanks authors to make reader life easier.
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Authors,

Wonderful to note that Ajax in practice is more of a practical book targeted to all level of audiences!
 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Auther,
What about some problems of Ajax and drawbacks do you mention that and how to use ajax with best practices
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As the title suggests, the book looks at Ajax from a practical viewpoint. So yes, drawbacks of Ajax techniques are discussed, along with practical suggestions for dealing with them.

One example: dynamically altering the client-side DOM can cause the normal tab order of form elements to get screwed up. We explore ways that you can enusre that the tab order remains intuitive and logical on dynamic pages.
 
Ranch Hand
Posts: 1090
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With my limited knowledge and experience on AJAX, I think that AJAX's basically XMLHttpRequest and javascript. XMLHttpRequest is good enough for getting a response and after that it's all javascript. So I guess the book mainly covers javascript and probably some design patterns as well. Or is there more to AJAX minus javascript than XMLHttpRequest?

And Appendix B is Why Go Commercial? Can you give a hint as to whether it talks about some open source tools or some paid ones to make life easier.
 
Jord Sonneveld
Author
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Anupam Sinha:
With my limited knowledge and experience on AJAX, I think that AJAX's basically XMLHttpRequest and javascript. XMLHttpRequest is good enough for getting a response and after that it's all javascript. So I guess the book mainly covers javascript and probably some design patterns as well. Or is there more to AJAX minus javascript than XMLHttpRequest?

So, very basically, AJAX = XHR + DHTML + JavaScript + XML. If you take away the JavaScript, then you're left with DHTML + XHR + XML. But don't underestimate the JavaScript part. Using XHR in your apps really affects your client UI. You can do more powerful things, but of course at the cost of added complexity. We hope to show you how to handle that complexity.

And Appendix B is Why Go Commercial? Can you give a hint as to whether it talks about some open source tools or some paid ones to make life easier.

It was decided to make B an on-line only chapter. Yes, it will discuss commercial tools to make life easier; as you may guess, there isn't much discussion of open source tools in the "Why Go Commercial" chapter . That's because the rest of the book purely focuses on open source solutions.

reply
    Bookmark Topic Watch Topic
  • New Topic