3 ms·
Just to present an alternative: I found for apps which don't use many forms the above plugins can be overkill. I used something like the following: https://gis
by stusmith1977 15y ago
Just to present an alternative: I found for apps which don't use many forms the above plugins can be overkill. I used something like the following:
https://gist.github.com/2049308 https://gist.github.com/2049308
..to provide simple form-to-model and model-to-form conversions, with appropriate validation. Just decorate the form elements with data-bind="property" and away you go. (I'm using Bootstrap so the validation is tied heavily to that).
(I'm certainly not trying to denigrate the above plugins - obviously different apps have different requirements and as pointed out, if you have many forms then the above plugins make much more sense. The fact that Backbone lets you make these decisions is for me a nice feature).
- jwarzech 15y agoNice and simple...I like it. Snippets like these are great to have in the arsenal. Sometimes I end up using the 'heavy' solutions for simple things (just cause I've used them before and its easy to snap in) when I could really get away with rolling a simple solution like you did there.