Changes between Initial Version and Version 1 of MindSeer_goes_AJAX

01/12/07 09:18:41 (12 years ago)



  • MindSeer_goes_AJAX

    v1 v1  
     1= Making AJAX MindSeer = 
     3== Overview == 
     4An AJAX version of MindSeer involves 2 steps: 
     5 1. Make all SwingHTMLObjects produce something AJAX compatible. 
     6 1. Develop a custom client module that produces AJAX objects for the client UI and runs in a Servlet container (like Tomcat) 
     8== Step 1 == 
     10There are a number of options for making SwingHTMLObjects produce AJAX compatible objects. 
     11 1. Have each SHObject produce HTML strings.  There is already a method stub for doing this.  I wouldn't recommend this -- its error prone and will require extensive browser testing.  The reason it was included in my API is that at the time, the next 2 options weren't in a very strong state (or available). 
     12 1. Have each SHObject produce a Google Web Toolkit object.  This is probably the best option as Google likely won't let this project die and because it is under Apache License, it probably won't have any bad consequences. 
     13 1. Implement the parameter code and have an AJAX interface automatically generated from parameters. 
     15To quickly develop this, I'd personally lean towards option (2) for the following reasons: 
     17 1. Eliminates the need to debug on multiple browsers.  AJAX is finicky and asynchronous interfaces require a more familiarity with control flow between threads than most people have or want. 
     18 1. Google won't let this project die because it fits in with their current corporate strategy.  This means frequent updates. 
     19 1. Open source 
     20 1. We may be able to get Google to do some free showcasing to brag about their toolkit. 
     22 1. There is a chance the next version will be closed (unlikely) 
     23 1. There have been privacy concerns because it phones home. 
     25I think a better approach would be (3) because it would ease plugin development, provide all of the inherent benefits and would allow the AJAX implementer to create interfaces that work the best in the web browser. 
     27== Step 2 == 
     29This step is a little more involved.  A good deal of the client already uses SHObject's, so you might be able to drop these into your interface.  Other bits won't translate as well.  Once again there are multiple options available: 
     30 1. Make a custom client that fits in well with the web -- this will involve developing a custom ClientManager, menus, a data set viewer and a custom workspace layout.  This option may be the most robust and will offer the most freedom. 
     31 1. Try writing an AJAXLayoutManager (extends LayoutManager) and debug everything.  This option may be the fastest and there is a chance that it will work well out of the box. 
     32 1. Make a custom ClientManager and an AJAXLayoutManager.  Tweak the interface using the ClientManager and reuse most of the code through the AJAXLayoutManager. 
     34The options here are more of a tossup.  Option 2 will likely be the fastest.  I'd personally do Option 3.  For the custom ClientManager, I'd do the following simple design changes: 
     35 1. abstract all shared code from current ClientManager into a new class AbstractClientManager 
     36 1. Make the current ClientManager extend AbstractClientManager and probably rename it to RMIClientManager 
     37 1. Make the new ClientManager extend AbstractClientManager and name it AJAXClientManager. 
     39The next step would be to create a new launcher class.  This class would likely be a helper that is called by a Servlet that has no session. 
     41There will likely be other boilerplate Servlets needed to make everything work. 
     43== Finishing Up -- to embed or not to embed == 
     45To get a Session object, the final system could either include its own embedded MindSeer server (similar to Standalone) or could call a remote server (like the current client).  The advantage of embedding the server is purely performance.  The system will likely be noticeably faster and may be a little less error prone.  Running the AJAX server as a client allows for more distributed resources and would make it easier to have a hybrid of clients going to the server.  I'd personally embed it, the performance gains would be worthwhile and we could run another server on a different machine for users of the Java Client.