博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【引】When To Use SproutCore, and When Not To
阅读量:7011 次
发布时间:2019-06-28

本文共 3074 字,大约阅读时间需要 10 分钟。

http://blog.sproutcore.com/when-to-use-sproutcore-and-when-not-to/

 

could tell you to use SproutCore for every single web destination you build, but that would be disingenuous. SproutCore is built to address a certain class of applications that need the help of its robust binding and observer layer, as well as its ecosystem of packages (DataStore, gesture support, etc). There are other classes of applications that simply don’t have the same functionality.

On a spectrum of interactivity, you have Wikipedia on one end, and iCloud.com on the other. The high level of interactivity in a suite of applications like iCloud mandates a foundation that dictates architecture and allows the developers to think and develop at a higher level of abstraction. Wikipedia, on the other hand, lacks rich interactivity or client-side data management, so it does not need state management.

The key consideration you have to make is whether or not you need state management on the client (the browser). When I refer to “state” in this context, I’m referring to a couple of types of state:

  • Server data: If you need to fetch, store, and maintain a data set delivered to you from the server, then SproutCore’s bindings model and the DataStore package ensure that what the user sees and what your server knows about never get out of sync.
  • Application state: In an application’s UI, multiple related pieces of information are usually displayed simultaneously: the aggregate number of items in a list, a list of the most recent items in a collection, etc. Using traditional web development techniques to maintain this sort of application state necessitates a large amount of boilerplate code writing and upkeep.

Finally, SproutCore helps manage the complexity of the code base and keeps marginal-cost of new features low over the lifetime of your project.

The effort required to scale your application in terms of complexity grows at a much lower rate than a traditional, roll-your-own technique.

This is emergent from SproutCore’s binding and observer layer. Because you describe the path your data follows from the model layer to the view layer, any new feature that impacts the data in the model layer will automatically propagate through your application.

Alternatively, when using an event-driven system where you primarily respond to user action, adding a new feature requires you to review the list of current features in your application to ensure that the new addition integrates well with the others. This normally involves keeping disparate functionality in sync by hand, which can become unruly over time.

You, the application developer, write and maintain the application code. However, the community writes and maintains the framework code, allowing the benefits trickle down to you when you update the framework. As a result, by offloading the code you have to write from the application to the framework, you ensure that you build robust, interactive, and fast applications.

转载于:https://www.cnblogs.com/taoqianbao/archive/2013/04/27/when-to-use-sproutcore-and-when-not-to.html

你可能感兴趣的文章
SQL Server 2005 创建Oracle10g 的链接服务器
查看>>
菜单项启动Activity
查看>>
Ubuntu下安装Python的Tkinter和Pmw库
查看>>
安装Nginx+Lua开发环境
查看>>
nginx nginx.pid无故文件丢失,日志无法正常轮转
查看>>
我的友情链接
查看>>
XML中元素VS属性
查看>>
wepy - 小程序快速开发框架
查看>>
nodejs找不到express命令
查看>>
ubuntu13.04通过lxc搭建容器java运行环境
查看>>
RHCE官方培训笔记---分享
查看>>
top命令是Linux下常用的性能分析
查看>>
使用memcached缓存tomcat7会话信息
查看>>
Fatal Python error: pycurl: libcurl link-time version is older than compile-time version
查看>>
CentOS7:搭建SVN + Apache 服务器
查看>>
想要成为一个合格的软件架构师必须知道的事情
查看>>
cachestat、cachetop、pcstat-linux系统缓存命中率分析工具
查看>>
我的友情链接
查看>>
GET & POST
查看>>
z-index 属性
查看>>