You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by Steve Reiner <st...@integratedsemantics.com> on 2010/04/09 02:30:55 UTC
SWT APIs on top of Pivot for Web based tools
It would be great if there was an implementation of SWT control APIs on top
of Apache Pivot.
This would enable developers to leverage the large body of existing
Java/SWT/RCP/JFace/Draw2D/GEF/EclipsePlugin code.
Developers could create web based versions of their tools (from the same
code base as their desktop versions). They wouldn't have to rewrite Java
into Flex/ActionScript, JavaFx, Silverlight, Ajax/Html/Javascript.
Developers would be free to choose how to partition their java code between
the applet portion and the app server portion.
Use cases:
1. Web based / graphical RIA front ends for business analysts and
administrators (workflow/bpm editors, database modeling, UML, form
designers, report designers, repository mgt)
2. Potentially editing / debugging small amount of glue code
(javascript/groovy,etc. for workflows, forms, reports, etc.) by developers,
admin
3. Not for heavy dev, not full web based Eclipse IDE (but if all eclipse
worked that would be the ultimate test)
4. Cloud admin
5. Web based targeting for general custom RCP applications
Existing Eclipse web based tech:
1. RAP (no support for Draw2D/GEF graphics, might be less responsive due to
remoting between client controls and server based controls/state)
2. e4 cross-compile SWT/Java to ActionScript/Flash project seems to have
died (and technique isn't practical for large existing code bases, using
many java libs that would have to be translated too)
Eclipse e4 http://www.eclipse.org/e4/ http://wiki.eclipse.org/E4
additional synergy:
1. Eclipse e4 is dong work to tier Eclipse between client/server pieces (
http://wiki.eclipse.org/E4/Bespin )
2. Support added for CSS styling, flexible look and feel
3. XWT / XWT tooling is geared to SWT but maybe there is a tie in with WTKX
4. Maybe Pivot could be an additional target for the modeled UI. Also saw a
presentation modeling framework project.
Also see:
SWT port on top of Swing (I know Pivot doesn't use Swing but swtswing proves
the SWT control apis could be implemented on top of something else)
http://swtswing.sourceforge.net/main/index.html
Swtswing is used by EOS: Eclipse on Swing http://eos.sourceforge.net/
Note: I did see the thread in this mailing list
http://mail-archives.apache.org/mod_mbox/pivot-dev/201003.mbox/%3cBA3B1294-0
BAD-4122-AA29-57A6EA167A8C@mac.com%3e about potential Pivot abstraction
layer that would allow Pivot apps to run on top of Java2D, SWT, other
things. Also saw the Eclipse dev threads
http://dev.eclipse.org/mhonarc/lists/eclipse-dev/msg08814.html and
http://dev.eclipse.org/mhonarc/lists/platform-swt-dev/msg06886.html about
Pivot on top of SWT
I know I am suggesting the reverse of Pivot on top of SWT. I think
developers would be just happy to get their existing RCP/SWT code to work
web-based first with SWT on top of Pivot. (Would also need Eclipse Draw2D on
top of Java2D for GEF editors. Some existing work http://www.holongate.org/
).
Thanks
Steve Reiner
www.integratedsemantics.org
www.integratedsemantics.com
www.twitter.com/stevereiner
Re: SWT APIs on top of Pivot for Web based tools
Posted by Greg Brown <gk...@mac.com>.
OK, I get it. It is definitely an interesting idea. Not sure I could personally get 100% behind it, though. Pivot isn't just a widget toolkit - it is also an application development framework (conceptually similar to the combination of SWT and JFace). The approach you describe would effectively bury Pivot at the bottom of the stack, which would marginalize (if not completely obscure) the other valuable APIs.
On the other hand, it would be cool to see Eclipse running as a Pivot app. :-)
On Apr 9, 2010, at 4:59 PM, Steve Reiner wrote:
> 1. Eclipse e4 with XWT xml, XWT binding, and CSS styling is getting closer
> to Pivot, so Pivot for regular desktop eclipse plug-ins is getting less
> compelling. http://wiki.eclipse.org/E4/XWT
>
> 2. However, with SWT control apis on top of Pivot controls, leveraging
> existing java/rcp/jface/draw2d/gef/plugin code in the browser would be a
> killer use-case/app/feature!
>
> 3. Eclipse e4 has some subproject about adding JavaScript apis for calling
> eclipse apis. I like Pivot's approach better where Pivot can be scripted in
> any jvm language: JavaScript, Groovy (like best), and Scala, etc.
>
> 4. Maybe there are things in Pivot that could improve XWT and get closer to
> the Flex programming model. I have just started looking at XWT and Pivot,
> one thing saw was <wtkx:script> that I didn't see in XWT. Looks like XWT
> might add something for JavaScript scripting
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=266772
>
> 5. Saw mention from Feb 22 on this list about creating a "SWT Plugin" for
> browsers. Basically with SWT control apis on top of a SWT implementation
> done with Pivot/Java2D, you would have a "SWT Plugin" (i.e. the standard
> Java plugin) without needing another plugin.
>
> 6. How the swtswing project dealt with SWT's event loop may help
>
> Pivot/swt thread in this list from Feb 22 for reference
>
> http://mail-archives.apache.org/mod_mbox/pivot-dev/201002.mbox/%3c85D2286A-8
> C22-4D12-A031-D7E84A4EF576@mac.com%3e
>
> http://mail-archives.apache.org/mod_mbox/pivot-dev/201002.mbox/%3c4CCDA974-F
> E19-4AB6-A212-82A85B753018@mac.com%3e
>
> http://mail-archives.apache.org/mod_mbox/pivot-dev/201002.mbox/%3c6723c42710
> 02221325w75ae12cevf2bbdf4ea7640fe0@mail.gmail.com%3e
>
>
> -----Original Message-----
> From: Greg Brown [mailto:gkbrown@mac.com]
> Sent: Friday, April 09, 2010 5:22 AM
> To: dev@pivot.apache.org
> Subject: Re: SWT APIs on top of Pivot for Web based tools
>
> Hi Steve,
>
>> It would be great if there was an implementation of SWT control APIs on
> top
>> of Apache Pivot.
>>
>> This would enable developers to leverage the large body of existing
>> Java/SWT/RCP/JFace/Draw2D/GEF/EclipsePlugin code.
>
> This is an interesting idea. There would certainly be some implementation
> challenges (e.g. how to deal with SWT's event loop, since Pivot doesn't have
> one - it uses AWT's under the hood). Definitely worth some further thought
> and discussion, though.
>
>> Developers could create web based versions of their tools (from the same
>> code base as their desktop versions). They wouldn't have to rewrite Java
>> into Flex/ActionScript, JavaFx, Silverlight, Ajax/Html/Javascript.
>> Developers would be free to choose how to partition their java code
> between
>> the applet portion and the app server portion.
>
> From our perspective, this is actually one of the major selling points of
> Pivot in general - it allows you to streamline your technology stack and use
> Java from top to bottom (similar to what Microsoft offers with
> Silverlight/.NET). I recognize that this doesn't meet the immediate use case
> you describe (allowing developers to re-use existing SWT/RCP code), but
> let's look at it from the reverse perspective - if we were to port Pivot to
> run natively on SWT, you could write your RCP app or plugin using Pivot's
> APIs and ultimately reap the same benefits you describe above.
>
> Greg
>
>
>
RE: SWT APIs on top of Pivot for Web based tools
Posted by Steve Reiner <st...@integratedsemantics.com>.
1. Eclipse e4 with XWT xml, XWT binding, and CSS styling is getting closer
to Pivot, so Pivot for regular desktop eclipse plug-ins is getting less
compelling. http://wiki.eclipse.org/E4/XWT
2. However, with SWT control apis on top of Pivot controls, leveraging
existing java/rcp/jface/draw2d/gef/plugin code in the browser would be a
killer use-case/app/feature!
3. Eclipse e4 has some subproject about adding JavaScript apis for calling
eclipse apis. I like Pivot's approach better where Pivot can be scripted in
any jvm language: JavaScript, Groovy (like best), and Scala, etc.
4. Maybe there are things in Pivot that could improve XWT and get closer to
the Flex programming model. I have just started looking at XWT and Pivot,
one thing saw was <wtkx:script> that I didn't see in XWT. Looks like XWT
might add something for JavaScript scripting
https://bugs.eclipse.org/bugs/show_bug.cgi?id=266772
5. Saw mention from Feb 22 on this list about creating a "SWT Plugin" for
browsers. Basically with SWT control apis on top of a SWT implementation
done with Pivot/Java2D, you would have a "SWT Plugin" (i.e. the standard
Java plugin) without needing another plugin.
6. How the swtswing project dealt with SWT's event loop may help
Pivot/swt thread in this list from Feb 22 for reference
http://mail-archives.apache.org/mod_mbox/pivot-dev/201002.mbox/%3c85D2286A-8
C22-4D12-A031-D7E84A4EF576@mac.com%3e
http://mail-archives.apache.org/mod_mbox/pivot-dev/201002.mbox/%3c4CCDA974-F
E19-4AB6-A212-82A85B753018@mac.com%3e
http://mail-archives.apache.org/mod_mbox/pivot-dev/201002.mbox/%3c6723c42710
02221325w75ae12cevf2bbdf4ea7640fe0@mail.gmail.com%3e
-----Original Message-----
From: Greg Brown [mailto:gkbrown@mac.com]
Sent: Friday, April 09, 2010 5:22 AM
To: dev@pivot.apache.org
Subject: Re: SWT APIs on top of Pivot for Web based tools
Hi Steve,
> It would be great if there was an implementation of SWT control APIs on
top
> of Apache Pivot.
>
> This would enable developers to leverage the large body of existing
> Java/SWT/RCP/JFace/Draw2D/GEF/EclipsePlugin code.
This is an interesting idea. There would certainly be some implementation
challenges (e.g. how to deal with SWT's event loop, since Pivot doesn't have
one - it uses AWT's under the hood). Definitely worth some further thought
and discussion, though.
> Developers could create web based versions of their tools (from the same
> code base as their desktop versions). They wouldn't have to rewrite Java
> into Flex/ActionScript, JavaFx, Silverlight, Ajax/Html/Javascript.
> Developers would be free to choose how to partition their java code
between
> the applet portion and the app server portion.
>From our perspective, this is actually one of the major selling points of
Pivot in general - it allows you to streamline your technology stack and use
Java from top to bottom (similar to what Microsoft offers with
Silverlight/.NET). I recognize that this doesn't meet the immediate use case
you describe (allowing developers to re-use existing SWT/RCP code), but
let's look at it from the reverse perspective - if we were to port Pivot to
run natively on SWT, you could write your RCP app or plugin using Pivot's
APIs and ultimately reap the same benefits you describe above.
Greg
Re: SWT APIs on top of Pivot for Web based tools
Posted by Greg Brown <gk...@mac.com>.
Hi Steve,
> It would be great if there was an implementation of SWT control APIs on top
> of Apache Pivot.
>
> This would enable developers to leverage the large body of existing
> Java/SWT/RCP/JFace/Draw2D/GEF/EclipsePlugin code.
This is an interesting idea. There would certainly be some implementation challenges (e.g. how to deal with SWT's event loop, since Pivot doesn't have one - it uses AWT's under the hood). Definitely worth some further thought and discussion, though.
> Developers could create web based versions of their tools (from the same
> code base as their desktop versions). They wouldn't have to rewrite Java
> into Flex/ActionScript, JavaFx, Silverlight, Ajax/Html/Javascript.
> Developers would be free to choose how to partition their java code between
> the applet portion and the app server portion.
>From our perspective, this is actually one of the major selling points of Pivot in general - it allows you to streamline your technology stack and use Java from top to bottom (similar to what Microsoft offers with Silverlight/.NET). I recognize that this doesn't meet the immediate use case you describe (allowing developers to re-use existing SWT/RCP code), but let's look at it from the reverse perspective - if we were to port Pivot to run natively on SWT, you could write your RCP app or plugin using Pivot's APIs and ultimately reap the same benefits you describe above.
Greg