You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by suhail ansari <su...@gmail.com> on 2012/07/05 18:41:12 UTC

OpenOffice in Java

As far as I know the only modern platform that doesn't support Java is iOS.
99% platform support Java. Java is the second most popular plugin after
flash. Flash is being phased out and HTML5 is used these days. One major
reason to rewrite OpenOffice in Java because Java support many languages
(Scala, Jython, JRuby). JavaFX is moder UI framework for Java that also
support HTML5. It will be easier to support a Java based OpenOffice due to
Java's cross platform nature.

Re: OpenOffice in Java

Posted by Fernando Cassia <fc...@gmail.com>.
On Thu, Jul 5, 2012 at 1:41 PM, suhail ansari <su...@gmail.com> wrote:
> One major
> reason to rewrite OpenOffice in Java because Java support many languages
> (Scala, Jython, JRuby)

You clearly have no idea of the effort required to rewrite everything
in AOO in Java. I would vote against it.

Yes "everything works, in theory" but then when you test things, you
hit problems. Remember Lotus' eSuite?

FC

Re: OpenOffice in Java

Posted by Fernando Cassia <fc...@gmail.com>.
On Fri, Jul 6, 2012 at 6:20 PM, Dave Fisher <da...@comcast.net> wrote:
>
> No longer providing a JRE is more about the maturity and ubiquity of JVMs on consumer OSs.

Yes, packaging JREs along with apps is a capital sin in Java
development. It goes back to the days of the slightly incompatible
Java 1.1 and MSFT Java, where vendors choose to package JVMs along
with apps to save them from the grief of "it doesn' t run on my JVM"
hassles.

It should be avoided at all costs.
FC

Re: OpenOffice in Java

Posted by Dave Fisher <da...@comcast.net>.
Hi Dennis,

On Jul 6, 2012, at 10:57 AM, Dennis E. Hamilton wrote:

> @Rony,
> 
> I have no intention to bash Java.  
> 
> However, the ability to support extensions and scripting including optional reliance on a JVM hosting is not the same as reworking AOOi as Java-hosted software.  In fact, it is no longer to have a JVM to install AOOi (or LibreOffice) and JREs are no longer distributed as part of the installs.

No longer providing a JRE is more about the maturity and ubiquity of JVMs on consumer OSs. It is now a mistake and a security issue to try to install a particular version of the JVM. The recent JVM exploits on MacOSX should have motivated all OS providers to make available the latest secure version of the JDK.

A decade or longer ago with the spotty and divergent Java support from major OS providers like Microsoft and Apple it was a different world. Wonder why Java is more of a Server success? Apache Hadoop, a Java based clustering system replaced faster, proprietary C++ clustered servers at Yahoo. There are 20,000 servers in their cluster. Why? In aggregate the Hadoop cluster is faster because it is more reliable.

> I am not a party to any of that.  I am simply observing it.  

Keep on observing. But join the party someday.

Regards,
Dave

> 
> - Dennis
> 
> -----Original Message-----
> From: Rony G. Flatscher (Apache) [mailto:rony@apache.org] 
> Sent: Friday, July 06, 2012 07:26
> To: ooo-dev@incubator.apache.org
> Subject: Re: OpenOffice in Java
> 
> 
> On 05.07.2012 22:04, Jürgen Schmidt wrote:
>> Am Donnerstag, 5. Juli 2012 um 19:57 schrieb Dennis E. Hamilton:
> ... cut ...
>>> 3. Are you aware that the tendency is to remove Java dependencies from OpenOffice? I don't know the reasoning, but it is happening.
> AFAICT there was quite an anti-Java stance before the OpenJDK came along by different groups.
> 
> Therefore, I was surprised to read this statement, because for quite some time there has been no
> "Java-bashing", which IMHO would just simply be stupid, unfprofessional and actually harm AOO in
> todays world.
> 
>> really, I don't see it at AOO at the moment. I still recommend Java for extensions because it's
>> much easier to develop and to maintain on all platforms.
> +1
> 
> In addtion, the very important AOO scripting framework is totally Java based.
> (BTW, this does not mean that one is only able to deploy Java-implemented script languages, but it
> means that it is very easy to add any Java-based scripting language in addition to AOO. As another
> example there is an oxt-package that adds the C++ implemented ooRexx scripting language to AOO/LO
> exploiting/using the Java based scripting framework, and it works well and fast.)
> 
> ---rony
> 


RE: OpenOffice in Java

