ExtJs 最佳实践 [英] ExtJs best practices
问题描述
似乎大多数 ExtJS 书籍和 ExtJS 介绍都只专注于展示所有不错的功能,但其中大多数并没有真正解释如何使用 ExtJS 构建稳定、可维护的布局/应用程序.以及如何在不造成不可读的混乱的情况下编写它们...
it seems that most ExtJS books and ExtJS introductions just focus on showing all the nice features but most of them don't really explain how to build stable, maintainable layouts / applications with ExtJS. And how to write them without creating an unreadable mess...
我没有想到特定的应用程序,我只是想知道如何优化"我的 ExtJS 代码.因此,如果您需要一个示例,用于项目管理(图书馆)的常规"应用程序或诸如工作委员会之类的东西最能描述我的想法.
I've no specific application in mind, I'm just wondering how I can "beatify" my ExtJS code. So if you need an example, a "regular" application for item management (library) or something like a job board would best describe what I was thinking of.
那么当我想使用 ExtJS 为客户端代码构建这些应用程序时,任何人都可以分享一些关于如何构建此类应用程序的好的链接或建议吗?
So can anyone share some good links or advices on how to structure such applications when I want to build them with ExtJS for the client side code?
提前致谢,干杯
推荐答案
在我公司主要代码审查者执行:
In my company main code reviewer enforcing:
- 作为组件,始终与 PAPA 交谈 - 从不与您兄弟姐妹交谈(允许自己的孩子离场)
- 尽量避免冒泡
- 如果你遵循 #1 你就不需要使用 Ext.getCmp() 它太贵了,所以不要
- 考虑每个组件都可以由团队中的其他人重用
- 在命名空间中使用适当的层次结构(并使用命名空间)
作为遵循文档之上的一些主要规则...... :)
As only a few main rules on top of follow documentation... :)
这篇关于ExtJs 最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!