Architexa - Understand and Document  

Labs - Bringing Graphical Apps to the Web

Note: We are actively working on bringing information here. Feel free to contact us at info@architexa.com for more information.

Approach: There are a number of approaches for bringing graphical-apps to the web. We discuss a number of them here. For the reasons discussed there, our primary focus has been in using a Java to Flash Compiler for the main app and providing an appropriate set of libraries around for the graphical app.

See below for using challenges, instructions, and running the demo.

Demo: The demo is currently working on a web-browser, but for some reason it is bound to localhost. One this is resolved it will be here. See below for downloading, building, and running the demo.

Challenges:

There are two main challenges that need to be considered for succesfully moving a GEF based app to run on the web:

  • Client/Server Functionality: By default the approach compiles the entire Java code to ActionScript for running in the Flash VM. While a good starting point, there are issues that needs to be considered and properly designed around.
    • Download Size: By default, this can result in a this can result in a large download size, easily approaching 2MB. A team building on this approach will need to carefully consider which functionality would need to run on the server. We are working on a set of guidelines and promising techniques for helping reducing this size.
    • Location of User Information: When considering users files and preferences, decisions need to be made as to the approach for storing them on the client or on the server.
    • Library Depenencies in Flash: While we have provided a significant amount of the Java Class Library to run in Flash, not everything makes sense. If you find some functionality that you need, you will need to either reimplement it using the flash counter-parts or work around it. A similar consideration or decision will need to be made for and other java libraries or projects that you depend on.
  • Compiler Bugs: While we have tested the compiler on significant amounts of code, there might be small bugs that a new code base might raise in the compiler. Any approach using this will need to go through a testing process. Fortunately, the ActionScript Devleopment Environment in Eclipse provides very good debugger support.

Getting the demo running:

  1. The GEF functionality builds on the SWT for Flex code. Follow the instructions there, and run the demos to test your setup. The instructions can be found here.
  2. We have added a small amount of code to the SWT Class Library. Apply this patch: patch.
  3. Check out the code from https://eclipse-gwf.svn.sourceforge.net/svnroot/eclipse-gwf/p2/fmwk and https://eclipse-gwf.svn.sourceforge.net/svnroot/eclipse-gwf/p2/app.
  4. Run LogicLauncher or ShapesLauncher from the org.eclipse.swt.e4.examples project either as a Java app for running on the desktop or as an ActionScript app for a web based version.

Porting your app:

  1. Make sure that you have an answer to the challenges above.
  2. Get the demo's running. Our goal was to minimize changes to the original GEF plugins. Therefore, the secret to getting it running is the part of the code in the org.eclipse.swt.e4.examples projects.
  3. Get your app running on the desktop with minimum dependencies to the workbench. We use a set of *Widget classes instead of the GEF *Editor classes to be the integration point for GEF with minimized dependencies. Make sure to create your *Widget class, and ensure you have implementations to configureGraphicalViewer and createPaletteViewerProvider.
  4. Once you have the app running on the desktop, your should be able to get it to cross compile and run on the web. You might face compilation or runtime errors the first time you are testing each piece of functionality.
Make sense of your code now! Get Started
Architexa is an i3labs project. Copyright ©2017 i3labs. All rights reserved. Privacy Policy | Terms of Use