Posted by "Dennis E. Hamilton" <de...@acm.org>.
@Rony,

I have no intention to bash Java.  

However, the ability to support extensions and scripting including optional reliance on a JVM hosting is not the same as reworking AOOi as Java-hosted software.  In fact, it is no longer to have a JVM to install AOOi (or LibreOffice) and JREs are no longer distributed as part of the installs.

I am not a party to any of that.  I am simply observing it.  

 - Dennis

-----Original Message-----
From: Rony G. Flatscher (Apache) [mailto:rony@apache.org] 
Sent: Friday, July 06, 2012 07:26
To: ooo-dev@incubator.apache.org
Subject: Re: OpenOffice in Java


On 05.07.2012 22:04, Jürgen Schmidt wrote:
> Am Donnerstag, 5. Juli 2012 um 19:57 schrieb Dennis E. Hamilton:
... cut ...
>> 3. Are you aware that the tendency is to remove Java dependencies from OpenOffice? I don't know the reasoning, but it is happening.
AFAICT there was quite an anti-Java stance before the OpenJDK came along by different groups.

Therefore, I was surprised to read this statement, because for quite some time there has been no
"Java-bashing", which IMHO would just simply be stupid, unfprofessional and actually harm AOO in
todays world.

> really, I don't see it at AOO at the moment. I still recommend Java for extensions because it's
> much easier to develop and to maintain on all platforms.
+1

In addtion, the very important AOO scripting framework is totally Java based.
(BTW, this does not mean that one is only able to deploy Java-implemented script languages, but it
means that it is very easy to add any Java-based scripting language in addition to AOO. As another
example there is an oxt-package that adds the C++ implemented ooRexx scripting language to AOO/LO
exploiting/using the Java based scripting framework, and it works well and fast.)

---rony


