bogdanbeczkowski/todoJS — pull request #1 by mpodriezov (2012-07-22 16:30:11+00:00)
Title: Code structure re-factoring

1) General application re-factoring. Code did change much, just few method names. All code inside app.js was split into 3 files to provide logical layer separation. This separation allows us to split application logic, data access and view manipulation into parts what is good to decouple application and encapsulate responsibilities.
- db.js is for wrap data access (we use local storage but in future will add a nodejs server)
- dom.js wraps all dom operations, including html elements manipulation and DOM events. This will give us simple interface and it will decouple code in case we of using DOM manipulation libraries. Gives single and unified interface for all code which works with DOM so switching between libraries (JQuery, Dojo) will not force us to modify all application code.
- todo.js contains application logic (creating/updating/removing todos and so on)
- app.js application initialization and start point

2) LocalStorage was used incorrectly. Added setItem and getItem methods.