A one-page web app built with Ruby on Rails, with the primary text-editor-like interaction handled by Javascript.
The application uses a MySQL database and AJAX to do real-time updates as the app receives user inputs.
- Ruby on Rails
- jQuery (+ jQuery ajax): Handles most interactivity -- most of the magic happens here
- MySQL
- Bootstrap JS and CSS
- Nested Sortable by ilikenwd
- Amazon Web Services Beanstalk for cloud hosting and deployment
- Build-a-collapsible-tree-in-CSS
- I learn to love jQuery for how straight-forward it is to implement interactivity
- I learn to "grow away" from jQuery for future projects of this nature
- As much as I love prototyping this project with jQuery, code organization for element interactivity as well as dynamic data/state management is a pain. As features grow, the code grows much more since one click can result in several DOM & data updates.
- As the product is built to maximize user interactivity by leveraging real-time update, most updates are handled by jQuery
$().html()
,$().data()
or$().attr()
and saved to HTML data attributes (while$.ajax)
updates the change to server). Or this. - After surveying AngularJS or even ReactJS, similar implementation should be built around these models instead.
- Event bubbling in JS could cause huge performance problem if handled carelessly, e.g. in the
focusContentEditable()
function where it potentially has to call itself in many interactivity events- In such case, don't forget to use
event.stopImmediatePropagation();
orevent.stopPropagation();
stopPropagation()
prevents any parent handlers from being executed,stopImmediatePropagation
does the same and also prevents other handlers from executing.
- In such case, don't forget to use
- Graph search in a real project! Bread-first search is implemented to render the item tree when tags are selected.
- Recursion in action: Tree traversal to render tree items -- well, you would totally expect that when working with tree data structure, wouldn't you
- HTML5
contenteditable
One implementation is to create a more transparent view of the development process, highlighting prioritization, association and other parts of the process.
- Account system (AuthO with Google and Facebook login)
- Permissing system: Transform the project into a "Pastebin of online planner"