当前位置: 动力学知识库 > 问答 > 编程问答 >

backbone.js - Functional alternative to Javascript MV*?

问题描述:

I like how Backbone.js provides conventions for structuring javascript frontend code according to OOD. Is there a similar framework or library which similarly provides conventions for interacting with the DOM, user events, and ajax...but in a functional style?

Edit:

For example, to change the name of a backbone "Person" model object:

person.set("name", "bob");

Which statefully modifies the "person" object and is not functional style. A functional alternative would make the models immutable and return new copies:

person = person.set("name", "bob");

分享给朋友:
您可能感兴趣的文章:
随机阅读: