当前位置: 首页 > 工具软件 > Swiz > 使用案例 >

swiz quick start

伏德义
2023-12-01

 

day 1

 

completed 1: 

Roughly know how use swiz , how to config the swiz.

swiz is almost like the spring framework :

1. import swiz > swiz-framework-v1.3.1.swc .

2. provide the beanProviders which is pretty like the ApplicationContext of spring.

3. regist the configuration file in the swiz and the swiz:config which is more function 

  on the performance of load.

4. regist the models/services/controllers which you want managed by swiz and inject in 

  somewhere in the configuration file.

5. create the models/services/controllers you want and use the instance in the container 

  (beanProviders) wherever with the use of metedata tag [Inject].

 

   

-------------------------------------------------------------------------------------------------

 

completed 2: 

  how to dispatch and handle evnets in both visual and non-visual components.

1. in visual components we can dispatch the event in any place if you like 

  as to the handle you can use the metedata tag [EventHandler(event="",properties="")]

  to tell the swiz the handle location . use the properties as the in params for

  the handler.

2. as to the non-components use [Dispatcher] to instructs swiz to inject a dispatch ,

  events dispatched via this dispatcher can trigger methods annotated with [EventHandler].

 

 

day 2 :

 

https://github.com/swiz/

http://www.adobe.com/cn/devnet/flex/articles/ioc_frameworks_print.html

http://www.martinfowler.com/articles/injection.html

difference between [Autowire] and [Inject] : inject is more like the upgrade of autowire 

 类似资料:

相关阅读

相关文章

相关问答