正在加载图片...
Duo Consulting 7/7/20061223PN 5. getHelp(helptopic) 6. view ProgramDetails(activity code) 7. save Towishlist(activity code) 8. check Availability(activity code) 9. addTocart(activity code, participant) 10. cancelRegistration(activity code) 11. load WishlistScreen(mode) 12. load WishlistScreen(mode) Obviously, there are huge gaps in this model. Ideally you would take each colored section of the diagram and model each of the states(screens )and continue labeling Interactions Identify each interaction(a function) and work out the parameters required to allow the function to work as an isolated item. Functions should be able to perform their task without going beyond global variables and the argument scope in most cases. Create a text file and group the function specifications based on the discreet areas of the application e.g. cart, wishlist, account, help. Add JavaScript comments to describe the interaction and include any pseudo code to describe the steps for a function where there are important validation tests, lookups or steps to be performed Are there any panels of the site which have related Java Script functions that are repeated? Whether an undefined number of repeats or a defined number it is preferred to build a JavaScript object. This reduces code duplication, provides variables local to each instance and generally makes things easier. Prefix functions that act on a specific instance of a panel with the name of the panel e.g. Cart: function deleteltemO Look at the interactions which fetch remote data(make an AJAX call). Think about each in turn and make a decision whether each request must be unique(e.g. get user cart)or whether the information doesnt change at all (e.g. get help panel). Update the comments for each function making a remote call to explain that it is remote and indicate if it is unique or not Next, consider the types of remote call you are making. Is the complete result sent back from the remote page as rendered hTmL (rendered result) which can be inserted directly into a destination panel or will the result contain JavaScript variables, XML or a custom structured result(functional result) to be processed in a specific way? An example of rendered result is that a help file chunk can be simply rendered in a given Div element so it is sent back as HTML; a functional result example would be a remote address lookup function where you send an address and receive back a complex object to be inspected which then updates various fields on a form. Add a comment to each AJAX call to say whether the result is rendered or functional Now is probably a good time to walk through your design with another programmer and the designer to make sure you understood the designer's intentions and make sure that your approach isn't missing some obvious efficiencies. An example design document for 3/8Adam Howitt Duo Consulting 7/7/2006 12:23 PM 5. getHelp(helptopic) 6. viewProgramDetails(activity_code) 7. saveToWishlist(activity_code) 8. checkAvailability(activity_code) 9. addToCart(activity_code,participant) 10. cancelRegistration(activity_code) 11. loadWishlistScreen(mode) 12. loadWishlistScreen(mode) Obviously, there are huge gaps in this model. Ideally you would take each colored section of the diagram and model each of the states (screens) and continue labeling interactions. Identify each interaction (a function) and work out the parameters required to allow the function to work as an isolated item. Functions should be able to perform their task without going beyond global variables and the argument scope in most cases. Create a text file and group the function specifications based on the discreet areas of the application e.g. cart, wishlist, account, help. Add JavaScript comments to describe the interaction and include any pseudo code to describe the steps for a function where there are important validation tests, lookups or steps to be performed. Are there any panels of the site which have related JavaScript functions that are repeated? Whether an undefined number of repeats or a defined number it is preferred to build a JavaScript object. This reduces code duplication, provides variables local to each instance and generally makes things easier. Prefix functions that act on a specific instance of a panel with the name of the panel e.g. Cart:function deleteItem() Look at the interactions which fetch remote data (make an AJAX call). Think about each in turn and make a decision whether each request must be unique (e.g. get user cart) or whether the information doesn’t change at all (e.g. get help panel). Update the comments for each function making a remote call to explain that it is remote and indicate if it is unique or not. Next, consider the types of remote call you are making. Is the complete result sent back from the remote page as rendered HTML (rendered result) which can be inserted directly into a destination panel or will the result contain JavaScript variables, XML or a custom structured result (functional result) to be processed in a specific way? An example of a rendered result is that a help file chunk can be simply rendered in a given DIV element so it is sent back as HTML; a functional result example would be a remote address lookup function where you send an address and receive back a complex object to be inspected which then updates various fields on a form. Add a comment to each AJAX call to say whether the result is rendered or functional. Now is probably a good time to walk through your design with another programmer and the designer to make sure you understood the designer’s intentions and make sure that your approach isn’t missing some obvious efficiencies. An example design document for 3/8
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有