aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes It Must Be Fate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "It Must Be Fate" Watch "It Must Be Fate" New topic
Author

It Must Be Fate

Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1132

Well look at that. Just yesterday my boss asked me to investigate for appropriate technologies (and frameworks) for converting our applet-based applications to be more like traditional Web applications. And today, I see JavaRanch is offering a free copy of the book Ajax Patterns and Best Practices.

I have seen some articles on the Internet that talk about AJAX being the best thing (since sliced bread) for developing Web applications. However, I have just glanced at those articles, so my questions are:
  • What do people recommend as good sources of information about AJAX, that can help me decide whether it is appropriate for my project?
  • Is Ajax Patterns and Best Practices one of those sources?

  • Our applications are basically glorified database clients. We use an Oracle database, and our (swing) applets contain screens that display the data in the database (in tabular form, mostly) and allow the users to perform DELETE, INSERT and UPDATE operations on the database tables. The business logic is manifest as database stored procedures.

    Hopefully, I have provided enough information for people to offer something concrete. But if not, please feel free to ask for more clarifications/information from my side.

    Thanks,
    Avi.
    Christian Gross
    Author
    Ranch Hand

    Joined: Feb 20, 2006
    Posts: 85
    Let me address your questions:

    Is Ajax the best thing since sliced bread? No, not at all. Ajax is just an ends to a means. To get the full benefit of Ajax you need to combine it with a good server side strategy and my thinking is REST. Many people think Ajax is all client side, or all server side. I say it is both, but a de-coupled both.

    What Ajax brings to the table is the ability to de-couple the client from the server. Think of it as follows. When we develop Java components we use interfaces, implementations and factories. Yet for the Web we like to hard code everything with URL's that reference specific HTML pages. With REST you have the ability to define a resource (aka interface) and its representation (aka implementation).

    Personally, my favorites for developing Ajax applications are the patterns in my book (http://www.devspace.com:8088), Prototype, and DojoToolkit. On the server side I feel what we have is enough. I feel many of the server side frameworks lock us into specific ways of doing things. To compare it, imagine writing a JBoss application that when executed on the client side required a JBoss client API. We would never accept that!

    With respect to book references; My book, Danny Goodman's authored books. I also advise getting a very good IDE that can code HTML! I personally use Komodo, and Visual Studio (the HTML, CSS stuff is pretty good). X-Develop which I use to code Java, and .NET will be releasing a more comprehensive Ajax development environment, but that is still a few months away.

    Now with respect to your plain vanilla database application. I would combine the Content Chunking pattern with the REST Based Model View Controller pattern. However, what's your time frame? Could you wait a month? I am right now authoring Ajax Recipes and would like to add this as a recipe since it is a common question. Send me an email and we can talk further?


    Author of Ajax Patterns and Best Practices
    Christophe Verré
    Sheriff

    Joined: Nov 24, 2005
    Posts: 14687
        
      16

    I find that you need to be comfortable or experienced with a technology before getting into the whole pattern thing
    So would you recommend to read some other introduction books (e.g. Ajax In Action), before reading yours about patterns ?

    I mean, will somebody who has never used Ajax benefit from your book ?

    For example, I could not digest GOF's book about pattern without some heavy experience. Something which would make me say : "Oh, I've already seen that kind of problem. That's what I need".


    [My Blog]
    All roads lead to JavaRanch
    Avi Abrami
    Ranch Hand

    Joined: Oct 11, 2000
    Posts: 1132

    Christian,
    I guess being a published author means you are very liberal with your poetic license. I asked for resources to help me understand what AJAX is, in order to help me decide whether it is appropriate for my project. I was willing to concede that perhaps I didn't explain myself properly, but Satou's answer indicates (to me) that my questions were very clear.

    Nonetheless, if you really think the books you mentioned can help me, perhaps you could provide a few more details that would help me to locate these books? Please excuse me, but "Prototype", "DojoToolkit" and "Danny Goodman" don't help me much more than doing an Internet search for "AJAX" (and getting several million hits back). Alternatively, perhaps you can explain how it is that you have indeed provided me with ample information to begin my research?

    Thanks,
    Avi.
    Christian Gross
    Author
    Ranch Hand

    Joined: Feb 20, 2006
    Posts: 85
    Regarding books: I would agree either Ajax in Action or Foundation of Ajax. Either of these books are very good.

    Regarding my book, chapter 1 and 2 are focused on introducing Ajax and the XMLHttpRequest object. The only assumption that I make is that you understand JavaScript, and Dynamic HTML. This is why I referenced Dany Goodman's books. His two books "Dynamic HTML Reference" and "JavaScript and Dynamic HTML cookbook" are invaluable. JavaScript, and Dynamic HTML belong to the category of dynamic languages you are always wondering what properties, and methods are available.

    Now regarding the patterns in my book. There are only 9 patterns and the GOF has 23 with both books being about the same page count. Why the difference? I tried to explain the patterns with more context, and implementation details that focused on the gotcha's of the pattern. Please note that I am not knocking the GOF book because the GOF is a standard in the software programming community.

    Avi Abrami:
    I apologize if my answers were not clearly explained:
    With respect to toolkits I was saying the Ajax patterns, Prototype (http://prototype.conio.net/), DojoToolkit (http://dojotoolkit.org/). I like Prototype, and DojoToolkit because they promote a de-coupling of the client from the server. These toolkits are client side only, but implementing REST on the server side enables you to modularize your application so that you can call the appropriate functionality at the appropriate time.

    With respect to books: I mentioned Dany Goodman's books because they are invaluable and the reference for Javascript and Dynamic HTML. You can learn the XMLHttpRequest object(http://developer.apple.com/internet/webcontent/xmlhttpreq.html) within minutes. What takes longer is understanding how to use XMLHttpRequest in conjunction with JavaScript and Dynamic HTML. IMHO Ajax books will help you, but when writing good Ajax applications it is even more important to understand the nature of JavaScript and Dynamic HTML.

    [ February 21, 2006: Message edited by: Christian Gross ]
    [ February 26, 2006: Message edited by: Christian Gross ]
    Bill Barbour
    Ranch Hand

    Joined: Dec 19, 2002
    Posts: 35
    My apologies in advance as this could be considered off topic...

    Where do your references to REST MVC come from?

    Thanks!
    Christian Gross
    Author
    Ranch Hand

    Joined: Feb 20, 2006
    Posts: 85
    REST Model View Controller is a pattern in the book Ajax Patterns and Best Practices (disclaimer: I am the author). Essentially the REST Model View Controller is a way to integrate resources not part of the original website. The book illustrates an example of using the search engine Amazon, and Google. But resources need not only be external and could reference service end points.
     
     
    subject: It Must Be Fate