You are on page 1of 12

Dealing with

large data in
Ajax
Robert Buffone
Chief Architect
Nexaweb Technologies
Agenda

• The Basics
• XML vs. JSON
• Delayed loading
• Paging
• Infinite Scrollbars
The Basics
• JavaScript Performance
Challenges

• Data Processing
• Development
• DOM Creation

• Asynchronous
• Data Hiding
• Visual Tricks
Bonues
Balance Your Constraints

• Processor
• Memory
• Network
XML vs. JSON

• Transfer Size • Data Traversal


• Parsing • Security
• Navigation
Delayed Loading

• Only create UI for the visible


presentation.
– Example: www.yahoo.com

• Minimizes
– Startup time
– Bandwidth requirements

• User may never want the data


Paging

• Same principal as any application


• Load data in pieces
• Manage the state of the navigation bar
Infinite Scrollbars

• Capture Scroll Event


• Understand when user wants to scroll
• Notify user of paging
• Append Data
Ajax Performance

• Limit use of String concatenation


• Use for (i++) over for (in)
• Avoid using exceptions
• Minimize code needed
• Watch your scope
• More information can be found at http://
www.rockstarapps.com
Visual Tricks

• Give users queues about progress.


• Overalls stop users from redoing an
ongoing action.
• Display controls will data is loading.
Questions

• Type Questions into


either the Chat or Q&A
windows and I will
answer them.
Getting Started
Attendees are eligible for:
• Extended Nexaweb Evaluation License
6-months plus 10 hours of Free Email
Support
Download Now: www.nexaweb.com/go/try

• FREE On-site Ajax Performance


Consultation 1 day, on-site consultation
by Nexaweb Tech Services.
Limited to first 5 respondents (US only). Customer is responsible for
consultant travel expenses (maximum of $1,000 US).

Contact:
Doug Moniz
Nexaweb Business Development
781.345.5448
dmoniz@nexaweb.com 12

You might also like