facado v3.1 release notes

Upload: vaibhav-dayanand-natekar

Post on 19-Jul-2015

46 views

Category:

Documents


0 download

TRANSCRIPT

ARAHE SOLUTIONS SDN BHD

Faado Version 3.1 Release Notes

Arahe Solutions Sdn Bhd Suite B-09-01, Plaza Mont Kiara 2, Jalan Kiara, Mont Kiara 50480 Kuala Lumpur Malaysia Phone +603-6201-8315 Fax +603-6201-8325 Kuala Lumpur Chengdu Shanghai

Table of Contents1 1.1. 1.2. 1.3. 1.4. 2 INTRODUCTION................................................................................................................... 5 PURPOSE ............................................................................................................................... 5 INTENDED AUDIENCE .......................................................................................................... 5 GLOSSARY ............................................................................................................................ 5 REFERENCES ........................................................................................................................ 5 FAADO VERSION 3.1 ........................................................................................................ 6 COMPRESSION MODE .......................................................................................................... 6 COMPRESSION ...................................................................................................................... 6 XML COMPRESSION........................................................................................................... 6 CLASS FILE COMPRESSION ................................................................................................. 6 SPLASH SCREEN ................................................................................................................... 7 THREAD BOUNDED HTTPSERVLETREQUEST ..................................................................... 8 PROXY MANGER FOR CLIENT ............................................................................................. 8 NON-BLOCKING TASKS ....................................................................................................... 9 INTEGRATION WITH SPRING FRAMEWORK ....................................................................... 9 BUG FIX .............................................................................................................................. 10

2.1. 2.2. 2.2.1. 2.2.2. 2.3. 2.4. 2.5. 2.5.1. 2.6. 2.7.

Table of FiguresFigure 1 : Sample Splash Screen 7

Document ControlDocument Revision History Version0.1 0.2

ModificationsDocument creation Document Updateth

Date28 January 2008 rd 3 April 2008

AuthorLeslie Tan Koh Joey Joo

Arahe Solutions

Faado

1

Introduction

This document provides an understanding of the features and functionalities of the Faado in the new release version.

1.1. PurposeThis document is intended for use as a formal write-up for the Faado features. It contains both textual and screen shots illustration of the system. The intention for this document is to: Provide information on how to use the new features and functionalities. Provide a basis for translating the users requirements into actual functionality for the system.

1.2. Intended AudienceThis document is intended for the following group of people: For the developers of Arahe, customers and partner to know how to implement the new features and functionalities..

1.3. GlossaryThis section provides the definitions of all terms, acronyms, and abbreviations required to properly interpret in this document. Acronyms / Abbreviations Definitions of all terms

1.4. ReferencesThis section provides a complete list of all documents, books and World Wide Web (WWW) referenced in the User Requirements doc. It also includes those documents provided by the customers.

Confidential

Page 5 of 10

2

Faado Version 3.1

This section describes the new features and functionalities of Faado V3.1. 2.1. Compression Mode The previous version of Faado only supports 1 way compression, which is from server to client, and, the compression only available when developer enables the compression. The new version of Faado will enable the compression by default and now it support 2 way compression. Developer is not required to do anything unless they want to disable the compression. Below show the example of how to disable the compression on the default server proxy setting:NEProxySettings settings = NEServerProxy.getInstance().getDefaultSettings(); settings.setCompressionEnabled(false);

2.2. CompressionA new compression filter has been added to new release of Faado. Developer can use this filter to compress any content on the fly before send back to the client. You are required to add the filter in the web.xml files. Below is an example how you can enable the compression. GZip facado.server.AEGZIPFilter cacheSize 2000 GZip *.xml

You can set the cache size in the init-param on the filter configuration with the parameter name cacheSize. If you want to compress any dynamic content, you are recommended to set the cacheSize to 0 so that the filter will not cache the content.

2.2.1.

XML Compression

XML files are highly compressible content and Faado application leverage a lot on the XML files. It is a good idea if XML content is compressed before send out to the client. This will help a lot on saving the bandwidth and increase the performance of the system. XML compression can be done using the example above.

2.2.2.

Class file Compression

