- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Sencha Touch 2 控制器指南
前言:控制器 [Controller] 在Sencha Touch MVC中起到的是纽带作用,它控制视图 [View] 的展示逻辑,又负责以数据模型 [Model] 为基础的数据 [Data] 处理逻辑(包括数据的加载、展示、更新、增删等等)。控制器就像胶水,有了它才能够把一个Sencha Touch(后面一律简写做ST)应用程序 [Application] 的各项元素黏合在一起,使之协调工作并完成预期的任务。文章英文原址是:/touch/2-0//touch/2-0/#!/guide/controllers原文标题是 Controllers ,直译就是控制器,不过在官方文档中也称之为Controllers Guide ,我觉得用这个标题更为恰切一些。Sencha Touch 交流QQ群213119459Controllers Guide控制器学习指南Controllers are responsible for responding to events that occur within your app. If your app contains a Logout?00:4321/docs/index.htmlbutton?that your user can tap on, a Controller would listen to the Buttons tap event and take the appropriate action. It allows the View classes to handle the display of data and the Model classes to handle theloading and saving of data - the Controller is the glue that binds them together.控制器用来响应发生在应用程序中的事件,如果你的应用程序包含一个让用户点击的登出按钮,那么就应该有一个控制器来侦听该按钮的点击事件然后作出恰当的反应。控制器就像胶水,它控制视图类展示数据,并通过数据模型类来加载和保存数据,于是两者就这样被黏合在一起。Relation to?/touch/2-0/Ext.app.Application控制器与/touch/2-0/Ext.app.Application的关系Controllers exist within the context of an?/touch/2-0/Application. An Application usually consists of a number of Controllers, each of which handle a specific part of the app. For example, an Application that handles the orders for an online shopping site might have controllers for Orders, Customers and Products.控制器存在于应用程序的上下文环境中,一个应用程序通常有若干的控制器组成,每一个控制器分别负责实现应用程序中某一个特定的功能部分,例如一个处理在线商城销售订单的应用程序就可能会包含订单、客户、产品等控制器。All of the Controllers that an Application uses are specified in the Applications?/touch/2-0/Ext.app.Application.controllers?config. The Application automatically instantiates each Controller and keeps references to each, so it is unusual to need to instantiate Controllers directly. By convention each Controller is named after the thing (usually the Model) that it deals with primarily, usually in the plural - for example if your app is called MyApp and you have a Controller that manages Products, convention is to create a MyApp.controller.Products class in the file app
您可能关注的文档
最近下载
- 《建筑与市政工程施工现场临时用电安全技术标准JGJT46-2024》知识培训.pptx VIP
- 5G+虚拟现实开发应用赛项理论备考试题库(含答案).docx VIP
- T_CAWAORG 014—2024(老年综合评估及干预技术应用规范).pdf VIP
- 甘肃省武威市凉州区第十中学2024-2025学年九年级上学期第一次月考数学试卷.docx VIP
- 基于JX-300XP的板式精馏塔DCS控制系统的设计.doc VIP
- 装饰合同封面.doc VIP
- PLC的全自动工业洗衣机系统方案设计课程方案设计说明书.doc VIP
- 2023年陕西邮电职业技术学院教师招聘考试题库及答案解析.docx VIP
- (新人教版)音乐一年级上册 全册教学课件.pptx
- 2024年广东省专升本英语考试真题及答案7257.pdf VIP
文档评论(0)