Jump to content
Larry Ullman's Book Forums

Search the Community

Showing results for tags 'arrays ajax client-side'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Single Editions
    • Modern Javascript: Develop and Design
    • The Yii Book
    • Effortless Flex 4 Development
    • Building a Web Site with Ajax: Visual QuickProject
    • Ruby: Visual QuickStart Guide
    • C++ Programming: Visual QuickStart Guide
    • C Programming: Visual QuickStart Guide
    • Adobe AIR: Visual QuickPro Guide
  • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (5th Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)
    • PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (1st Edition)
  • PHP for the Web: Visual QuickStart Guide
    • PHP for the Web: Visual QuickStart Guide (5th Edition)
    • PHP for the Web: Visual QuickStart Guide (4th Edition)
    • PHP for the Web: Visual QuickStart Guide (3rd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (2nd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (1st Edition)
  • Effortless E-commerce with PHP and MySQL
    • Effortless E-Commerce with PHP and MySQL (2nd Edition)
    • Effortless E-Commerce with PHP and MySQL
  • PHP Advanced: Visual QuickPro Guide
    • PHP Advanced and Object-Oriented Programming: Visual QuickPro Guide (3rd Edition)
    • PHP 5 Advanced: Visual QuickPro Guide (2nd Edition)
    • PHP Advanced: Visual QuickPro Guide
  • MySQL: Visual QuickStart Guide
    • MySQL: Visual QuickStart Guide (2nd Edition)
    • MySQL: Visual QuickStart Guide (1st Edition)
  • Other
    • Announcements
    • Newsletter, Blog, and Other Topics
    • Forum Issues
    • Social

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 1 result

  1. Hi to all, I am newbie to web apps, with desktop app experience. Learning as I go with fabulous help from Larry's PHP/SQL book and his JS book. So useful. This forum seems fantastic too. I think I can improve performance by loading the browser with data, stored in JS arrays. Since I am clawing my way forward, any feedback early on will be invaluable. My app is about text management--creating custom comments on a person. A user comes to my site to select a group of people in a team and create a custom comment about each of them, based on job performance. The user needs to simply copy the new custom comment to the clipboard and paste it into another website (Yes, it would be better to write the text to the other website and No, I don't have access to that site). The customized comments are never stored in MySQL, they only need to be generated on demand. The names and the stock comments are stored in MySQL. Here's my app model. I have already developed proof-of-concept code (or tested widgets) for the functionality and know it will work, my question is about any unanticipated pitfalls, and performance. App launches: User selects team of people Server side: use AJAX to retrieve list of team members, list of stock comments Client side: use JS arrays to store list of people and list of comments In browser: JS element: display only a list of people Event: User selects person. Result: causes stock comment is written to a new JS text element, and a custom Copy to clipboard button is created Event: button click. Result: custom comment is put in clipboard, so user can switch to reporting site and paste it in. Repeat. Select next person. Creation of stock comment and new button element. Logout when finished. As you can see, I am using arrays to store data client-side, thinking this will improve performance. Users spend most of their time with the members of one team, so load the browser with the data and don't make unneeded AJAX calls. When a user switches to another team: JS clears the arrays JS removes the recent text and button elements JS clears the list of people AJAX call gets new list of people and stock comments from MySQL JS in browser now has arrays loaded with data. User actions drive events and the process above repeats, until the user logs out. The data needed for team members and for stock comments is relatively small, so JS arrays shouldn't cause a noticeable hit to performance. All of this makes sense to me, but I see nothing like this being done in code snippets in books or on forums...and this makes me nervous! Previous experience suggests a more experienced coder will be able to alert me to pitfalls and guide me toward better design solutions. Any advice will be greatly appreciated! CanuckCoder
×
×
  • Create New...