admin管理员组文章数量:1392054
I'm working on a web app which is heavy on the client side, which is a first for me. I'm also using jQuery for the first time. I need to have my client-side code keep track of model data which it fetches via Ajax calls.
What's a good way to store this data? Does jQuery provide a good solution, or is there a good generic Javascript solution? I basically want to write model classes in Javascript, (but I don't necessarily need inheritance). Right now my jQuery code is a controller layer, and the DOM and CSS form my view layer. How do other people acplish a model layer?
I'm working on a web app which is heavy on the client side, which is a first for me. I'm also using jQuery for the first time. I need to have my client-side code keep track of model data which it fetches via Ajax calls.
What's a good way to store this data? Does jQuery provide a good solution, or is there a good generic Javascript solution? I basically want to write model classes in Javascript, (but I don't necessarily need inheritance). Right now my jQuery code is a controller layer, and the DOM and CSS form my view layer. How do other people acplish a model layer?
Share Improve this question asked Jan 18, 2009 at 2:55 PeejaPeeja 14.3k11 gold badges62 silver badges78 bronze badges3 Answers
Reset to default 5jQuery developer Adam Wulf released a series of tutorials covering his development of MVC patterns on the client with jQuery some time back. You may find them to be very helpful in your current project. Also, JollyToad did some work in this area as well. You can view their results online too.
There is also, I've discovered, a technique known as Concrete Javascript, where the DOM objects are used as model objects. Effen sounds like a nice way to implement that: http://github./nkallen/effen/tree/master.
I typically use server-built JSON data structures to hold all the stuff my client-side is going to use for interactive manipulations, etc. Nothing specific to jQuery about that...
本文标签: javascriptWhat39s a good way to store model data in a jQuery appStack Overflow
版权声明:本文标题:javascript - What's a good way to store model data in a jQuery app? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744782896a2624820.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论