Read T2inAction.pdf text version

T2 in Action

T2 T2 Project

yone098, skirnir

ID

yone098

T2 Project http://t2framework.org/ Abby

ID

skirnir

T2 Project http://t2framework.org/

Ymir Project

Agenda

T2

T2 T2

ViliT2

demo

AMF

demo

T2 The WEB Connector

T2

Web

HTML Param

Ajax XML JSF Managed Bean

Flex3

AMF3 BlazeDS POJO

Struts Action

Web

T2

T2 The WEB Connector T2

Web

T2 The WEB Connector

T2

Ajax/REST Flex/AIR/Silverlight Web

T2 The WEB Connector

T2 The WEB Connector

T2

T2

T2

T2

Web

URLJava(POJO)

POJO

Navigation

T2

JSP, ZPT, Mayaa,HTML/XHTML

T2

URL POJO POJO Navigation

Request

Response browser

T2 The WEB Connector

T2

T2

POJO

@GET @ActionPath("/hoge")

@POST

T2

@Page("/add") // /addURLPage public class AddPage { @GET //HTTPGET public Navigation add(WebContext context) { return Forward.to("/pages/add.jsp"); } @Amf //FlexAIR public Navigation handleAmf (HogeDto dto) { return AmfResponse.to("ok"); } }

T2

T2

T2

@GET,@POST @ActionPath @ActionParam

key keyvalue

@Ajax @Amf @Default

T2

T2

T2

@RequestParam @RequestHeader @SessionAttr @Upload @Form @Index @Var

T2

HttpServletRequest, HttpServletResponse HttpSession ServletContext Cookie/Cookie[] WebContext Request, Response UploadFile ErrorInfo

T2

PHP

T2

PHP

$_GET("arg1") $_POST("arg2") $_SESSION("name") $_FILES("sample")

T2

T2

T2

T2

DI

Seasar2SpringGuice DILucy

OK

T2

T2

T2

T2

T2 The WEB Connector

Vili T2

T2 The WEB Connector

T2

EclipseT2

T2 The WEB Connector

Jar

T2 The WEB Connector

Vili

T2 The WEB Connector Eclipse Vili Seasar Web Ymir T2

Ymir

T2 The WEB Connector

Vili Maven Maven Vili

T2 The WEB Connector

Vili T2AMFT2 AMF ViliT2 AMF YmirJSONAMF UIYonex T2 T2

T2 The WEB Connector

T2 The WEB Connector

T2 The WEB Connector

ViliT2

T2 AMF

AMF

T2 AMF

AMF

T2 AMF

AMF

ActionMessageFormat

Flash/Flex

JSON1/4XML1/10

T2 AMF

(hex) :(binary) 0x00000000 0x0000007F : 0xxxxxxx 0x00000080 0x00003FFF : 1xxxxxxx 0xxxxxxx 0x00004000 0x001FFFFF : 1xxxxxxx 1xxxxxxx 0xxxxxxx 0x00200000 0x3FFFFFFF : 1xxxxxxx 1xxxxxxx 1xxxxxxx xxxxxxxx 0x40000000 0xFFFFFFFF :

01271byte

T2 AMF

AMF

undefined Type null Type false Type true Type integer Type double Type String Type XMLDocument Type Date Type Array Type XML Type ByteArray Type Object Type(Object,)

T2 AMF

AMF0AMF3

AMF3:ActionScript3 FlashPlayer9

Flex2/3AMF3

formatOpen

http://download.macromedia.com/pub/labs/amf/amf3_spec_121207.pdf

T2 AMF T2

HTTP/HTTPS AS

AMF3

AMF3Java

T2 AMF

T2

T2 AMF AMF

AMF S2Flex2AMF

AMF T2

· AMF

BlazeDSAMF

blazedscommon.jarblazedscore.jar

T2 AMF

blazeds AmfContext

BlazeDSAmfContext serialize deserialize blazedscommon.jar blazedscore.jar

T2InternalAmfContext serialize deserialize

T2 AMF

AMF2 T2Internal jar not Adobe BlazeDS Adobe

jar

T2 AMF

T2 AMF

destination

destination=Page

unicef bokin int String !

T2 AMF

distination

@Page("unicef") //destination public class UnicefPage { @Amf // @Amf("bokin") public Navigation bokin(int bokingaku){ Unicef.sendToAfrica(bokingaku); //AmfResponse return AmfResponse.to("Thank you!"); } }

T2 AMF

// public function handleResult(e:ResultEvent, token:Object=null):void{ var message:String = String(e.result); Alert.show(message);//"Thank you" } // public function handleFault(e:FaultEvent,token:Object=null):void{ log.error(ObjectUtil.toString(e)); }

T2 AMF

//RemoteObject var unicefPage:RemoteObject = new RemoteObject("unicef"); //

var endPoint:String = URLUtil.getFullURL(Application.application.url,"t2.amf"); var channel:Channel = URLUtil.isHttpsURL(endPoint)? new SecureAMFChannel(null,endPoint): new AMFChannel(null,endPoint); var channelSet:ChannelSet = new ChannelSet(); channelSet.addChannel(channel); unicefPage.channelSet = channelSet;

// var token:AsyncToken = unicefPage.bokin(1000000); token.addResponder( new AsyncResponder(handleResult,handleFault));

T2 AMF

//aliasJava [RemoteClass(alias="unicef.java.UnicefDto")] public class UniceDto { public var bokingaku:int; public var message:String; }

Java

T2 AMF

RemoteObject unicefPage.bokin(10000) destination:unicef bokin 1 ResultEvent result:"Thank you!" handleResult

handleFault

FaultEvent message:

@Page("unicef") UnicefPage @Amf String bokin(int money)

T2 AMF

demo

T2

T2 T20.6ga

m(_ _)m AMF0.6

T2 0.7Web T2 0.8SSO T2 0.9 Web2.0View

T2

T2

http://code.google.com/p/t2/

OSSJava T2

Commons : Lucy : DI Yonex : SeleniumIT Vili : Eclipse

T2 committer

shot6

http://d.hatena.ne.jp/shot6/

skirnir

http://d.hatena.ne.jp/skirnir/

c9katayama

http://d.hatena.ne.jp/c9katayama/

yone098

http://d.hatena.ne.jp/yone098/

Information

T2

65 pages

Report File (DMCA)

Our content is added by our users. We aim to remove reported files within 1 working day. Please use this link to notify us:

Report this file as copyright or inappropriate

461123


Notice: fwrite(): send of 201 bytes failed with errno=104 Connection reset by peer in /home/readbag.com/web/sphinxapi.php on line 531