Ext4:Web开发平台升级与兼容策略

需积分: 3 1 下载量 19 浏览量 更新于2024-07-23 收藏 260KB DOC 举报
Ext_4概述文档详细介绍了Ext 4作为一个革新性的Web应用程序开发平台的升级特性。相比于Ext 3,Ext 4在框架的各个方面进行了显著改进,包括组件和子系统的优化。文档强调了与Ext 3的兼容性问题,虽然4.0版本引入了许多新功能,但并非所有内容都能无缝对接Ext 3,这意味着在迁移至Ext 4时,开发者可能需要处理兼容性问题。 加载Ext 4时,文档推荐使用兼容化文件,旨在提供一种过渡方式,使得旧版Ext 3能够利用Ext 4的新特性,同时保持向后兼容。通过沙箱模式的设计,Ext 4允许在同一个浏览器环境中运行旧版和新版,避免直接冲突。这涉及到了对JavaScript原型方法的调整,以及将所有修改操作移到全局的Ext对象下,以创建不同的命名空间,方便区分新旧版本。 在标记语言(Markup)和CSS方面,Ext 4引入了Compass和SASS框架,并生成自定义的CSS,这使得在Ext 4的CSS规则中添加前缀变得容易,如使用Ext.baseCSSPrefix属性。这样的设计使得与Ext 3的CSS样式区分开来变得更加直观。 重构过程中的包和命名空间更新是另一个关键点。原有的类和包结构被重新组织,遵循更严格的命名规则,这有助于提高代码的可维护性和查找效率。例如,Ext 3中的Button、CycleButton和SplitButton等组件都被整合到新的(widgets)包中,同时在Ext对象上直接体现层级关系。在Ext 4中,Button相关的类被分别放在src/button包下,并采用新的命名空间,如Ext.button.SplitButton。 为了考虑到Ext 3项目的兼容性,Ext 4提供了"alternateClassName"这一特殊属性,它允许旧项目在保留原有类名的同时,利用Ext 4的新功能。例如,Ext.SplitButton可以通过这个属性在Ext 3环境中映射到Ext 4的新类库。 Ext 4不仅是技术上的升级,更是对开发流程和命名规范的一次重大改革,这对于从Ext 3迁移到Ext 4的开发者来说,理解并适应这些变化至关重要。

insert overwrite table discountdw.dwd_sd_adds_order_bill_inc partition(dt = '2023-06-06') select t1.order_bill_id, t1.counterfoil_no, t1.acceptor, date_format(to_utc_timestamp(cast(t1.expiry_date as bigint) ,'GMT-8'),'YYYY-MM-dd'), t2.company_id, t1.cert_no, t1.company_name, t1.third_order_id, t1.counterfoil_amt/10000, t1.transaction_amt/10000, t1.rate, '3bp' as service_tariffing, ((DATEDIFF(to_utc_timestamp(t1.expiry_date ,'GMT-8'),to_utc_timestamp(t1.transaction_date ,'GMT-8') ) + adjust_days)* 0.0003 *(counterfoil_amt))/ 360 as service_fee, 360 as total_days, DATEDIFF(to_utc_timestamp(t1.expiry_date ,'GMT-8'),to_utc_timestamp(t1.transaction_date ,'GMT-8') ) + adjust_days as modulation_date, t3.channel_type, t3.bank_name, date_format(to_utc_timestamp(cast(t1.transaction_date as bigint) ,'GMT-8'),'YYYY-MM-dd'), t1.order_status_code, t1.order_status_msg, t4.fee_amt, t4.status, t1.tenant_id, t5.revenue, to_utc_timestamp(cast(t1.create_date as bigint) ,'GMT-8'), to_utc_timestamp(cast(t1.update_date as bigint) ,'GMT-8') from (select * from discountdw.ods_adds_order_bill_inc where dt ='2023-06-06' and channel_id=101110004 )t1 left join (select * from mecdw.ods_company_full where platform_id='sdpjw')t2 on t1.cert_no=t2.cert_no and t1.tenant_id=t2.tenant_id left join discountdw.dim_adds_product_full t3 on t1.partner_id=t3.partner_id and t1.product_id=t3.product_id left join (select * from mecdw.dwd_sc_fee_record_full where dt='2023-06-06' and biz_type=2 ) t4 on t1.order_bill_id=t4.third_id left join (select * from discountdw.ods_sd_order_ext_inc where dt='2023-06-06') t5 on t1.order_bill_id=t5.order_bill_id left join sdpjwdw.dim_holiday_info_full t6 on date_format(to_utc_timestamp(t1.expiry_date ,'GMT-8'),'YYYY-MM-dd') = t6.civic_holiday ;

2023-06-09 上传