A website for exchanging timeshares
Probably the most impactful part of making this website was the use of Material Design Lite. The visual design was vastly simplified with MDL components.
- Components, or segments of the website, were dynamically created and then appended to the "content" div of the HTML.
- In each of these segments, a parent div was created and all the elements were appended to the parent, which was then returned as a dynamically created HTML element.
- Because there wasn't much state to maintain, I opted for a global model instead of giving each component their own.
- An "update" object determined the view in two parts:
- determining which component to append to the "content" div based on the state of the model
- clearing the innerHTML of the "content" div and appending a new component
- Components were declared inside of a so-called component collection object, where they could be called as functions by the "update" object and returned the HTML elements that would be appended to the "content" div
- Creating and adding components was a lot easier because of this preexisting structure
- There were a lot things to consider as I thought about the structure of the code
- For example, should event listeners be added to an element immediately after it was declared, or should they all be located at the same place in the component's function?
- A small library of functions was used frequently, and this library was also updated as the project progressed. The more I built, the more I found opportunities to condense oft-repeated code into reusable functions. I created an "mdl" object which made it easy for me to dynamically write MDL components like input textfields
- Save message draft
- Save My Share draft
- The search could be improved in these ways:
- omit non-alphabetical/non-alpha-numeric characters in possible keywords
- omit repeated words
- stop the search early if a match is found
- ignore caps
- Center sign up form correctly on mobile
- And realistically much more as the project moves more and more into the realm of actual production