a javascript framework for presentations and animations
play

A JavaScript Framework for Presentations and Animations on Computer - PowerPoint PPT Presentation

A JavaScript Framework for Presentations and Animations on Computer Science Laszlo Korte Bachelor Thesis Technical Aspects of Multimodal Systems Department of Informatics University of Hamburg 1 / 76 May 3, 2016 - Laszlo Korte - JavaScript


  1. A JavaScript Framework for Presentations and Animations on Computer Science Laszlo Korte Bachelor Thesis Technical Aspects of Multimodal Systems Department of Informatics University of Hamburg 1 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  2. Outline 1. Introduction 2. Web Platform ○ The Browser ○ NodeJS ○ Workflow ○ Graphical User Interface 3. Components ○ Demos 4. Architecture 2 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  3. Introduction Motivation 3 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  4. Motivation ● Computer Science deals with abstract topics ● Hard to grasp without trying ● Short feedback cycle for building intuition ➔ Interactive learning experience 4 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  5. Matlab Components ● Boolean expression parsing and evaluation ● Binary number encoding and decoding ● Finate-state machine simulation ● Algorithm visualisation ● … 5 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  6. Matlab Components - FSM finite-state machine simulator 6 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  7. Matlab Components - number encoding number “circle” 7 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  8. Matlab Components - base conversion visualisation of an algorithm for base conversion 8 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  9. Java Applets ● Karnaugh map editor ● Advanced FSM editor 9 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  10. Java Applets - Karnaugh map Karnaugh map editor 10 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  11. Java Applets - Karnaugh map Karnaugh map editor 11 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  12. Java Applets - FSM Finite-state machine editor 12 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  13. Java Applets - FSM Finite-state machine editor 13 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  14. Issues ● Matlab ○ Not free, licensing restrictions ○ Not trouble-free with current Matlab version ○ Not on mobile devices 14 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  15. Issues ● Matlab ○ Not free, licensing restrictions ○ Not trouble-free with current Matlab version ○ Not on mobile devices ● Java Applets ○ Not on iOS (iPad, iPhone) ○ Not usable on touch screens 15 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  16. Introduction Objective 16 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  17. Objective ● A new collection of components ○ no licensing issues ○ not limitted to a small set of devices ➔ The web as free and open platform ➔ Touch screen support ➔ Support a wide range of screen sizes 17 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  18. Objective - components ● Karnaugh map editor ● Finite-state machine editor ● Boolean expression editor ● Number circle ● ... ➔ Expandable later on 18 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  19. Web Platform The Browser 19 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  20. The Browser ● Display HyperText Markup Language Documents (HTML) ● Documents can be styled via Stylehsheets (CSS) ● Documents may contain code to execute (JavaScript) 20 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  21. The Browser - example HTML document index.html 21 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  22. The Browser - example HTML document index.html 22 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  23. + CSS index.html 23 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  24. + CSS index.html 24 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  25. + JS index.html 25 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  26. + JS index.html 26 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  27. + JS index.html 27 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  28. + JS index.html 28 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  29. + JS index.html 29 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  30. The Browser - example document index.html 30 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  31. The Browser ● HTML Document is the entry point ○ links to/embeds stylesheets ○ links to/embeds javascripts ● Most of the application is defined in JavaScript (JS) ➔ start with an almost empty document, build everything in JS 31 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  32. The Browser - Document Object Model ● DOM API allows querying and modifying the whole document 32 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  33. The Browser - JavaScript ● No module system ○ difficult to split application into modules ● No static type system ● Weird semantics ○ 5 + "5" === "55" ○ 5 * "5" === 25 ● API differences across browsers 33 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  34. Web Platform NodeJS 34 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  35. NodeJS Source: https://nodejs.org/en/about/resources/ ● JavaScript runtime environment ○ Based on Chrome’s JavaScript engine V8 ○ Run JavaScript outside the browser ➔ Large ecosystem of open source libraries and tools 35 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  36. NodeJS - Package Manager Source: https://www.npmjs.com/ ● Command line tool for managing dependencies ○ Like maven for Java or easy_install for python ● Access to >250.000 libraries 36 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  37. Web Platform Workflow 37 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  38. Babel Logo: https://github.com/babel/babel ESLint Logo: http://eslint.org/ Webpack Logo: https://webpack.github.io/ Workflow - Tools ● BabelJS ○ Access to future JS features (eg. module system) ● ESLint ○ Check source code for common errors ● Webpack ○ Module bundler ○ combine multiple JS files and libraries into one file 38 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  39. Workflow - Babel Source: https://github.com/babel/babel ES6 module import syntax 39 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  40. vendor/LibX Workflow - Tools moduleA.js moduleB.js main.js 40 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  41. Workflow - ESLint Source: http://eslint.org/ moduleA.js moduleB.js main.js 41 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  42. Workflow - Webpack Source: https://webpack.github.io/ moduleA.js moduleB.js bundle application.js main.js 42 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  43. Workflow - Webpack layout.css moduleB.css Source: https://webpack.github.io/ moduleA.js style.css application .js moduleB.js bundle application. css main.js 43 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  44. Workflow - Webpack Dev Server 44 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  45. Workflow - Webpack Dev Server ● No manual recompile ● Watches the file system for changes ● Pushes changes to browser (via websocket) 45 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

  46. Workflow - Webpack Dev Server ● No manual recompile ● Watches the file system for changes ● Pushes changes to browser (via websocket) connect moduleA.js watch Dev Server main.js notify moduleB.js browser http://127.0.0.1:3000 file system 46 / 76 May 3, 2016 - Laszlo Korte - JavaScript Framework for Presentations on Computer Science

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