-1

ive been "trying" to create a good solid framework to build an enterprise app in the html space (converting a silverlight app).

I love the thought of the MVVM pattern and that makes me feel a little more at home in the javascript world. My mental block is having all UI based logic locked into the ViewModel. The bulk of the application will be split up into many "single page applications" which are just listing -> details (than repeat).

When it comes executing clientside DOM manipulations (e.g. hiding, showing elements, animations etc) or clientside routing (sammyjs to clientside navigate between listing and details), im confused at where i should put this. Should it all be in the view model? Is it right to have half the logic in a seperate script to the viewmodel.

I see a lot of examples of MVVM out there and all javascript logic is entirely in the viewmodel but the examples are all pretty simple.

Im using KendoUI's implementation of MVVM.

Please someone give me some guidance as Im losing my mind.

Thanks

Matt
  • 3,305
  • 11
  • 54
  • 98

1 Answers1

0

Have you tried knockoutjs. Some of the dom manipulations can be achieved with cleaner code.

We implemented a reference architecture for large scale JS projects. Have a look at it: http://boilerplatejs.org/

We address some of your concerns such as modularizing your components, structuring the solution.

janith
  • 1,025
  • 5
  • 21