widgets and javascr cript
play

Widgets and JavaScr cript No screens Say your name Prof. Lydia - PowerPoint PPT Presentation

Widgets and JavaScr cript No screens Say your name Prof. Lydia Chilton COMS 4170 19 February 2018 Goal 1 Build websites that suit the needs and abilities of users To accomplish a goal, users must execute an operation and evaluate the result


  1. Widgets and JavaScr cript No screens Say your name Prof. Lydia Chilton COMS 4170 19 February 2018

  2. Goal 1 Build websites that suit the needs and abilities of users To accomplish a goal, users must execute an operation and evaluate the result To execute an operation users must interact with elements on the page

  3. There are some standard ways we interact with elements in an interface:

  4. There are some standard ways we interact with elements in an interface:

  5. Buttons and Text Inputs are examples of widgets.

  6. Remember the JQuery Button Counter? HTML JavaScript

  7. Widgets standardized low-level interaction interfaces When you create a widget… The appearance is standardized, The types of events it responds to are standardized But the actions taken after an event is fired, are not standardized

  8. Widgets Basic elements for users to interact with your UI

  9. Button Widget interaction: What event fires? “Click event”

  10. Text Input interaction: What event fires? “Keypress” event

  11. Radio Input interaction: What event fires? “Change” event

  12. <select> interaction: What event fires? “Change” event

  13. Autocomplete interaction: What event fires? • “Search” event • “Select” event

  14. Drag and Drop interaction: What event fires? • “Drag” event • “Drop” event

  15. Widgets standardized low-level interaction interfaces When you create a widget… The appearance is standardized, The types of events it responds to “Click” “Keypress” “Change” “Search” are standardized But the actions taken after an event is fired, are not standardized

  16. Creating Widgets Dynamically

  17. Statically created widget: cr St created o on p page l load . HTML JavaScript

  18. Dy Dynam amic ically ally created widget: cr created o on d demand b based o on u user i interact ction. HTML Click me And me! JavaScript And me! Create a new button when I am clicked! And me! And me! And me! And me!

  19. Whe Where in n the he code de sho shoul uld d we add dd the he dyna dynamic behavi beha vior? HTML Click me And me! JavaScript And me! Create a new button when I am clicked! And me! And me! And me! And me!

  20. How did we create the button in JavaScript? HTML JavaScript

  21. Add widget to UI dynamically HTML JavaScript

  22. Where do we create a lin line e break eak dy dynam namical ally ? HTML JavaScript

  23. How do we create a lin line e break eak dy dynam namical ally ? HTML JavaScript

  24. Where do we create a bo ally ? Wh boots tstr trap but p button n dynam dynamical HTML JavaScript

  25. How do we create a bo Ho bootstrap p but button n dy dynam namical ally ? HTML JavaScript

  26. Where do we create a cl Whe click ck e event dy dynam namical ally ? HTML JavaScript

  27. How do we create a cl Ho click ck e event dy dynam namical ally ? HTML JavaScript

  28. statically in HTML You can create elements st namically in JavaScript (JQuery) Or dy dyna Static : HTML, JavaScript onReady Dynamic : All JavaScript

  29. Pros and Cons of Standardization

  30. good about standardization? What’s go Non-Standardized Standardized

  31. What’s ba bad d about standardization? Non-Standardized Standardized

  32. Things that have moved toward standardization

  33. Widgets allow customization Customizable scroll bars Bad use of customization. Good use of customization.

  34. Use your powers of customization wisely.

  35. Summary

  36. There are some standard ways we interact with elements in an interface:

  37. Widgets standardize common, low-level interaction interfaces When you create a widget… The appearance is standardized, The types of events it responds to are standardized But the actions taken after an event is fired, are not standardized

  38. statically in HTML You can create elements st namically in JavaScript (JQuery) Or dy dyna Static : HTML, JavaScript onReady Dynamic : All JavaScript

  39. Widgets allow customization. Use it wisely. Customizable scroll bars Bad use of customization. Good use of customization.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend