jtooker / BatchFileRenamer

A Chrome App that renames files on your local disk in bulk
MIT License
0 stars 0 forks source link

Model-View Architecture #14

Closed jtooker closed 8 years ago

jtooker commented 8 years ago

To make the other changes required by this app, additional separation of functionality is desired.

Namely, batchFileRenamer.js must be split up into a model and a view.

The model will know about the file system and settings but NOT about the view directly. It will receive a callback to evoke when its observable state changes.

The view (also a bit of controller) will redraw when the model changes and give the model updates on user actions. The view will require the model to be constructed.

I'll use Douglas Crockford's object convention.

jtooker commented 8 years ago

Other Changes

While the goal was to simply rework, not enhance with this commit, some changes were made: