Flex2 S2Flex2 AIR 2007.11.11 The Seasar Project Akabana!"#$%&'()*+*',-.& /012 1
2
3
4
5
6
Flex 7
mxml <?xml version="1.0" encoding="utf-8"?> <mx:application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:s2="http:// www.seasar.org/s2flex2/mxml" xmlns="*" layout="absolute" > <s2:s2flex2service id="amf" destination="addservice" result="onresult(event)" fault="onfault(event)" showbusycursor="true" /> <mx:panel layout="absolute" title=" "> <mx:textinput id="arg1_txt" width="58" tabindex="1"/> <mx:textinput id="arg2_txt" width="46" tabindex="2"/> <mx:textinput id="ans_txt" editable="false"/> <mx:button label="enter" click="calculate()" id="dobtn" tabindex="3"/> </mx:panel> </mx:application> 8
9
Actionscript3 10
ActionScript3 11
12
S2Flex2 13
S2Flex2 Flash Player/AIR Flex Framework Eclipse/Flex Builder/Dolteng S2Flex2-Components S2Flex2-Gateway AMF3/AMF0 Reader/Writer Adjustor Binder Message Service
S2Flex2-アーキテクチャ client Server Flex Application( swf) S2Flex2 S2Flex2Components RPCCall S2Flex2 GatewayServlet Components POJO AMF3/AMF0 AMF0/AMF3 ReaderWriter DIContainer Seasar 2.4 15
S2Flex2-Components 16
Data Format: AMF Protocol: HTTP/HTTPS ResultHandler ResultEvent FaultEvent FaultHandler 17
S2Flex2-Components MXML <s2:s2flex2service id="amf" destination="addservice" result="onresult(event)" fault="onfault(event)" /> public function calculate():void { var adddto:adddto = new AddDto(); adddto.arg1=int(arg1_txt.text); adddto.arg2=int(arg2_txt.text); } amf.calculate2(adddto); 18
S2Flex2-Components <s2:s2flex2service id= " amf " destination="addservice" result="onresult(event)" fault="onfault(event)" showbusycursor="true" /> public function onresult(ret:resultevent):void{! var retobj:adddto = ret.result as AddDto;! ans_txt.text=retobj.sum.tostring(); } public function onfault(ret:faultevent):void{! ans_txt.text=objectutil.tostring(ret.fault); } 19
20
AMF3 21
AMF3 Flash Player 9 AMF3 (Action Message Format) RPC Gateway 22
Java AS3 Java 23
S2Flex2 Annotation(Java5.0) Flex2 @RemotingService public class SnapshotServiceImpl implements SnapshotService { : : //for JDK1.4 Field Annotations. public static final String REMOTING_SERVICE= SnapShotService ; 24 }
Service @RemotingService public class AddServiceImpl implements AddService {! public AddDto calculate2(adddto adddto) {!! adddto.setsum(adddto.getarg1() + adddto.getarg2());!! this.adddto = adddto;!! this.adddto.setcalclatedate(new Date());!! return this.adddto; 25
S2Flex2 Session,request / @Export(storage = StorageType.SESSION) public AddDto getadddto() { } return adddto; @Import(storage = StorageType.SESSION) public void setadddto(adddto adddto) { } this.adddto = adddto; Session Session 26
Service public AddDto calculate2(adddto adddto) { public function calculate():void { } amf.calculate2( {arg1:int(arg1_txt.text), arg2:int(arg2_txt.text)}); AddDto AS3 AddDto!Adjustor 27
Adjustor var beanlist:array = new Array(); amf.updatelist(beanlist); public int updatelist(list beanlist); 28
Binder ActionScript3 Java String BigDecimal String Integer ByteArray ByteArray(s2flex2 ) Number(AS) BigDecimal(Java) ByteArray.. 29
amf_binder.dicon( ) Seasar Conference 30
S2Flex2 31
S2Flex2 32
S2Flex2 33
S2Flex2 34
S2Flex2 35
S2Flex2 36
Dolteng(0.22) 37
Dolteng(0.24.0) 38
39
S2Flex2 Akabana S2Flex2! S2Flex2-Tiger! S2Flex2-Components! ServiceBrowser! S2Flex2-Related-S2AnA! S2Factory for FDS! yui-frameworks! AsDs! 40
S2Flex2 related S2AnA 41
42
Air/Flex3 43
Air/Flex3 44
Yui-Frameworks! 45