- 浏览: 37397 次
- 性别:
- 来自: 天津
最新评论
Flex and Java applications use a multi-tier architecture where the presentation tier is the Flex application, the business or application tier is the Java EE server and code, and the data tier is the database. You can write the back-end code just as you normally would for a Java application, modeling your objects, defining your database, using an object-relational framework such as Hibernate or EJB 3, and writing the business logic to query and manipulate these objects. The business tier must be exposed for access via HTTP from the Flex application and will be used to move the data between the presentation and data tiers. Flex和Java应用程序使用一个多层架构,其中的表现层是在Flex应用程序,业务或应用层是Java EE服务器和代码,数据层是数据库。
你可以写后端代码就像一个Java应用程序通常会,建立对象模型,确定您的数据库,使用诸如Hibernate或EJB 3对象关系框架,编写业务逻辑去查询和操纵这些对象。业务层必须是通过HTTP公开访问的Flex应用程序,而且将被用于在表项层和数据层之间移动数据。
Typical HTML applications consist of multiple pages and as a user navigates between them, the application data must be passed along so the application itself (the collection of pages and functionality it consists of) can maintain state. In contrast, Flex applications, by nature, are stateful. A Flex application is embedded in a single HTML page that the user does not leave and is rendered by Flash Player. The Flex application can dynamically change views and send and retrieve data asynchronously to the server in the background, updating but never leaving the single application interface (see Figure 1) (similar to the functionality provided by the XMLHttpRequest API with JavaScript.)
典型的HTML应用程序包含多个页面,为用户之间的导航,应用程序的数据必须通过沿因此应用程序本身(该网页的集合和功能它包括)能够保持状态。相比之下,Flex应用程序,本质上是有状态的。一个Flex应用嵌入在一个HTML页面,该用户不离开,是由Flash Player的呈现。 Flex应用程序可以动态改变的显示页面,发送和检索数据异步在后台服务器,更新,但从来没有离开单一的应用程序接口(见图1)(类似于用JavaScript的XMLHttpRequest的API提供的功能。)
Figure 1. The client/server architecture. Flex applications can communicate with back-end servers using either direct socket connections or more commonly, through HTTP. The Flex framework has three remote procedure call APIs that communicate with a server over HTTP: HTTPService, WebService, and RemoteObject. All three wrap Flash Player's HTTP connectivity, which in turn, uses the browser's HTTP library. Flex applications cannot connect directly to a remote database. Flex应用程序可以与后端服务器通信,可以使用直接socket连接或更常见的服务器通过HTTP。 Flex框架有三个远程过程调用的API,通过HTTP与服务器通信:HTTPService,WebService,和RemoteObject。所有这三个包Flash播放器的HTTP连接,这反过来,使用浏览器的HTTP库。 Flex应用程序不能直接连接到远程数据库。
You use HTTPService to make HTTP requests to JSP or XML files, to RESTful web services, or to other server files that return text over HTTP. You specify the endpoint URL, listener functions (the callback functions to be invoked when the HTTPService request returns a successful or unsuccessful response), and a data type for the returned data (what type of data structure it should be translated into once received in the Flex application). You can specify the data to be handled as raw text and assigned to a String variable or converted to XML, E4X, or plain old ActionScript objects. If you get back JSON, you can use the Adobe Flex corelib package of classes to deserialize the JSON objects into ActionScript objects. To make calls to SOAP based web services, you can use the HTTPService API or the more specialized WebService API, which automatically handles the serialization and deserialization of SOAP formatted text to ActionScript data types and vice versa.
您可以使用HTTP服务,使HTTP请求到JSP或XML文件,以REST风格的Web服务,或到其他服务器上的文件通过HTTP返回文本。您指定的端点URL,监听功能(回调函数被调用时,HTTP服务请求返回成功或失败的反应),并为返回的数据(什么类型的数据结构应该成为一次收到的数据类型转换Flex应用程序)。您可以指定要处理的数据为原料文本和分配给一个字符串变量或转换到XML,E4X的,或普通的旧的ActionScript对象。如果你回来的JSON,您可以使用Adobe Flex的班corelib包反序列化到JSON对象的ActionScript对象。打电话到基于SOAP的Web服务,您可以使用HTTP API或更专门的WebService的API,它会自动处理的序列化和反序列化的SOAP格式的文本到ActionScript数据类型,反之亦然。
The third option for making remote procedure calls is to use the RemoteObject API. It makes a Flash Remoting request to a method of a server-side Java class that returns binary Action Message Format over HTTP. When possible, use Flash Remoting whose binary data transfer format enables applications to load data up to 10 times faster than with the more verbose, text-based formats such as XML, JSON, or SOAP (see Figure 2). To see a comparison of AMF to other text-based serialization technologies, see James Ward's Census RIA Benchmark application.
远程过程调用的第三种选择是使用RemoteObjectAPI。它使一个Flash Remoting的请求到一个服务器端Java类方法返回的二进制消息格式通过HTTP行动。如果可能,使用Flash Remoting的传输的二进制数据格式使应用程序来加载数据高达10倍的速度比更详细,如XML,JSON的,或SOAP基于文本的格式(参见图2)。要查看AMF的相对于其他基于文本序列化技术,
Figure 2. Methods for connecting Flex and Java.
发表评论
-
C/C++中的字符串
2012-07-06 09:51 1263getch函数 Head File # ... -
js 正则表达式2乱
2012-07-06 09:37 623js正则表达式详解[ ... -
游戏程序中的骨骼插件
2012-07-06 09:29 935如有转载,请详细标明原文作者,以示尊重! 作者:潘李亮 ... -
Chrome Safari Firefox 中 IFRAME 元素在文档树中发生变化后父子页面间的某些交互方式会失效
2012-07-05 20:44 769window 对象中的 frames 集合可以返回当前 w ... -
核心Swing组件(二)
2012-07-03 13:42 558Swing组件支持当光标停留在其上时显示简短的弹出信息 ... -
核心Swing组件(二)
2012-07-03 12:19 632Swing组件支持当光标停留在其上时显示简短的弹出信息 ... -
自定义网页滚动条
2012-07-02 10:16 554用户操作 [留言] [发消息] [加为好友] ... -
Three ways to set a custom busy cursor in flex
2012-07-02 10:16 669First, prepare your custom cu ... -
flex 事件触发篇
2012-07-02 10:16 755事件触发篇 完整代码 ... -
FLEX SPY的地址和示例
2012-07-02 10:16 713FLEXSPY 可以实时查看画面style,还可进行修改 ... -
תдQTPѧϰ
2012-07-02 09:42 622... -
myeclipse6.5+flex 3 + tomcat6.0 + ds-console.war环境搭建
2012-07-01 09:38 680安装环境:myeclipse6 ... -
Flex4+Spring3+Hibernate3+BlazeDS整合笔记
2012-07-01 09:37 642普通Java Web工程流行使用ssh框架,而当前台使用F ... -
PHP作为Flex程序的数据源
2012-07-01 09:37 550Adobe Flash Builder 4 简体中文正式版 ... -
“error LNK1169: 找到一个或多个多重定义的符号”的解决方法(转载)
2012-06-30 17:54 1219问题描述如下: 有 三个源文件,A.h、B.cpp ... -
关于oracle数据库启动报ORA-01122,ORA-01110,ORA-01203错误的解决方法
2012-06-30 17:54 14252关于oracle数据库 ... -
转:IE和Firefox的div高度自适应解决方法
2012-06-30 17:54 643IE中div的高度会根据内容来自适应高度。但是FIrefo ... -
安装tinyos中遇到的问题及解决方法_转载
2012-06-30 17:54 937问题1.安装rpm的时候出现unpacking of ar ... -
安装VS2003出现问题――Microsoft FrontPage 2000 Web 扩展客户端安装不成功 及其解决方法
2012-06-30 17:53 4290前言: 之前在公司安装VS2003的时候,没有出现过 ...
相关推荐
The Architecture of Open Source Applications(开源软件架构),其中包含了中文和英文版,整理之后免费分享给大家,中文版由图灵社区翻译http://www.ituring.com.cn/minibook/19 本书是开源应用的必读资料之一,介绍...
《The Architecture of Open Source Applications》 是一本新推出的采用“知识共享署名3.0 Unported”许可证的程序设计图书,每一章节讲述了一种开源程序的设计,如Scalable WebArchitecture andDistributed Systems...
是一本新推出的采用“知识共享署名3.0 Unported”许可证的程序设计图书,每一章节讲述了一种开源程序的设计,如Audacity、CMake、Eclipse、Hadoop分布式文件 系统、LLVM、Mercurial、NoSQL生态系统、Python ...
The Architecture of Open Source Applications epub版本
The Architecture of Open Source Applications卷1 mobi格式
讲开源软件架构的书。 Contents Introduction Amy Brown and Greg Wilson ix 1. Asterisk Russell Bryant 1 2. Audacity James Crook 15 3. The Bourne-Again Shell Chet Ramey 29 4. Berkeley DB Margo Seltzer ...
此为 (中文版) AOSA官网: http://aosabook.org/en/index.html "500 Lines or Less", the fourth volume the AOSA series 1.The Architecture of Open Source Applications (volume1)
It focuses on the function and design of the various components necessary to process information digitally. We present computing systems as a series of layers, starting with low-level hardware and ...
几十款经典开源软件的介绍,通过阅读该书,能够在架构意识上有较大提升
The Architecture of Open Source Applications卷2 mobi格式
The Architecture of Open Source Applications 1.pdf
The Architecture of Open Source Applications (Volume 2)_ GDB 工具书
The perception and planning performances are improved with the help of two inner loops of simultaneous localization and mapping. An algorithm to enlarge the detection range of the sensors is proposed...
The Architecture of the Java Virtual Machine Data Types Word Size The Class Loader Subsystem Loading, Linking and Initialization The Primordial Class Loader Class Loader Objects Name Spaces ...
After two chapters on XML basics, including XPath, XSL, DTDs, and XML Schema, the rest of the book focuses on using XML from your Java applications. This third edition of Java and XML covers all major...
The absence of adequate facilities to design, optimise and interoperate new networks currently forces a convergence to an architecture that is suboptimal for many applications and that cannot support...
一本介绍开源软件项目系统架构的好书。epub无损格式。
This book is primarily intended for beginners who wants to learn various aspects of software engineering and building web applications using Java programming language. There are many good books ...
Understand the role and responsibilities of a Privacy Engineer for maintaining your privacy architecture Table of Contents Part I. Getting Started Chapter 1. What Is Privacy? Chapter 2. Personal Data ...