Jump to content
Larry Ullman's Book Forums

CanuckCoder

Members
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About CanuckCoder

  • Rank
    Newbie
  1. I found it after all. For anyone interested, in Chapter 11: AJAX there is a section called Showing Progress starting on page 451. It shows how to indicate to the user that something is happening, during an AJAX process.
  2. Hi to all, Somewhere in the book Larry shows how to write a simple progress indicator for the user. It counts the %99 of time remaining until a task is complete. It might have been during an AJAX call. That's my purpose. If anyone can find this and provide the page number, please reply. I can find it in the index or by skimming. And I never miss a chance to say thanks again Larry. With your help, I am coding AJAX with little web app experience. Your books are phenomenal! Thanks in advance, CanuckCoder
  3. Wow, I really like the tip about a User object array. Multiple payoffs there, down the road. In fact the comments themselves have different variations--I was just keeping it simple for the sake of brevity (if you want to call my post above 'brief!' LOL) ... so ... Comment object arrays make sense too. Thanks very much, HS!
  4. And no, the comments are not saved. As given, The user needs to simply copy the new custom comment to the clipboard and paste it into another website...The customized comments are never stored in MySQL, they only need to be generated on demand.
  5. Hi HartleySan, I am not comfortable giving away the exact purpose of the site, for competitive reasons. I hope you understand. And I didn't think I had to defend the point of my project. That was a surprising comment to read. As it happens, the comments for a performance assessment of team members by a manager, not about users on websites. The only user described is the user of the app. It is very worthwhile to a large group of users, it's ethical and it's something innovative (for their industry). In my experience in desktop applications, I also did a fair bit of text management and I found arrays work well for me. So, does the design seem good? Just having a bit of newbie anxiety I guess. In books and online sample code I have not seen a lot of data being kept client-side in JS arrays. Do you have any words of caution or advise? Thank you, CC
  6. By the way I saw this comment from HartleySan, and thought my JS design made sense: JS is usually used for the following two reasons: 1) Respond to user input. 2) Dynamically change the appearance/content of a page without reloading the page. See: http://www.larryullman.com/forums/index.php?/topic/2112-forms-in-javascript-or-php/&do=findComment&comment=14534
  7. 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...