Design Patterns in JavaScript and TypeScript
See attached presentations in PPT Presentations folder
Run cd nodejs-singleton folder & node index
in terminal
Example on how builder pattern is adopted by jQuery's API
Open index.html
from jquery-builder
folder
Run script.js
content in browser console or any online JavaScript editor
https://repl.it/@alexandraturian/Prototype#index.js
Typescript example
https://replit.com/@alexandraturian/PrototypePattern#index.ts
Example on how to create an http or https server in nodejs, using factory pattern
Run cd nodejs-factory & node index http://localhost:3000
Send a request to http://localhost:8082 and watch server logs
TypeScript example on how to work with a group of factories
Try this online editor to run TypeScript (example is included)
https://repl.it/@alexandraturian/AbstractFactory-1#index.ts
Example on how to deal with data from two external sources that use different formats using adapter
Run index.js
content in browser console or any online JavaScript editor
Example on how to render a file explorer, using npm package dree strucuture to represent a folder with subfolders and files.
Run script.js
content in browser console or any online JavaScript editor
Small chatroom example
Try this online editor to run: https://replit.com/@alexandraturian/ChatWithMediator#index.ts
Subject/Observable: Small user form with one text input
Subscribers/Observers: Display number of users + users list components
Open index.html in any browser or any online HTML, CSS, JS editor
Find the example here: https://codesandbox.io/s/observerpatternexample-z01ps
Try this online editor to run: https://replit.com/@alexandraturian/StatePattern#index.ts
Example on how to add shipping cost logic for car parts order.
Try any online editor that supports TypeScript. \
How to run locally using WebStorm: https://www.jetbrains.com/help/webstorm/running-and-debugging-typescript.html#ws_ts_run_debug_server_side
Entry point (main): typescript-visitor/VisitorDemo.ts \
added online