model view controller - When does Javascript break the MVC pattern -
i having argument colleague other day. building our javascript video player.
i wanted pass xml annotations file player , have parsed file, have displayed annotations in configurable ways. thought it'd easier embed everywhere way.
myplayer("divid").setup({ videofile: "/video.mp4", annotationfile: "/annotations.rdf", annotationstyle: "overlay" });
my colleague argued break pure mvc pattern have been following. rather parse annotation file server side , display through view.
what think? keep in mind intend let other projects use player we'd make reusable possible.
you colleague confusing mvc one-m, one-v , one-c. model, view , controller can structured in number of arbitrary layers want. , being here cpu involved in browser, might use (so @ least 2 layers of view). might decide parse on server many reasons, "not breaking mvc" wouldn't 1 of them.
Comments
Post a Comment