Riia Technical Introduction

xiaoxiao2021-03-06  107

Riia Technical Introduction

--Rich Internet Applications

9/15/2004 Version1.0

1 RIA technology introduction ... 1

1.1 RIA production ... 1

1.2 RIA technology development history ... 2

1.2.1 representation of the development of layers ... 2

1.2.2 Tools, Standards and Models Development History ... 3

1.3 Existing RIA technology ... 4

2 JDNC. 5

2.1 Technical Structure ... 5

2.2 JDNC demonstration ... 6

3 flex technology ... 7

3.1 flex application ... 8

3.1.1 Flex Development Model ... 8

3.1.2flex and N layer model ... 8

3.1.3Flex deployment and management ... 8

3.2 Flex Product Overview ... 8

3.2.1 Flex Application Framework ... 9

3.2.2 MXML: Flex Markup Language ... 9

3.2.3 FLEX runtime service ... 9

1 RIA technology introduction

1.1 RIA production

Since the B / S architecture rapidly spread (this is very grateful to IE, IE's absolute market share determines that we can consider the difference between different browsers, especially for enterprise software), we have been Faced with such a question: How to do the exact control and a good user experience? Of course, a large number of DHTMLs and JavaScript we can achieve a representation of the C / S era, such as Bindows, but we need to pay more human resources than the C / S era to close the C / S client. Performance, this customer experience is not satisfactory, because the web model is a model based on the HTML page, which lacks client intelligence, so it is relatively simple things (such as online shopping). Moreover, it is almost unable to complete complex user interactions (such as traditional client / server applications, and user interactions in desktop applications). Such techniques make it difficult for a generation of web applications, high support costs, and cannot function in many ways.

In order to improve the user experience, a new type of Internet application has appeared. That is Rich Internet Applications. These applications combine the fast and interactive advantages of desktop applications, and the range of communication ranges from web applications and easily propagate. Rich Internet Applications simplifies and improves user interaction of web applications, thereby promoting investment income (ROI) growth. In this way, the application developed by the user can provide a richer, more interactive and responsive user experience.

1.2 RIA technology development history

Early RIA technology can consider OCX, including the Applet and Windows platforms of the Java platform (developed to the current ActiveX). These two technologies are implemented in the first limit browser security model, only limited access to desktop applications and data. If you want to provide more desktop integration, you must use a certificate to install the browser's digital certificate by the authority. This model is very troublesome. At the same time, Applet must support JVM, and most of our browsers we use do not support the latest JVM (JDK1.1.5 in IE), users want to run Applet

Also download and install JVM separately. ActiveX technology can only be used in IE, which limits the user to use the Windows platform. In order to overcome these problems, people have explored in-depth exploration.

1.2.1 Representation of the development of layers

There is a lot of limitations that use HTML to submit applications on the Web, which brings more and more setbacks to users and IT organizations. The pressure of technology and business has driven the emergence of new solutions, the new solution overcomes the limitations of HTML while maintaining a centralized deployment management model, and adds the richness and control of desktop applications. The benefits of a wonderful user experience

For most successful companies, it is critical to providing superior customer experience, and the rapid development of the Internet has increased the proportion of customer and partner online interaction. This means that online experience is replacing private interactions, this trend has increased. On the surface, this trend brings potential benefits due to reducing costs, but it is hard to say if the specific per company will benefit from it. This is because on the Internet, the cost of changing the product selection is very low, so the quality of the user experience has become an important factor in establishing and maintaining online customer relationships.

Wonderful user experience has always been the characteristics of most lead brands. If organizations understand the benefits of a wonderful user experience, they will focus on attracting and maintaining online customer relationships.

Wide range and richness

Our industry has experienced important transformations in several system architectures. In this process, the client's performance features have fallen. Figure 1 shows the changes in the application experience of each phase of the computing function, which starts from the mainframe to the emergence of Rich Internet Applications.

Figure 1: Development of RICH Internet Applications

Figure 1 shows the following changes in the client application:

2 Host-based applications - interactive applications developed by hosting (can be large computers or small computers). The business needs of this phase are promoted from the company's internal business automation, such as wage forms. The application is localized in the interior private network, and the richness of the user interface is limited to text.

2 Customer / Server Applications - Customer / Server Applications Developed very quickly, because we need to access information and applications within the corporate organization. Applications can still be accessed locally in the enterprise organization, but with the application of the graphical user interface and the application of the client processing, the application has greatly improved.

2 Web Application - WEB Application Global Application, and models based on host centralized management applications, solve the main limitations of the client / server model - but for users, this requires huge input. From the perspective of processing, the web application model transforms the client to a virtual terminal. The main interaction problem used to provide the best user experience disappeared. These major issues include direct control, client processing, and local storage.

As each enterprise organization recognizes that the Rich Internet Applications model produces significant business profits, improve productivity and reduced cost advantages, the development momentum of this model is getting more violent. These applications combine the fast and interactive advantages of desktop applications, and the range of communication ranges from web applications and easily propagate. The next step in the development of the system architecture is Rich Internet Applications, which maximizes extensive and richness.

1.2.2 Development of tools, standards and models

Although the prospect of Rich Internet Applications is attracted, the organizations of each enterprise require new technologies to be existing.

The field structure and processing process are suitable. New technologies must meet or exceed the following requirements:

 Provide a user-familiar programming model. Enterprise developers are familiar with the use of object-oriented languages ​​(such as Java or

C #) Develop business logic and backend, and use tagged languages ​​(such as JSP, ASP, and

CFML) Development of user interface. New products must be created based on existing models to make full use

Existing technologies and ensure low cost.

 Use the existing infrastructure. Many business organizations have made a lot of investment in server applications. According to major

Industry analysts' investigations: Most enterprise organizations will be used internally to use J2EE and .NET technology internally. Most corporate organizations also need to use and comply with this infrastructure.

 Use standard protocols and APIs. One of the many advantages of the Web is to use a wider standard in the entire technical stack.

quasi. These standards include, but are not limited to, industry standards such as HTML / HTTP, XML, SOAP / online service

, CSS, SVG, as well as J2EE and .NET, etc. Most corporate organizations should also follow

Keep the above criteria.

 Keep existing tools. For developers using representative layer solutions, key issues are capable of ensuring use

Some editors or integrated development environments (IDEs) to write applications. Developers want to take advantage of the main IDE (such as

Eclipse, Borland Jbuilder, JetBrains Intellij Idea, Microsoft Visual

Studio) and the main web application development products (such as Macromedia Dreamweaver MX)

To write code.

 Support the main design model. Enterprises Develop business development with design models when creating an application. in

Over the past few years, similar models - view - Controller (MVC) models in J2EE and .NET enterprise applications

The order development is increasingly common. Representation layer solution must adapt to these existing model-based architectures.

Due to architectural consistency and standard-based solutions, Rich Internet Applications has never been able to

Most enterprise applications developers. This situation has changed until now.

1.3 Existing RIA technology

With the advancement of technology, people have developed new RIA technology, including JDNC, Flex (MXML), XAML, XUL, JSF, etc.

2 These technologies have some common, including:

2 use ripe HTTP communication modes;

2 based on XML grammar and label language TAG technology;

2 rich desktop application integration;

2 Whenever the system is installed and maintained, the software is automatically upgraded.

MXML is a markup language that Macromedia has just launched this year is the basis of Flex technology. In the next generation of RELEASE MS next-generation operating system Longhorn, the next-generation operating system LONGHORN, will include XAML technology (XML Application Markup Language). MXML and XAML are based on XML-based user interface tag language, and there is also XUL (XML User Interface Language). In these techniques, only FLEX is applicable. XAML and XUL still have to wait and see.

JDNC (Java Desktop Network Component is a new Java community, based on Java technology big RIA technology, which can use the Java desktop side power to provide users with a perfect experience.

The content below this article will briefly introduce JDNC and FLEX technology. Both techniques may represent future RIA technology towards.

2 JDNC

2.1 Technical Structure

JDNC (JDESKTOP NetWork Components) https://jdnc.dev.java.net/ is an open source RIA implementation technology launched by the Java community. The current version is 0.6. A RIA application similar to JDNC is deployed in the Internet web server side, running in a customer's desktop operating system. The rendering of the interface and the user I / O operation are in the client, not the server. The UI-related information will not transmit the data in the user and server side as each request response is transmitted each time. This greatly reduces network traffic, reducing the computational power requirements of the server, and the client response speed is extraordinary. At the same time, JDNC uses Swing components that can provide users with a rich UI interface, which can be comparable to the C / S system. The following figure is the technical structure of JDNC:

Figure 2 JDNC technology structure

The bottom, JDNC still needs a JVM, which can be JRE or J2SDK, which is similar to Applet / Java Web Start. In fact, the most widely apparent application of JDNC is based on Java Web Start, and its boot script still requires JNLP (MIME protocol used by Java Web Start) to be implemented.

2 SWING EXTENS: JDNC is data-centric, and the Swing component is implemented in MVC mode. It is not completely Data-Centric, so JDNC is necessary to make a layer of extension on Swing, let RIA Program support data is centered on. This also saves the developer a lot of time because the data and UI bindings JDNC have been done for us. Swing Extension is the technical level to complete this feature

2 JDNC API: For ordinary web application developers, most of them are not familiar with SWING components. Swing Extension has made some packages for Swing, but basic grammar is still Swing programming languages, which is not enough for users, but also understands AWT and SWING programming knowledge. To this end, JDNC encapsulates a variety of common components on Swing, such as JTREE, JTABLE, JBUTTON, making them easier for the RIA application, these new components are in the org.jdesktop.jdnc package, such as Jxtable packaging The function of MVC, such as JTABLE and TABLEMODEL, and provides data binding functions for Table components. The JDNC API is a high-level package for Swing components for Web developers.

2 JDNC Markup Language: This scalable markup is also based on XML syntax, but it is more dedicated than XUL / XAML, which provides a custom TAG tag, similar to the TAG tag in JSP. Different from this TAG in JSP is that the JSP TAG is executed after the server is compiled by the JSP / Servlet container, generating a standard HTML page to output to the client browser for browser rendering. The JDNC marker language itself is an XML document or XML output stream (JNLP MIME type), which triggers Java Web Start in the client's browser, Java Web Start will analyze this JNLP file, see if there is legal JDNC access, if Yes, the JDNC API is triggered. Of course, JDNC not only supports Java Web START technology, but it can also be performed as an applet and a separate client program.

2.2 JDNC Demonstration

This section shows a simple RIA spreadsheet. This exemplary program only contains a JNLP file, a JDNC file, and a data source in a text format weather.txt. Here is this jnlp file SimpleTable.jnlp:

href = "demo / simpletable.jnlp">

JDNC Simple Table Demo </ Title></p> <p><vendor> Sun Microsystems, Inc </ vendor></p> <p><Homepage Href = "INDEX.HTML" /></p> <p><Description> Demo </ description></p> <p></ information></p> <p><resources></p> <p><J2se Version = "1.4 " /></p> <p><jar href = "jdnc-runner.jar" /></p> <p><extension name = "JDNC Runtime Libraries" href = "jdnc-runtime.jnlp" /></p> <p></ resources></p> <p><Application-Desc Main-Class = "Org.jdesktop.jdnc.Runner.Application"></p> <p><argument> http://javadesktop.org:80/jdnc/0_5/demo/simpletable.jdnc </ argument></p> <p></ application-desc></p> <p></ jnlp></p> <p>This file is a standard Java Web Start application tag file. First, it is worth noting that the standard execution environment for the specified JDNC API is required in <resources />: The execution entry is the JDNC-Runner.jar, and the JDNC's extended running environment is defined in the jdnc-runtime.jnlp file. Second, the execution class of JDNC in <application-desc /> is org.jdesktop.jdnc.runner.Application, the JDNC file specified in <argument /> must be absolute address.</p> <p>Here is a SimpleTable.jdnc file, which is very simple:</p> <p><? XML Version = '1.0'?></p> <p><OM: Resource XMLns: = "http://www.openmarkup.net/2004/05/Om"</p> <p>XMLns = "http://www.jdesktop.org/2004/05/jdnc"></p> <p><table></p> <p><TabularData Source = "Weather.txt" /></p> <p></ table></p> <p></ om: resource></p> <p><om: resource /> is a dedicated root element for the JDNC tag file. The <Table /> element here indicates that only one table (org.jdesktop.swing.jxtable type) is included in this RIA application, and the data source used is a two-dimensional format text file "Weather.txt". The following figure is the running result of the RIA application:</p> <p>Figure 3 Simple JDNC Application Example</p> <p>JDNC is a practical mature technology. Its main problem is that JNLP files and JDNC files must also use a normal text editor, without an integrated IDE environment automatically generated, which is compared to flex comparison Weak place. However, considering its open source nature and its natural integration characteristics of Java, it will occupy an important position in the future RIA technology.</p> <p>3 flex technology</p> <p>This chapter first said that Flex is not good, because the content behind is not my point of view.</p> <p>The main problem is that it is the proprietary product of Macromedia, which is very expensive, and a deployment server is 12000 $ / CPU. It is not an open source technology, and has not been widely recognized by the industry. However, with the advantage of Macromedia in web development and flash technology, it is likely that Flex will be recognized by multi-organizational institutions. In http://january.r.com/flash website, there is a RIA application demonstration made by Macromedia-based Flash technology, which is very attractive.</p> <p>Note: Chapter 3 The content is all referenced from the Flex technology white paper. This article is the company's internal reference, everyone should not think that I am plagiarism :)</p> <p>Macromedia Flex Presentation Server is a new Macromedia product that meets the needs of some IT developers. They want to develop an app that has both the response and richness of the desktop application, and has a wide range of web propagation - ie RICH Internet Applications. FlexPresentation Server resides in the organization's N-layer application model representation layer, which uses executable code running on the client as a supplement to the current generation HTML. Flex has standard, user familiar with programming methods and workflows, and powerful class libraries can create representations, providing a more efficient, more real end user experience.</p> <p>3.1 Flex application</p> <p>The main difference between Flex applications and traditional HTML applications is that Flex applications are best suited for client operation, such as field check, data format, classification, filtering, tooltip, synthetic video, behavior, and effects. Flex enables developers to better deliver applications, which allows users to react quickly, smooth transitions in different states and display, and provide no interrupting continuous workflows.</p> <p>3.1.1 Flex Development Model</p> <p>The Flex Development Model is not stranger for developers using JSP, ASP / ASP.NET, or other similar scripting languages. The basic model is the same: establish a text file containing the application source code, then deploy this file to the server; when receiving the first request, compiling this source code into an application, follow-up, please pass Cache processing. Unlike the HTML page that is sent to the UI, the Flex PresentationServer sends a rich client user interface that can be run on a universal Flash Player virtual machine. When necessary, the Flex application exchanges with the server to respond to the operation of the end user on the client. Flex developers use extended UI component libraries to define user interfaces based on XML tags, using the object-oriented scripting language (ActionScript) to handle program logic.</p> <p>3.1.2flex and N layer model</p> <p>In addition to adding on the existing representation, Flex does not need to make any changes to the current business layer with the integrated layer. Flex Presentation Server is running within the application server and provides integration and management capabilities for Flex applications. The ability of Flex integration can easily use existing code and information through Web services, Java objects or XML. Flex can also be integrated with some existing representations and frame structures such as JSP and Struts. 3.1.3Flex deployment and management</p> <p>Deploying a Flex server on the J2EE platform is very simple because Flex is a local Java application. Deploying a Flex application on the J2EE platform is processed through the Java Web file (WAR) file. From a management perspective, the Flex XML scheme and file-based application models mean that Flex applications can be easily integrated with existing management tools and application lifecycle tools. When executed in the Flash Player, the Flex application can interact with the server side, which includes Java objects, SOAP Web services, and other server-side services.</p> <p>3.2 Flex Product Overview</p> <p>Figure 2 shows the basic architecture of the Flex Presentation Server. The Flex Presentation Server is deployed on an existing Java application server in an existing Java application server in an existing Java application server in a .war file format (a .NET release version).</p> <p>3.2.1 Flex Application Framework</p> <p>As shown in Figure 2, the Flex application framework consists of MXML, ActionScript 2.0, and Flex class libraries. Developers write Flex applications with MXML and ActionScript 2.0. Using MXML Define Application User Interface Elements, use ActionScript 2.0 to define customer logic and program control. The Flex class library includes Flex components, managers, and behaviors. With the development model based on the Flex component, developers can add pre-built components in the program, create new components, or add pre-built components to composite components.</p> <p>3.2.2 MXML: Flex Markup</p> <p>MXML and HTML are the same mark language, which describes the user interface that reflects the content and functionality. Unlike HTML, MXML can provide a declaration abstraction to the representation layer logic with user interface and server-side data binding. MXML can completely separate the problem with business logic to achieve the maximum extent to increase the productivity of the developer and the repetition rate of the application.</p> <p>The development basis for MXML is the same as other types of web applications such as HTML, JSP, ASP, and ColdFusion tag language (CFML). Developing a MXML application is as simple as opening a file editor, just enter some tags, save the file, and then open the file URL on the web browser.</p> <p>Figure 4: Flex Architecture</p> <p>3.2.3 FLEX Runtime Service</p> <p>Flex Presentation Server includes a set of services: compilation and cache, business resource integration, and deployment of the RICH Internet Applications, etc. All FLEX services reduce redundancy and make full use of existing enterprise resources. For example, the server-side application logic, verification, and session management are provided by integrating with basic Java platforms, rather than introducing redundant service layers. Flex complements each other with Java and other prior art, which is a pure native application on the Java application server, which is integrated with platforms for web services, data, and application integration, security, and other resources. Flex supports the following Java application servers:</p> <p>l IBM WebSphere</p> <p>l bea weblogic</p> <p>l Macromedia Jrun</p> <p>l Apache Tomcat Servlet Container</p> <p>The Flex application compiles a timely model and does not generate an interrupt of any user experience. The Flex application compiles for the first time, then caches the time to call; if any relevant file is updated, the Flex application will automatically recompile.</p> <p>Related services integrated with Flex include:</p> <p>The server-side Web service agent, which extends the local Flash model through a Web service other than the domain supporting the application.</p> <p>Server-end Java object access, available for applications, data, and directory integration. Sharing session support, Flex application sessions can be shared in HTML and Flash applications.</p> <p>Support verification, used for J2EE and single sign-on service. Flash Player detects and updates services, detects and selectively upgrade Flash Player installation -</p> <p>The client device configuration uses the "Lock" policy, which is a key requirement. (FLEX requires FlashPlayer 7 to use its security and performance characteristics.)</p> <p>Delay instantiation installation, as required or downloaded in the developer, not simultaneous loading, provides several runtime options to save boot time.</p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-100669.html</div><div class="plugin d-flex justify-content-center mt-3"></div><hr><div class="row"><div class="col-lg-12 text-muted mt-2"><i class="icon-tags mr-2"></i><span class="badge border border-secondary mr-2"><h2 class="h6 mb-0 small"><a class="text-secondary" href="tag-2.html">9cbs</a></h2></span></div></div></div></div><div class="card card-postlist border-white shadow"><div class="card-body"><div class="card-title"><div class="d-flex justify-content-between"><div><b>New Post</b>(<span class="posts">0</span>) </div><div></div></div></div><ul class="postlist list-unstyled"> </ul></div></div><div class="d-none threadlist"><input type="checkbox" name="modtid" value="100669" checked /></div></div></div></div></div><footer class="text-muted small bg-dark py-4 mt-3" id="footer"><div class="container"><div class="row"><div class="col">CopyRight © 2020 All Rights Reserved </div><div class="col text-right">Processed: <b>0.047</b>, SQL: <b>9</b></div></div></div></footer><script src="./lang/en-us/lang.js?2.2.0"></script><script src="view/js/jquery.min.js?2.2.0"></script><script src="view/js/popper.min.js?2.2.0"></script><script src="view/js/bootstrap.min.js?2.2.0"></script><script src="view/js/xiuno.js?2.2.0"></script><script src="view/js/bootstrap-plugin.js?2.2.0"></script><script src="view/js/async.min.js?2.2.0"></script><script src="view/js/form.js?2.2.0"></script><script> var debug = DEBUG = 0; var url_rewrite_on = 1; var url_path = './'; var forumarr = {"1":"Tech"}; var fid = 1; var uid = 0; var gid = 0; xn.options.water_image_url = 'view/img/water-small.png'; </script><script src="view/js/wellcms.js?2.2.0"></script><a class="scroll-to-top rounded" href="javascript:void(0);"><i class="icon-angle-up"></i></a><a class="scroll-to-bottom rounded" href="javascript:void(0);" style="display: inline;"><i class="icon-angle-down"></i></a></body></html><script> var forum_url = 'list-1.html'; var safe_token = 'f0Cwkxekzbyg9qS_2Fc_2BGfX_2F2_2Fmm5TDG3WPOJo23g16tatNXqkhA6kezRyrQH0_2BnvUouEpsc8EutLWEdCG'; var body = $('body'); body.on('submit', '#form', function() { var jthis = $(this); var jsubmit = jthis.find('#submit'); jthis.reset(); jsubmit.button('loading'); var postdata = jthis.serializeObject(); $.xpost(jthis.attr('action'), postdata, function(code, message) { if(code == 0) { location.reload(); } else { $.alert(message); jsubmit.button('reset'); } }); return false; }); function resize_image() { var jmessagelist = $('div.message'); var first_width = jmessagelist.width(); jmessagelist.each(function() { var jdiv = $(this); var maxwidth = jdiv.attr('isfirst') ? first_width : jdiv.width(); var jmessage_width = Math.min(jdiv.width(), maxwidth); jdiv.find('img, embed, iframe, video').each(function() { var jimg = $(this); var img_width = this.org_width; var img_height = this.org_height; if(!img_width) { var img_width = jimg.attr('width'); var img_height = jimg.attr('height'); this.org_width = img_width; this.org_height = img_height; } if(img_width > jmessage_width) { if(this.tagName == 'IMG') { jimg.width(jmessage_width); jimg.css('height', 'auto'); jimg.css('cursor', 'pointer'); jimg.on('click', function() { }); } else { jimg.width(jmessage_width); var height = (img_height / img_width) * jimg.width(); jimg.height(height); } } }); }); } function resize_table() { $('div.message').each(function() { var jdiv = $(this); jdiv.find('table').addClass('table').wrap('<div class="table-responsive"></div>'); }); } $(function() { resize_image(); resize_table(); $(window).on('resize', resize_image); }); var jmessage = $('#message'); jmessage.on('focus', function() {if(jmessage.t) { clearTimeout(jmessage.t); jmessage.t = null; } jmessage.css('height', '6rem'); }); jmessage.on('blur', function() {jmessage.t = setTimeout(function() { jmessage.css('height', '2.5rem');}, 1000); }); $('#nav li[data-active="fid-1"]').addClass('active'); </script>