Class files are another type of files that can be highly compressed. Enable the class file compression can save a lot of bandwidth for the network and increase the loading time. Below is the example of the configuration to do Class file compression. GZip facado.server.AEGZIPFilter cacheSize 2000 GZip *.class

2.3. Splash Screen In the new version of Faado, there is a new splash screen provided that we be displayed while the application is starting up. The new splash screen can be configured using XML. To use the new splash screen, you have to use the mesg tag to specify the XML file to be used. Below is an example on how to use the new splash screen.

Figure 1 : Sample Splash Screen

2.4. Thread bounded HttpServletRequest With the new Faado, developer is not required to specify the special parameter in the server proxy to get the HttpServletRequest and HttpServletSession. It also save a lot of work and reduce human error for passing HttpRequest around the codes. To get the HttpServletRequest, just call the getHttpServletRequest() method in the facado.server.AERequestHolder class. Below is an example of using the AERequestHolder:import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import facado.server.AERequestHolder; public class ServerCallImpl implements ServerCall { public void testMe(int param) { HttpServletRequest request = AERequestHolder.getHttpServletRequest(); //do something with the request HttpSession session = request.getSession(); //do something with the session } }

2.5. Proxy Manger for Client New release of Faado provides the factory class for getting the proxy class for the manager class. The proxy class helps to encapsulate the process of doing remote invocation and avoid hard coding of server class name. Below is an example: Configure the proxy name resolver. The resolver is used to resolve the actual name that used in the server. (One time configuration)public class NameResolver implements AEIProxyNameResolver { public String resolveName(String className, int type) { //Assume that all implementation classes having suffix Impl return className + "Impl"; } }

In the beginning of your application,//Setting up the default server proxy settings NEProxySettings settings = NEServerProxy.getInstance().getDefaultSettings(); settings.setServerResourceType(NEProxySettings.TYPE_RES_JAVA_SINGLETON); settings.setCommType(NEProxySettings.TYPE_COMM_SER); //Configure the name resolver AEServerProxyFactory.setNameResolver(new NameResolver());

Create an interface for define the manager class in the server.public interface ServerCall { public void testMe(int param); }

Create the implementation class.public class ServerCallImpl implements ServerCall { public void testMe(int param) { System.out.println("Test me, my number is " + param); } }

In the client application, you can do the following to invoke the server class.try {

ServerCall serverCall = (ServerCall)AEServerProxyFactory.getServerProxy(ServerCall.class); serverCall.testMe(123); } catch (Exception ex) { ex.printStackTrace(); }

2.5.1.

Non-blocking tasks

One issue that always face by the developer and the system support is when the application is running a long run task (task which take time to complete), the application will be stall and not repaint properly. Normal user will think that the system is hanged or down due to lack of information feedback to the user. New version of Faado provides a convenient class for developer to handle long run task. A small modal dialog will show in the center of the screen to inform user that the system is running and request user to wait. Below is the sample screen of the waiting dialog.

Below is an example to run a long run task in the client application.try { final ServerCall serverCall = (ServerCall)AEServerProxyFactory.getServerProxy(ServerCall.class); AETaskExecutor.invoke(new Runnable() { public void run() { serverCall.testMe(12345); } }); } catch (Exception ex) { ex.printStackTrace(); }

You also can change the background image and the message of the waiting dialog by setting the background image and message property in the AETaskExecutor class.

2.6. Integration with Spring Framework The new version of Faado is able to integrate with Spring Framework to create a highly configurable and maintainable solution. To invoke any bean in the Spring OIC container, you need to configure the Spring Framework application context and the web.xml. Below is an example of web.xml configuration. Please refer to Spring Framework documentation for detailed information. contextConfigLocation /WEB-INF/applicationContext.xml org.springframework.web.context.ContextLoaderListener

To invoke the Spring OIC containers bean by default, you need to do the following:NEProxySettings settings = NEServerProxy.getInstance().getDefaultSettings(); settings.setServerResourceType(NEProxySettings.TYPE_RES_JAVA_SPRING);

2.7. Bug Fix Currently the tree component in Faado (Taaxi) is a very heavy weight component and will having performance issue when the tree node is many. We will replace the Taaxi with Swing tree so that it will have better look and feel as well as increase the performance. An adapter is required to read the current taaxi XML and construct the Swing tree without recoding everything.