Tags:
drawing1Add my vote for this tag create new tag
, view all tags

Brainstorming on JGraphpadPlugin

RaphaelValyi is the maintainer of JGraphpad applet, http://emsim.sourceforge.net/jgraphpad.html. With his permission I post part of the e-mail tread we exchanged here.

-- PeterThoeny - 25 Jan 2006

I looked at the TWikiDrawPlugin which I found fantastic. Actually the I had the idea of such a drawing java applet being able to upload files in to wiki engine. TWikiDrawPlugin do exactly this, fine.

My point is that I'm currently developping java applet that overkill TWikiDrawPlugin in term of data structure/graphical abilities. I'm talking about JGraphpad which is based on the JGraph well know library, see:

http://emsim.sourceforge.net/jgraphpad.html
http://www.jgraph.com/

I'm at the point of releasing new JGraphpad versions (design really improved in term of clarity/modularity/scalability). Arround 2003, JGraphad was already able to do a bit what TWikiDrawPlugin does, but with TikiWiki.

I'm quite willing to restore/improve/update that feature for a TWiki integration just as TWikiDrawPlugin does. The point is that I don't konw servers that much, neither TWiki (not at all), neither TWikiDrawPlugin (but I can copy the feature).

So I'm looking for somebody to help me. especially i would need somebody to test my applet in TWiki.

Advanges of using JGraphpadCE:

  • data is structured as a graph with everything you want inside, it's not just a drawing. So you can link that with any business logic/algorithms. especially I use it in mergy Simulator to provide a visual simulation language for ecology. It would be very interresting to have simulation files accessible in a Wiki context.
  • files are XML
  • graphical features are better (benefit from all JGraph commercial and open source (LGPL) developement)
  • user interface is richer
  • you can now easily configure/subclass JGraphpad in order it fit for very complex applications.

minus:

So can anyone help me to achieve that? this plugin could even replace TWikiDrawPlugin in the future if it's really better. I'll be in position to care about such an intergartion in two weeks.

-- RaphaelValyi - 19 Jan 2006

This is a phantastic idea, yes please help creating a Plugin for TWiki. To get familiar with TWiki Plugins read TWikiPlugins. You can download the TWikiDrawPlugin to study how it works.

I am sure you will get help from the TWiki community. Just ask for help, people will give advise and help.

Another idea is to replace TWikiDrawPlugin with your applet. This needs to be investigated (Java version required, upgrade of .draw files, etc)

-- PeterThoeny - 24 Jan 2006

> To get familiar with TWiki Plugins read TWikiPlugins. You can download the TWikiDrawPlugin > to study how it works.

Of course I'll. I'm still working on JGraphpad (especially making it lighter, more modular/extensible and avoid security warning when used as an applet), but after that'll study that plugin and try to mimic its API when interracting with TWiki.

> Just ask for help, people will give advise and help.

OK,. My biggest problem today is: how the hell, my applet can writte to the server. I mean, if the wiki only allow registered user to change drawings (wishable behavior), then how, in my applet I know if the user is registered and then allow or not to post the drawing. Do I have to do that in my applet or is it tha server that will handle that? Then how will the server know if the user is registered or not??

An alternative is to say tha only registered users can access the applet button. This is the policy adpoted at TikiWiki for JGraphpad in 2003. The point is that it would be nice the user can edit the diagram even if not registered. Then he can save only on its own hard disk (if he accepts the poping security warning) while registered user can upload to the wiki.

Unfortunately, I'm good at java but very ignorant about servers/apache/CGI/HTTP protocols. So I hope to get effective help about that. I'll provide the app, I'll need somebody to embedd it inside TWiki.

> Another idea is to replace TWikiDrawPlugin with your applet. This needs to be investigated > (Java version required, upgrade of .draw files, etc)

Right, I really think JGraphpad is much more feature rich than TWikiDrawPlugin. Especially because you don't make only drawings, you make structured data (like UML editors for instance). Then you could imagine plenty of application revolving arround graphically structured data. having this to work in a wiki is just a killer app. Just imagine for instance people can have an UML diagram as a wiki...

If you are curious, have a look at what JGraphjpad was in 2003 in TikiWiki: http://tikiwiki.org/tiki-index.php?page=JgraphPadSandBox (you should register yourself to get the applet working).

Finally, the minimal java version will be 1.4.2, but this is quite common by now, even the gnu classpath handles JGraphpad.

-- RaphaelValyi - 25 Jan 2006

The trick on authentication is to put the script that is responsible for attaching files to a wiki topic under authentication (BasicAuthentication or cookies with session). That way, all the authentication is handled on the server. All that needs to be done by the applet is to open a URL connection to upload a file:

   URL server = new URL(getCodeBase().getProtocol(), getCodeBase().getHost(), getCodeBase().getPort(), savePath);
   URLConnection connection = server.openConnection();
   // etc

You can find the details in the TWikiDrawPlugin applet source.

You need some handing on the server side too. The TWikiDrawPlugin expands %DRAWING{name}% with the actual URL of the gif file, linked to the page that contains the applet.

-- PeterThoeny - 25 Jan 2006

Hi, I finally finished the JGraphpad applet diagramming plugin. I'm sorry it's not implemented for TWiki but for MoinMoin at the moment. Still, the small appletpad.py python macro for MoinMoin is a very small piece of code you could easily re-implement in PHPPerl for TWiki and other wikis arround there. Basically, I have a javascript helper that will do most of the job to create the HTML applet TAG in you wiki page, so the server side programming is really minimal, it only deals with ACL edition right, the name of the diagram file and a few options you can pass via the macro. More details are given here:

http://wiki.visualmodeller.org/ and here: http://wiki.visualmodeller.org/MoinMoinPlugin

-- RaphaelValyi - 15 Dec 2006

Thanks Raphael for the update. I hope you are someone is inclined to create an integration for TWiki.

FYI, there is also related work going on JHotDraw 7 upgrade, see November discussions in TWikiDrawPluginDev.

-- PeterThoeny - 15 Dec 2006

Small feedback after quickly looking at http://wiki.visualmodeller.org/

  • smile Many more drawing tools than TWikiDraw
  • frown The interface looks a bit cluttered. Many menu items are not needed in a "click drawing to edit" environment. A multi-window interface is distracting in thsi environment. Can the editor be configured to show just one window? (no way to add new ones, minimize etc.)

-- PeterThoeny - 15 Dec 2006

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2006-12-15 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.