This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques and have Mario Casciaro & Luciano Mammino on-line!
See this thread for details.
Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Ajax Patterns

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Am working on redesigning an application and was considering using AJAX. ValueObject/Transfter object Patterns till now has been designed to move all relevant data in one call or so... per app requirement.

Redesigning with AJAX can mean changing these strutures too!!! Is there any simpler way to map/migrate to AJAX...techinques/patterns/cheat sheets.



Thanks,
San
 
Sheriff
Posts: 67592
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
Why do you feel a need to change the basic app structure? Ajax is a tool best used with good and time-tested web application patterns, not as a replacement.
 
S Santhosh
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Apologize if i wasnt clear.

Most of the J2EE apps have follow certain patterns, simplest being ValueObject(VO) or transfter object. These methods transfter form(screen) data to database or however the VO is mapped to the screen.

Currently we have one screen mapped to a VO. On submit we send the VO to server for validation of data.

In AJAX, i assume we can validate..say SSN even before the user hits summit. This means the same value object shouldnt be used since its got more than just the SSN....

So should i be considering other patterns in general, any specific for data transfter or should i try an use the exiting....
 
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One of the best options in this veign is DWR... with it, you can easily continue to use the usual DTO pattern, as well as other patterns.

Alternatively, you could use JSDigester (http://javawebparts.sourceforge.net - in the JSTags taglib), which would allow you to send XML from the server, and then directly populate VO Javascript objects... you will have to write a toXML() function on your VOs to use to transmit back to the client, but that's relatively trivial.
 
moose poop looks like football shaped elk poop. About the size of this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic