This is the code that I've developed following the courses. I've made some changes in the original code, so it's slightly different.
In order to run the project, enter the server directory, run:
npm install && npm startThen enter the client directory and run:
npm install && npm run buildand open http://localhost:3000 in your browser
- Welcome
- Course Considerations
- Project overview
- Page overview
- Manipulating DOM
- If you "wrap" the DOM
- Where are the good practices?
- What is a template?
- The object-oriented paradigm
- OO and Classes
- The Trading class
- Class constructor and parameters
- Beware of the anemic model
- Methods
- Encapsulation
- The syntax get
- Immutable objects
- Defensive programming
- The NegotiationController class
- Associating controller methods with user actions
- Transforming document.querySelector into $!
- Changing the context of this with the bind function
- Avoiding traversing the DOM many times
- The problem with dates
- Solving a problem with the functional paradigm
- Spread Operator: Leaving less verbose code
- Arrow Functions: letting the code even less verbose
- Displaying the Date object in day / month / year format
- Isolating the responsibility of date conversion
- Static Methods
- No more concatenations with Template Strings
- Creating our ListModel
- Classes representing our Views
- Extracting the Power of Template Strings
- Bolting a rendering system
- Building a Dynamic Template with the map function
- Totalizing the volume in our Template with the reduce function
- Repeating code is never good
- Code Inheritance and Reuse
- builder vs. super
- Did you remember to update the view? Me neither!
- Less responsibility, better code
- What if we update the view when the template changes?
- The dynamism of "this"
- Reflection API and the facets of this
- Arrow function and its lexical scope
- Model and reuse in projects
- The Proxy design pattern
- Reading traps
- Writing Traps
- Traps for methods
- Isolating the complexity of creating proxies with the Factory Project Pattern
- Our proxy is not 100% yet!
- Isolating the complexity of associating the model with the view in the Bind class
- Constructor returning instance of another type!
- REST Parameters
- Infrastructure Prerequisite
- Learning to climb our server
- Available services
- Ajax requests with the XMLHttpRequest object
- Understanding the onreadystatechange event
- Dealing with status codes
- Performing response parse
- Creating and Adding Incoming Negotiations
- Dealing with possible server errors
- The problem of asynchronous life
- Callback HELL and Pyramid of DOOM
- The Promise Project Pattern
- Dealing with errors
- Pyramid of DOOM again? Of course not, Promise.all in it!
- Flattening a list of arrays!
- Isolating complexity in HttpService
- Further reducing the complexity of our code
- Have we reached the end?
- Bonus surprise!
- Browser has database? Get to know IndexedDB!
- Connecting to the aluraframe bank
- The triad of events
- Communicating with the bank via IDBDatabase
- Do we have a bank that does not have any tables? Meet the Object Store!
- The dual functionality of onupgradeneeded
- Viewing Bank and Object Stores through Chrome
- I want to write to an Object Store, but where is the transaction?
- Oops! Objects need to have unique identifiers in a store!
- Upgrade issues, again?
- Just believe seeing: listing objects in a store
- Dealing with cursors
- One connection or several?
- The ConnectionFactory class
- Promises again to help us
- Sharing the same connection
- The Module Pattern design pattern
- Monkey Patch: Great Powers Bring Great Responsibilities
- The power of closure
- Constants
- We hide the complexity of the connection. And persistence operations?
- The DAO design pattern and asynchronous code handling
- "Promising" our DAO
- Combining design patterns
- A small inconvenience in our store
- Promises and their nuances
- Oops! We can not import duplicate negotiations
- Array.indexOf's trick and the powerful filter function
- Comparison between objects
- A trick to test for equality between objects
- Importing negotiations automatically
- How about an _init () method?
- Improving the readability and maintenance of our code
- xmlHttpRequest: Is there something else on higher level?
- Refactoring HttpService to use the Fetch API
- Dealing with requisition errors
- Compatibility with PolyFill
- The Phantom of Incompatibility
- Transpilation: exorcising incompatibility
- Transpilation with Babel
- Babel, installation and build-step
- Compiling files in real time
- Debugging transpiled code
- Global scope and script loading = headache
- ES2015 and modules
- Babel and module transpiling
- Refactoring our code with import and export