Ad scripting languages (Re: OpenOffice in Java

Posted by "Rony G. Flatscher (Apache)" <ro...@apache.org>.
Hi Andreas,

On 07.07.2012 17:36, Andreas Säger wrote:
> Am 06.07.2012 16:26, Rony G. Flatscher (Apache) wrote:
>> In addtion, the very important AOO scripting framework is totally Java based.
>
> Why can I run all non-Java macros on a machine with no Java?
>
not sure, what you are after.

AFAIK, originally there was "StarBasic" implemented as the scripting language for OpenOffice (later
renamed to "OpenOffice.org Basic") and part of it.

Then, later, Python got added as a scripting language, by implementing a Python UNO binding.

That was it for quite some time as it is everything else but a trivial task to create the
infrastructure to add a new scripting language to OpenOffice from scratch for programmers who might
have no working knowledge about the UNO framework.

Then later (2004?, 2005?), a Java scripting framework got added to OpenOffice.

This Java scripting framework allowed in the first place to finally add JavaScript (Rhino, a very
popular Java implemenation of JavaScript) as a scripting language to OpenOffice.

In addtion BeanShell ("interpreted Java") was added as an additional scripting languages to
OpenOffice as well taking advantage of the new Java scripting framework.

Because there has been a Java scripting framework for OpenOffice it has become a feasible job to add
any scripting language to OpenOffice for which a Java implementation existed, without the need of an
intimate knowledge of the UNO framework. A feasible example of adding scripting languages to
OpenOffice via the Java scripting framework would be all the Apache BSF scripting languages (cf.
<http://commons.apache.org/bsf/>). Starting with Java 1.6 the "javax.script" package got introduced
into Java which could be used to add new scripting languages to OpenOffice as well, using the
existing Java scripting framework.

The interesting thing here is, that one can use the Java scripting framework for OpenOffice also for
scripting languages, that are implemented in C++, believe it or not!

This may sound strange, but in effect, this is simpler than starting from scratch to create some UNO
binding for a new scripting language for programmers who have no intimate knowledge of the UNO
framework and its implementations. An example for such a possibility is the oxt-package that adds
the opensource and "human centric" scripting language ooRexx (cf. <http://www.ooRexx.org>) to
OpenOffice using Java as the bridge (there is an ooRexx package, that has extensive Java support via
JNI for ooRexx, camouflaging all of Java as the dynamically typed, caseless programming language
ooRexx, and does so successfully and fast, cf. <http://sourceforge.net/projects/bsf4oorexx/>, the
oxt-package is part of the distribution and gets automatically installed with BSF4ooRexx, if
OpenOffice is installed on the machine).

---

Two years ago, there was a presentation of an OpenOffice introspection tool implemented in ooRexx,
which can be used interactively or via all the OpenOffice scripting languages via the dispatch
interface, which is able to create great overviews of the UNO objects (and/or UNO classes) you have
in hand, including links that lead to the OpenOffice API documentation on the Internet. Here is a
link to a brief tutorial which might be interesting for OpenOffice developers, hence giving links to
the slides, the brief tutorial on how to use it from OpenOffice.org Basic, Java, JavaScript, ooRexx,
and Python:

  * slides:
      o <http://wi.wu.ac.at/rgf/rexx/misc/OOoCon/2010_Budapest/UNO%5fAPI%5fInfo%2dOOoCon%2d20100902%2epdf>

  * tutorial/readme:
      o <http://wi.wu.ac.at/rgf/rexx/misc/OOoCon/2010_Budapest/read%2dme%2dUNO%5fAPI%5finfo%2ehtml%2epdf>

  * result of introspecting an UNO writer object on-the-fly, one level only, yielding 11 pages of
    documentation:
      o <http://wi.wu.ac.at/rgf/rexx/misc/OOoCon/2010_Budapest/UNO%5fAPI%5fINFO%2dcom%2esun%2estar%2edocument%2eOfficeDocument%2bcom%2e%2e%2e%2d2010%2d08%2d29T23%5f11%5f12%2e592000%2epdf>

  * result of introspecting an UNO writer object on-the-fly, two levels, yielding 55 (!) pages of
    documentation:
      o <http://wi.wu.ac.at/rgf/rexx/misc/OOoCon/2010_Budapest/UNO%5fAPI%5fINFO%2dcom%2esun%2estar%2edocument%2eOfficeDocument%2bcom%2e%2e%2e%2d2010%2d08%2d29T23%5f11%5f27%2e749000%2epdf>

As you (hopefully) see, having a Java based scripting framework is a boon for OpenOffice. It
allows/enables programmers to rather quickly make a scripting language available to OpenOffice
taking advantage of the Java scripting framework.

---rony


Re: OpenOffice in Java

Posted by Andreas Säger <vi...@t-online.de>.
Am 06.07.2012 16:26, Rony G. Flatscher (Apache) wrote:
> In addtion, the very important AOO scripting framework is totally Java based.

Why can I run all non-Java macros on a machine with no Java?


Re: OpenOffice in Java

Posted by "Rony G. Flatscher (Apache)" <ro...@apache.org>.
On 05.07.2012 22:04, Jürgen Schmidt wrote:
> Am Donnerstag, 5. Juli 2012 um 19:57 schrieb Dennis E. Hamilton:
... cut ...
>> 3. Are you aware that the tendency is to remove Java dependencies from OpenOffice? I don't know the reasoning, but it is happening.
AFAICT there was quite an anti-Java stance before the OpenJDK came along by different groups.

Therefore, I was surprised to read this statement, because for quite some time there has been no
"Java-bashing", which IMHO would just simply be stupid, unfprofessional and actually harm AOO in
todays world.

> really, I don't see it at AOO at the moment. I still recommend Java for extensions because it's
> much easier to develop and to maintain on all platforms.
+1

In addtion, the very important AOO scripting framework is totally Java based.
(BTW, this does not mean that one is only able to deploy Java-implemented script languages, but it
means that it is very easy to add any Java-based scripting language in addition to AOO. As another
example there is an oxt-package that adds the C++ implemented ooRexx scripting language to AOO/LO
exploiting/using the Java based scripting framework, and it works well and fast.)

---rony


Re: OpenOffice in Java

Posted by Jürgen Schmidt <jo...@googlemail.com>.
Am Donnerstag, 5. Juli 2012 um 19:57 schrieb Dennis E. Hamilton:
> I don't want to discourage you, but there is need to look at the
> practical issues around rehosting the OpenOffice code base.
> 
> Help us to understand your perspective better:
> 
> 1. Why do you care what Apache OpenOffice is written in? Is there a 
> direct personal concern or is this some general consideration? In 
> what way are you impacted personally? As an user? As a contributor
> or developer?
> 
> 2. Are you interested in participating in such a development? Are
> you already familiar with the OpenOffice implementation? How could
> you contribute to such a migration? This is an open-source project
> and availability of capable and willing contributors is decisive.
> Most of all, how do you expect the hundreds of contributors who are 
> already at work in aspects of this extensive, long-lived product to
> switch their attention to a different approach?
> 
> 3. Are you aware that the tendency is to remove Java dependencies
> from OpenOffice? I don't know the reasoning, but it is happening.
> 
> 

really, I don't see it at AOO at the moment. I still recommend Java for extensions because it's much easier to develop and to maintain on all platforms.

Juergen 
> The source code package for the latest release of Apache OpenOffice 
> 3.4 (incubating) is over one gigabyte. Changing the platform would 
> represent a tremendous disruption in the development. How long are
> you willing to wait for there to ever be another stable version 
> hosted on some VM model instead of built for the variety of native
> platforms that are now served?
> 
> - Dennis
> 
> PS: You might explore the current Java-based viewers for some
> calibration and a place where proof-of-concept work might be
> carried out. There needs to be a way to surface the unknowns 
> and calibrate such an effort. It is also possible to undertake
> such a project completely independently from Apache OpenOffice.
> That is a beauty of open-source work that allows this to be done
> without expecting that one project be required to be all things
> to all people.
> 
> -----Original Message-----
> From: suhail ansari [mailto:suhailazaz@gmail.com] 
> Sent: Thursday, July 05, 2012 09:41
> To: ooo-dev@incubator.apache.org
> Subject: OpenOffice in Java
> 
> As far as I know the only modern platform that doesn't support Java is iOS.
> 99% platform support Java. Java is the second most popular plugin after
> flash. Flash is being phased out and HTML5 is used these days. One major
> reason to rewrite OpenOffice in Java because Java support many languages
> (Scala, Jython, JRuby). JavaFX is moder UI framework for Java that also
> support HTML5. It will be easier to support a Java based OpenOffice due to
> Java's cross platform nature.
> 
> 



RE: OpenOffice in Java

Posted by "Dennis E. Hamilton" <de...@acm.org>.
I don't want to discourage you, but there is need to look at the
practical issues around rehosting the OpenOffice code base.

Help us to understand your perspective better:

 1. Why do you care what Apache OpenOffice is written in?  Is there a 
direct personal concern or is this some general consideration?  In 
what way are you impacted personally? As an user?  As a contributor
or developer?

 2. Are you interested in participating in such a development?  Are
you already familiar with the OpenOffice implementation?  How could
you contribute to such a migration?  This is an open-source project
and availability of capable and willing contributors is decisive.
Most of all, how do you expect the hundreds of contributors who are 
already at work in aspects of this extensive, long-lived product to
switch their attention to a different approach?

 3. Are you aware that the tendency is to remove Java dependencies
from OpenOffice?  I don't know the reasoning, but it is happening.
The source code package for the latest release of Apache OpenOffice 
3.4 (incubating) is over one gigabyte.  Changing the platform would 
represent a tremendous disruption in the development.  How long are
you willing to wait for there to ever be another stable version 
hosted on some VM model instead of built for the variety of native
platforms that are now served?

 - Dennis

PS: You might explore the current Java-based viewers for some
calibration and a place where proof-of-concept work might be
carried out.  There needs to be a way to surface the unknowns 
and calibrate such an effort.  It is also possible to undertake
such a project completely independently from Apache OpenOffice.
That is a beauty of open-source work that allows this to be done
without expecting that one project be required to be all things
to all people.

-----Original Message-----
From: suhail ansari [mailto:suhailazaz@gmail.com] 
Sent: Thursday, July 05, 2012 09:41
To: ooo-dev@incubator.apache.org
Subject: OpenOffice in Java

As far as I know the only modern platform that doesn't support Java is iOS.
99% platform support Java. Java is the second most popular plugin after
flash. Flash is being phased out and HTML5 is used these days. One major
reason to rewrite OpenOffice in Java because Java support many languages
(Scala, Jython, JRuby). JavaFX is moder UI framework for Java that also
support HTML5. It will be easier to support a Java based OpenOffice due to
Java's cross platform nature.


Re: OpenOffice in Java

Posted by Fernando Cassia <fc...@gmail.com>.
On Fri, Jul 6, 2012 at 11:41 AM, Rob Weir <ro...@apache.org> wrote:
> IMHO, the more interesting thing would be lighter-weight component,
> maybe HTML5 based.   Data-aware, both common web formats like JSON and
> OData, but also ODF-aware.   A spreadsheet component that you can
> easily embed into a website.  Not only for ad-hoc use, but as part of
> an overall application.
>
> That is one of the top requests I hear for the ODF Toolkit -- a
> reusable editor widget.

Yes, that' s doable as well, and would fill a need.

I just question the popular wisdom of HTML5 and cloud computing as the
next holy grail. IMHO It isn' t.

I' ve just typed "about:memory" on my Firefox browser and it turns out
the browser is allocating 450 megabytes of RAM for running JS code,
and I just have a dozen tabs open, including two cloud 'apps' : GMail
and Twitter.

Are these the "lean apps" of the future? Give me a break... ;)
:)

FC
PS: I do remember Lotus eSuite. I belive IBM cancelled the effort
shortly after v1.1 (or was it 1.2?) shipped (which, following IBM' s
tradition 1.1 was more "what 1.0 should have been").

Also, it was applets-based. Applets are heavily restricted and bear no
resemblance of what you can do today with Java6+ APIs and Java
WebStart. I often point out at http://ho.io/muCommander as an example
of how a properly done Java-based app can be, that can be launched via
JWS (try loading http://tinyurl.com/launchMUC from any system with
Java enabled and JWS properly configured and see what I mean).

Re: OpenOffice in Java

Posted by Rob Weir <ro...@apache.org>.
On Fri, Jul 6, 2012 at 10:30 AM, Phillip Rhodes
<mo...@gmail.com> wrote:
> On Thu, Jul 5, 2012 at 12:36 PM, Fernando Cassia <fc...@gmail.com> wrote:
>> On Thu, Jul 5, 2012 at 1:41 PM, suhail ansari <su...@gmail.com> wrote:
>>
>> A Java spin-off of AOO written in Java on the other hand, starting
>> from scratch, would be good. Call it AOO-Lite.
>
> That's actually a pretty intriguing idea.  Not a full AOO, but
> something that could be loaded with JWS/JNLP, that would provide at
> least a lightweight editor for ODF documents, would be pretty darn
> handy.
>

I was involved in something like this many years ago, at Lotus.  We
took the "SmartSuite" code and ported parts of it to Java.  Back then
the aim was to create applet versions of them.  It was possible,
though difficult, to do back then.  We only had AWT at the time, so
very primitive.  As we know, the ensuing competition and legal
wranglings nearly killed Java-in-the-browser, so that project died.
We also did another version, based on activeX, again as
programmable/embeddable components.

So I think re-creating a heavy-weight traditional editor in Java would
be a waste of time.  Yes, it could be done.  It might even be faster
than AOO, since rewriting code tends to lead to more efficient code.
But it would consume a lot of time, and by the time we had something
we might find that the market had past us by.

IMHO, the more interesting thing would be lighter-weight component,
maybe HTML5 based.   Data-aware, both common web formats like JSON and
OData, but also ODF-aware.   A spreadsheet component that you can
easily embed into a website.  Not only for ad-hoc use, but as part of
an overall application.

That is one of the top requests I hear for the ODF Toolkit -- a
reusable editor widget.

-Rob


> Whether or not it would need to have any association with AOO at all
> strikes me as an open question, but the idea itself has some appeal...
>
>
> Phil

Re: OpenOffice in Java

Posted by Phillip Rhodes <mo...@gmail.com>.
On Thu, Jul 5, 2012 at 12:36 PM, Fernando Cassia <fc...@gmail.com> wrote:
> On Thu, Jul 5, 2012 at 1:41 PM, suhail ansari <su...@gmail.com> wrote:
>
> A Java spin-off of AOO written in Java on the other hand, starting
> from scratch, would be good. Call it AOO-Lite.

That's actually a pretty intriguing idea.  Not a full AOO, but
something that could be loaded with JWS/JNLP, that would provide at
least a lightweight editor for ODF documents, would be pretty darn
handy.

Whether or not it would need to have any association with AOO at all
strikes me as an open question, but the idea itself has some appeal...


Phil

Re: OpenOffice in Java

Posted by Fernando Cassia <fc...@gmail.com>.
On Thu, Jul 5, 2012 at 1:41 PM, suhail ansari <su...@gmail.com> wrote:
> . It will be easier to support a Java based OpenOffice due to
> Java's cross platform nature.

A Java spin-off of AOO written in Java on the other hand, starting
from scratch, would be good. Call it AOO-Lite.
But better yet, would be some FOSS benefactor buying Thinkfree office
and open sourcing it. That' s what Sun did over a decade ago with
StarOffice, sparking OpenOffice.org. Sad to see that there' s not much
forward-thinking like Sun' s in this industry today...

FC