论坛首页 Web前端技术论坛

大家来讨论下使用easyui后js泛滥的问题

浏览 13378 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2013-09-02  
hardPass 写道
requirejs 或者 sea可行,但是requirejs 做不到延迟加载,这样的模块化,有多大的意义

做不到么?
异步,按需加载,这比延迟加载有用多了吧。

0 请登录后投票
   发表时间:2013-09-02  
jiasudu1649 写道
正好也遇到同样的事情,也做了一个初级的解决方案。贴出来给楼上一个思路作为参考

代码如下

<screen name="ViewSimpleGrid">
        <section>
            <actions>
                <set field="moduleId" value="ofcGrid" />
                <set field="headerItem" value="ViewSimpleGrid"/>
            </actions>
            <widgets>
                <ofcComponent  id="dd" ofc-component-type="ofc-grid" target="/ofctemplate/control/getJson?entityName=CmsArticle">
			        <field name="articleId" title="${uiLabelMap.articleId}"  />
			        <field name="articleTypeId" title="${uiLabelMap.articleTypeId}" />
			        <field name="description" title="${uiLabelMap.description}" />
			        <field name="title" title="${uiLabelMap.title}" />
			        <field name="content" title="${uiLabelMap.content}" />
                 </ofcComponent>  
           </widgets>
        </section>
    </screen> 



测试效果界面如下


思路就是把js全部封装起来,普通开发人员没资格写js。只有架构师和组件开发人员才有资格写js。这样开发效率,开发质量就上来了。

你这个界面是用什么开发的,挺好看的。。
0 请登录后投票
   发表时间:2013-09-02  
witcheryne 写道
hardPass 写道
requirejs 或者 sea可行,但是requirejs 做不到延迟加载,这样的模块化,有多大的意义

做不到么?
异步,按需加载,这比延迟加载有用多了吧。



打错了, angularjs无法按需加载
0 请登录后投票
   发表时间:2013-09-02   最后修改:2013-09-02
hardPass 写道
witcheryne 写道
hardPass 写道
requirejs 或者 sea可行,但是requirejs 做不到延迟加载,这样的模块化,有多大的意义

做不到么?
异步,按需加载,这比延迟加载有用多了吧。



打错了, angularjs无法按需加载


http://ify.io/lazy-loading-in-angularjs/

另外针对楼主的需求,angularjs在这里的主要作用不是模块化,而是把零零碎碎的DOM操作分离出来。如果已经有现成的ajax交互方案,可以考虑改用比较轻量的avalon ( http://rubylouvre.github.io/mvvm/ 国产货,我听人说用过挺好,可惜代码里太多中文注释,没法在公司里推广,所以没在实际项目里用过 )或 ractive.js ( http://www.ractivejs.org/ )
0 请登录后投票
   发表时间:2013-09-03  
fisherhe 写道
jiasudu1649 写道
正好也遇到同样的事情,也做了一个初级的解决方案。贴出来给楼上一个思路作为参考

代码如下

<screen name="ViewSimpleGrid">
        <section>
            <actions>
                <set field="moduleId" value="ofcGrid" />
                <set field="headerItem" value="ViewSimpleGrid"/>
            </actions>
            <widgets>
                <ofcComponent  id="dd" ofc-component-type="ofc-grid" target="/ofctemplate/control/getJson?entityName=CmsArticle">
			        <field name="articleId" title="${uiLabelMap.articleId}"  />
			        <field name="articleTypeId" title="${uiLabelMap.articleTypeId}" />
			        <field name="description" title="${uiLabelMap.description}" />
			        <field name="title" title="${uiLabelMap.title}" />
			        <field name="content" title="${uiLabelMap.content}" />
                 </ofcComponent>  
           </widgets>
        </section>
    </screen> 



测试效果界面如下


思路就是把js全部封装起来,普通开发人员没资格写js。只有架构师和组件开发人员才有资格写js。这样开发效率,开发质量就上来了。

你这个界面是用什么开发的,挺好看的。。



金蝶的om-ui的做的
0 请登录后投票
   发表时间:2013-09-05  
jiasudu1649 写道
fisherhe 写道
jiasudu1649 写道
正好也遇到同样的事情,也做了一个初级的解决方案。贴出来给楼上一个思路作为参考

代码如下

<screen name="ViewSimpleGrid">
        <section>
            <actions>
                <set field="moduleId" value="ofcGrid" />
                <set field="headerItem" value="ViewSimpleGrid"/>
            </actions>
            <widgets>
                <ofcComponent  id="dd" ofc-component-type="ofc-grid" target="/ofctemplate/control/getJson?entityName=CmsArticle">
			        <field name="articleId" title="${uiLabelMap.articleId}"  />
			        <field name="articleTypeId" title="${uiLabelMap.articleTypeId}" />
			        <field name="description" title="${uiLabelMap.description}" />
			        <field name="title" title="${uiLabelMap.title}" />
			        <field name="content" title="${uiLabelMap.content}" />
                 </ofcComponent>  
           </widgets>
        </section>
    </screen> 



测试效果界面如下


思路就是把js全部封装起来,普通开发人员没资格写js。只有架构师和组件开发人员才有资格写js。这样开发效率,开发质量就上来了。

你这个界面是用什么开发的,挺好看的。。



金蝶的om-ui的做的


空欢喜一场,金蝶的东西要收费
0 请登录后投票
   发表时间:2013-09-07  
fisherhe 写道
jiasudu1649 写道
fisherhe 写道
jiasudu1649 写道
正好也遇到同样的事情,也做了一个初级的解决方案。贴出来给楼上一个思路作为参考

代码如下

<screen name="ViewSimpleGrid">
        <section>
            <actions>
                <set field="moduleId" value="ofcGrid" />
                <set field="headerItem" value="ViewSimpleGrid"/>
            </actions>
            <widgets>
                <ofcComponent  id="dd" ofc-component-type="ofc-grid" target="/ofctemplate/control/getJson?entityName=CmsArticle">
			        <field name="articleId" title="${uiLabelMap.articleId}"  />
			        <field name="articleTypeId" title="${uiLabelMap.articleTypeId}" />
			        <field name="description" title="${uiLabelMap.description}" />
			        <field name="title" title="${uiLabelMap.title}" />
			        <field name="content" title="${uiLabelMap.content}" />
                 </ofcComponent>  
           </widgets>
        </section>
    </screen> 



测试效果界面如下


思路就是把js全部封装起来,普通开发人员没资格写js。只有架构师和组件开发人员才有资格写js。这样开发效率,开发质量就上来了。

你这个界面是用什么开发的,挺好看的。。



金蝶的om-ui的做的


空欢喜一场,金蝶的东西要收费


我说的是xml封装js的思路,至于js框架是采用用omui还是LigerUI,还是easyUI。其实都是一样的
0 请登录后投票
论坛首页 Web前端技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics