Advances in Information Science and Applications - Volume II

Integrated Development Environment for Remote Application Platform Rap – A Case study Sagaya Aurelia1, Xavier Patrick Kishore, Omer Saleh

Abstract-An integrated development environment (IDE) (also known as integrated design environment, integrated debugging II. INTEGRATED DEVELOPMENT ENVIRONMENT environment or interactive development environment) is a IDE isan integrated development environment, the handy, application that provides comprehensive facilities to computer dandy piece of software that acts as text editor, debugger and programmers for . Eclipse is a community for compiler all in one sometimes-bloated but generally useful individuals and organizations who wish to collaborate on open source package [11]. Most common features, such as debugging, software. version control and data structure browsing, help a developer Eclipse Remote Application Platform (RAP 2.1.0M2) is a quickly execute actions without switching to other framework for modular business applications that can be accessed applications. Thus, IDE helps maximize productivity by from different types of clients including web browsers, rich clients, providing similar user interfaces (UI) for related components and mobile devices. This paper reviews and analysis Eclipse RAP and reduces the time taken to learn the language. An IDE and its features. supports single or multiple languages [12]. Keywords-- IDE; Eclipse; RAP; RWT Selecting a good IDE is based on factors, such as language support, operating system (OS) needs and costs associated I. INTRODUCTION with using the IDE etc. Visual Studio, Delphi, JBuilder, Nintegrated development environment (IDE) is a FrontPage and DreamWeaver are all examples of IDEs. There A programming environment that has been packaged as an are so many features an IDE can contain that the following list application program, typically consisting of a code editor, a contains only a selected few[9]. compiler, a debugger, and a graphical user interface builder. A. Code completion or code insight: The ability of an IDE to The IDE may be a standalone application or may be included know a language’s keywords and function names is as part of one or more existing and compatible applications. crucial. The IDE may use this knowledge to do such Eclipse projects are focused on building an open development things as highlight typographic errors, suggest a list of platform comprised of extensible frameworks, tools and available functions based on the appropriate situation, or runtimes for building, deploying and managing software offer a function’s definition from ` official across the lifecycle. In general, the Eclipse provides four documentation. services 1) IT Infrastructure, 2) IP Management,3) B. Resource management:When creating applications, , and 4) Development Process Ecosystem Development. languages often rely on certain resources, like library or Eclipse Remote Application Platform (RAP) provides a header files, to be at specific locations. IDEs should be powerful, multi-platform widget toolkit with SWT API that able enables developers to write applications entirely in and re-use the same code on different platforms. The paper proceeds as follows in section 2, we will present about IDE. In Section 3, we will present Eclipse IDE. We follow in Section 4 with Eclipse RAP its architecture, life cycle phase, protocols how it works as a server and for embedded system. Finally suggestions along with conclusions are stated in section 5. Fig. 1 The role of IDE in development stage [19] .

C. To manage these resources. An IDE should be aware of F. A. Dr. Omer Saleh, Department of Computer Science, Faculty of any required resources so that errors can be spotted at the Education, Beniwalid, Libya ([email protected]) development stage and not later, in the compile or build S. B. Xavier Patrick Kishore, Department of Computer Science, Faculty of Education, Beniwalid, Libya ([email protected]) stage. T. C. P. Sagaya Aurelia1, Department of Computer Science, Faculty of Education, Beniwalid, Libya,([email protected])

ISBN: 978-1-61804-237-8 505 Advances in Information Science and Applications - Volume II

D. Access Databases: To help connect Java applications to OSGi is a specification which describes a modular databases IDEs can access different databases and query approach for Java application. Equinox is one implementation data contained within them. of OSGi and is used by the Eclipse platform. The Equinox runtime provides the necessary framework to run a modular E. Optimization: As Java applications become more Eclipse application. complex, speed and efficiency become more important. Profilers built into the IDE can highlight areas where the SWT is the standard user interface component library Java code could be improved. used by Eclipse. JFace provides some convenient APIs on top of SWT. The workbench provides the framework for the F. Project management: This can be twofold. First, many application. The workbench is responsible for displaying all IDEs have documentation tools that either automate the other UI components. entry of developer comments, or may actually force developers to write comments in different areas. Second, On top of these base components, the Eclipse IDE adds simply by having a visual presentation of resources, it components which are important for an IDE application, for should be a lot easier to know how an application is laid example the Java Development Tools (JDT) or version control out as opposed to traversing the file system for arcane support (EGit). files in the file system. On top of these base components, the Eclipse IDE adds components which are important for an IDE application, for III. ECLIPSE –IDE example the Java Development Tools (JDT) or version control Eclipse is a universal platform for integrating support (EGit). development tools.Eclipse is the free and open-source editor upon which many development frameworks are based. The Eclipse 4 has a different programming model then Eclipse overview of Eclipse is shown in figure 2. Eclipse began as a 3.x. Eclipse 4 provides the 3.x Compatibility Layer component Java development environment and has greatly expanded which maps the 3.x API to the 4.0 API. This allows Eclipse through a system of lightweight plugins. Eclipse is created by 3.x based components to run unmodified on Eclipse 4. an Open Source community and is used in several different Eclipse based applications which are not primarily used as areas, e.g. as a development environment for Java or Android software development tools are called Eclipse RCP applications. The Eclipse Open Source community has over applications. An Eclipse 4 RCP application typically uses the 200 Open Source projects covering different aspects of base components of the Eclipse platform and adds additional software development [10]. application specific components. The Eclipse ++ can be extended with additional software The programming model of OSGi (Equinox) allows you components. Eclipse calls this software components plug-ins. to define dynamic software components, i.e. OSGi services, Several Open Source projects and companies have extended which can also be part of an Eclipse based application. the Eclipse IDE[18]. The extended overview of eclipse is shown in figure 2.

Fig. 3 Eclipse based application [20]

Fig. 2. Overview of eclipse [10]

IV. ECLIPSE BASED APPLICATIONS [20] An Eclipse application consists of individual software components as shown in figure 3 and 4. The Eclipse IDE can be viewed as a special Eclipse application with the focus on supporting software development. Fig. 4. Eclipse based application [20] The components of the Eclipse IDE are primarily the following. Please note that the graph should display the concept, the displayed relationship is not 100 % accurate.

ISBN: 978-1-61804-237-8 506 Advances in Information Science and Applications - Volume II

V. THE ECLIPSE PLATFORM PROVIDES A TOOL INTEGRATION applications that need both desktop-based and web-based front FRAMEWORK [8] ends. The Eclipse Platform reduces the cost of tool integration by providing a large number of services, APIs, and VII. RAP ARCHITECTURE frameworks that enable effective and scalable tool integration. RAP is to the web as RCP to the desktop. It inherits all the Wherever possible, Eclipse uses open standards to limit tool goodness from RCP such as workbench extension points vendor investment and reduce time to market. The Platform model, event-driven SWT/JFace APIs, and componentized provides a focal point for integrating and configuring best-of- OSGi design. As indicated in figure 8 (a), the only difference breed tools in a manner that best fits the end user's between the architecture of RAP and that of RCP is the development process and Web application architecture. The implementation of SWT/RWT. RWT is actually a bundle Eclipse Workbench provides a central integration point for providing web-specific implementation of SWT’s widgets project control and an integration mechanism for resource- based on the qooxdoo toolkit. In RAP, almost no SWT API is specific tools. The Eclipse Platform can also provide services changed [15]. common to different tools including user interface frameworks, managing relationships between components, component version management, and publishing services. Using Eclipse simplifies tool integration by allowing tools to integrate with the platform instead of each other. This significantly reduces the number of integration problems that must be solved, and provides a more consistent environment for the end user[8]. Fig. 6. RAP is a MultiuserFig. 7. Sharing Projects The eclipse IDE consists primarily of plug-ins built on the Eclipse base. A typical development system has more than shown here. Building a non –IDE application on Eclipse is a matter of adding Application specific plug-ins as shown in figure 5. Developers ultimately gain a plug-in architecture and a common graphical interface.

Fig.8 (a) RAP ArchitectureFig. 8 (b) Architecture of RAP in VI. ECLIPSE RAP REMOTE APPLICATION PLATFORM Server Centric Framework The Remote Application Platform (RAP) formerly Rich Ajax Platform is a framework for modular business applications that can be accessed from different types of clients including web browsers, rich clients, and mobile devices as shown in figure 6. It provides a powerful, multi-platform widget toolkit with SWT API that enables developers to write applications entirely in Java and re-use the same code on different Fig. 9 a). Fragments platforms. It enables developers to build rich user interfaces using the Eclipse tools and common APIs [4]. Regardless of the client platform, RAP applications run on a server that communicates with its clients over HTTP.

Fig. 9 b). Delegation As indicated in figure 8(b), in a server-centric framework, the application is hosted on the application server and all processing is done on the server. The client browser is only Fig. 5 Plugin of Eclipse IDE and Non IDE Eclipse based used for data presentation. Consequently, it leaves small application. [1] footprints on browsers: it waits for instructions from the server to create corresponding widgets on demand [15]. It can be considered a counterpart for web development to the Rich Client Platform (RCP). RAP encourages sharing When the data has to be shared fragments are added to the source code between RCP and RAP applications as shown in shared codes. Fragments are a sort of patches as shown in figure 7 to reduce the development effort for business figure 9a. The concepts of fragments are used both in RCP and RAP. Some of the fragment properties are fragment id,

ISBN: 978-1-61804-237-8 507 Advances in Information Science and Applications - Volume II version, name, provider and the class path and the host plugin b) Read Data :Reading request parameters and applying the also has properties as plug-in ID, minimum and maximum contained status information to the corresponding version. Fig. 9b shows the delegation process where after the widgets. As an example, if a user has entered some fragment process it is bundled together. characters into a Text control, the characters are transmitted and applied to the text attribute of the Text Like building a RCP application, building a RAP instance. application is a process of building plug-ins and bundles: On the UI side, contributing widget plug-ins; On the server side, c) Process Action : Events are processed which trigger user since it is powered by server-side Equinox, contributing actions. As an example, when a Button has been pushed, the servlet plug-ins. Unsurprisingly, it also inherits the benefits of Selection Listeners attached to the Button are called. any OSGi application such as dynamically adding/removing Render: JavaScript code is generated for the response that bundles[15]. As shown in the below figure eclipse rap works applies the state changes to the client. Only those as server figure 10 and also for embedded system as shown in figure 11. It provides a complete target platform based onEquinox, including subsets of SWT, JFace, and Workbench APIs. With the RAP OSGi integration, they can be composed ofmodules and

Fig 10. Eclipse RAP as server

Fig . 12 RWT Architecture[17]

Fig. 11 Eclipse RAP for embedded system using the OSGi service model. The core library can also be used in traditional web applications without OSGi [16]. Applications or components (coming in the form of bundles for deployment) can be remotely installed, started, stopped, updated, and uninstalled without requiring a reboot; Fig. 13. RWT Life Cycle Phases management of Java packages/classes is specified in great detail. Application life cycle management (start, stop, install, etc.) is done via APIs that allow for remote downloading[14]. Thedefaultwebclientuses JavaScripttorendertheUIinthe browser.

VIII. ECLIPSE RAP CONSIST OF [1]

1. Widget Toolkit With RAP, you don't create UIs with HTML and browser Fig. 14Creating your own renderer [3] technologies, but with the Java API of SWT, the widget toolkitused in Eclipse. The RAP Widget Toolkit (RWT) provides a comprehensive set of powerful SWT widgets, also including layout managers and event listeners. RWT architecture is shown in figure 12. 1.1 The RWT Lifecycle Phases[5] The phases are: as follows and shown in figure 13 a) Prepare UI Root: Responsible for invoking entry points.

ISBN: 978-1-61804-237-8 508 Advances in Information Science and Applications - Volume II

Fig. 15Renderers for different platform • RAP applications can be deployed directly as OSGi widget attributes that were changed during the processing of bundles the current request are being rendered. This results in a • The JEE compatibility mode in RAP makes it minimal amount of data that needs to be transferred to the possible to use clustering client.The widget tree is not manipulated in this phase • Equinox Security Integration ensures your data is anymore. safe at all times. User can create their own desired as shown in figure 14 4. SingleSourcing and sample renderers for different platforms are shown in RAP allows toaddress different platforms with a shared figure 15. code base. Applications can be developed for the desktop, the 2. Cross Platform[2] web browser, and even mobile clients without duplicating code. Due to RAP's high compatibility with the Eclipse UI The default RAP Web client supports these browsers: technologies, a lot of existing code targeted at the desktop can • Internet Explorer 7+ be re-used for the user’s web application with minimal • Google Chrome 7+ changes. • Firefox 3.5+ Typical scenarios are: • Safari 4+ • • Opera 10+ Porting an existing SWT/RCP application to the web. • • iOs 5+ Developing a new application that can run on the desktop and in the browser. • Android 3 (Limited) • Re-using existing libraries developed for previous No browser plug-ins is required by the default client, only applications. JavaScript needs to be enabled. However, custom widgets are • Utilize RCP-compatible open source libraries and free to build on any third-party API. Support on mobile frameworks. Open Source browsers has some limitations. Other platforms can be supported by alternative RAP clients connecting to RAP's Notable Additional Features[2] open protocol. • Client Class and Client Services 2.1RAP Protocol [2] All features specific to the RAP client (which is The term RAP Protocol is used to describe the JSON- exchangeable as of RAP 2.0) are handled by the client class based message format used in the HTTP communication and the client services. This includes support for browser between a RAP client and a RAP server. This protocol was history, JavaScript execution and retrieving the clients time introduced in RAP 1.5 to replace the plain JavaScript zone offset. responses that have been used in previous releases. As of RAP • HTTP File Upload 2.0, the entire communication between client and server uses this protocol. The idea of the RAP Protocol is to fully Unlike SWT, RWT cannot simply access the user's file decouple RAP server and RAP client with the intention of system and read data from it. As an alternative, the File making the client exchangeable. At this point of development, Upload widget can be used. The widget looks like a button, the most interesting use cases have been RAP clients for but when clicked will open the file picker dialog of the user's mobile devices (Android and iOS), written in the client's browser. After a file has been selected, it can native language. As a consequence, all logic that is specific to programmatically be send to any HTTP server. the default RAP client has been moved from the server to the • Fixed Columns client. It is possible in RWT to exclude some columns from Tree The protocol does not only enable clients in other or Table from scrolling. programming languages, it also opens the door to a new class • Multi-User Environment of applications – applications that need to address a wide range of hardware from desktops to specialized devices (e.g. RAP operates in a multi-user environment and provides mobile data entry or point of sales solutions). Or applications some additional API that helps dealing with the consequences. that require integration with attached hardware devices. We Notable Limitations think that this is a major new achievement for RAP warranting Notable Limitations[2] a major release – and a feature that sets RAP apart from other • frameworks[6]. Few Unimplemented Features • Unimplemented Widgets such as StyledText, 3. Integration Tracker, TaskBar, Tray Making it possible to integrate RAP with other Java • Painting Limitations Some methods are technologies is one of our main objectives. We're doing so by unimplemented, including copyArea, drawPath, making RAP compatible with JEE and OSGi and by limiting setClipping, setTransform, setInterpolation, dependencies to the necessary minimum. A partial list of setLineDash and setXORMode compatible technologies:

ISBN: 978-1-61804-237-8 509 Advances in Information Science and Applications - Volume II

• Limitations in Dialogs: Dialog, ColorDialog, Dr. Omer Saleh MahmodJamah (January FontDialog, MessageBox 25,1973) is now the Director of Post graduate • Limitations of the Browser widget :Since the cum Research and Development and Head of Browser widget is based on the HTML iframe the department of Computer science, Faculty of element, there are some restrictions education, Azzaytuna university, Baniwalid, Libya. He received his B.Sc. in Control System • Limitations in Mouse and Key Events and Measurement (1995), M.Sc. in Electrical • Limitations in Verify and Modify Events and Computer Measurement (2004), and Ph.D. in Electrical • Limitations in Drag and Drop engineering, Automatics computer science and electronics • Limitations when using background threads from AGH University of technology, Krakow, Poland. He has done his Diploma in Planning and time management from IX. CONCLUSION Canada Global Centre, Canada. Now he is heading Computer But integrated tools require a platform of services, Science department, Faculty of Education, Azzaytuna University, Baniwalid, Libya. His research interest includes frameworks, and standards that allow vendors to focus on their multicriteria optimization for solving optimal control problems value-add while reusing common infrastructure. The platform and Fuzzy logic. He has published 12 papers and attended must include a workbench that provides a common view of the various national and international Level conferences and whole application across all resource types and the entire workshops. team. And the platform must be accessible to tool vendors under an acceptable license. Eclipse not only provides such a Mr. Xavier Patrick Kishore (November 6, platform, but its architecture also provides flexibility in how 1973) received his BSc Mathematics (1994), tool venders integrate their tools and at what level. This allows Master of Computer Application (2002) and vendors to match their integration investment with their Diplomas in E-Commerce and Advanced product needs and market window. software Technology. He has received Brain bench certification in Java and HTML. Now For simple integration, use invocation integration to he is working in Department of computer provide users navigation, access, editing, and management of science Faculty of Education, Azzaytuna University, file-based resources. Use data integration to share data Baniwalid, Libya. He is specialized in programming between tools that are otherwise unconnected [8]. When data languages. His current research interest includes Natural integration isn't enough, use API integration to provide secure language processing. He has authored more than 9 papers and access to encapsulated data. Eclipse RAP attended many conferences. Is not only useful for software industry but also for Er. Mrs. Sagaya Aurelia(November 9,1978) academic. It can be used to integrate all colleges and par-time research scholar in Bharathidasan furthermore all universities to introduce a centralized university . Now she is with department of education system. Computer Science, Faculty of Education, Azzaytuna University, Bani-walid, Libya. She REFERENCES received her Diploma in Electronics and Communication (1997),B.E (Bachelor of Engineering [1] www.electronicdesign.com [2] www.eclipse.org/rap specialized in Electronics and Communication [3] http://www.eclipsecon.org/europe2012/sites/ Engineering(2000) and M.Tech in Information eclipsecon.org.europe2012/files/Eclipse4_RAP.pdf Technology(2004),she has also done her Post [4] Http://developer.eclipsesource.com/technology/crossplatform/#rap graduation diplomas in Business Administration [5] http://download.eclipse.org/rt/rap/doc/2.0/guide/reference/ api/org/eclipse/rap/rwt/lifecycle/ILifeCycle.html (PGDBA) and Journalism and Mass [6] http://eclipsesource.com/blogs/2012/11/26/rap-becomes-the- Communication(PGDJMC). She has received Brainbench remote-application-platform/ certification in HTML. Her current research interest includes [7] http:R//eclipse.org/rap/developers- Virtual reality, Augmented reality and Human Computer Guide/devguide.php?topic=scopes.html&version=2.0 [8] http://www.eclipse.org/articles/Article-Levels-Of- Interaction and User interface Design. She has authored14 Integration/levels-of-integration.html papers and attendance several national and international level [9] http://salfarisi25.wordpress.com/2010/12/22/advantage-and- workshops and conferences. disadvantage-of-using-ide/ [10] www.eclipse.org/ [11] http://mashable.com/2010/10/06/ide-guide/ [12] http://en.wikipedia.org/wiki/Integrated_development_environment [13] http://help.eclipse.org/juno/ [14] http://en.wikipedia.org/wiki/OSGi [15] http://owenou.com/2010/07/08/introducing-eclipse-rap.html [16] http://dev.eclipse.org/mhonarc/lists/rt-pmc/pdfmFx7CiT7Ma.pdf [17] http://www.pjug.org/docs/RAP.pdf [18] http://en.wikipedia.org/wiki/Eclipse [19] http://cnx.org/content/m18920/latest/graphics1.jpg [20] http://www.vogella.com/articles/EclipseRCP/article.html

ISBN: 978-1-61804-237-8 510