Instead of Languages I rather would like to discuss overall architecture. The initial Architecture has not been changed much since it was introduced i think. But over time the requirements I see in the code have changed. Solving Requirements with code and without adjusting the architecture leads to a certain maintainability decay.

I.E. it looks to me that at first the sw had a document class, and was a simple writing app. Then someone had the Idea that features he needed in writer, he could use in tables too. So the UNO Idea was born. But this new feature was only attached to the existing architecture. And because Java was the cool thing of its time they used it. Please this is no critic or complain. Just the way I think the code might become what it is today. these things are normal. I see it every day.

For the existing architecture the central thing is in my opinion the "framework". Which melts the document together with the GUI, by using UNO architecture. (roughly, may be wrong) It has various concepts doubled, or distributed through the code. trying to package funcionality into small modular "services"

I want to plead for a more natural abstract Architecture approach. Which is Modular on a greaterscale, to provide orientation. And being Modular on small scale to be as much as possible stay generic. In between we need to be concrete and descriptive.

The Core piece for me for a futer possible architecture is an UNO::Document. The UNO::Document represents an Abstract view of a Document and its components. And it delivers One Memory implementation for the structure the user works on.
That would be for me in a  (not comlete) list:
 # tables
 # paragraph (text)
 # Linked Lists
 # Pictures
 # grahical Items
 # Indexes
 # documents
 # formdefinition
 # Layouts
Which offers one abstract implementation independant of the target program (writer, tables, math, base). Plus haveing one Interface to Manipulate and tracks Manipulations of these elements.

Gathering all GUI stuff into a Control Architecture. So we can Produce the (G)UI want. (MVC or MV are one of the Buzzwords I think of) This part can focus on its usage like classic office apps, document fabric service, online service, or what else we want to add. I advise to move over to use Vulcan, HeavyMetal and/or OpenGL as graphical render languages in the long run. This might seem to shoot with cannons on birds, but to be honest, modern PC Architecture is based on GPUs and multi purpose CPUs, and it is stupid not to use both to show stuff. Makes live so much easier, the GPUs do take care of all the stuff we want. Also Android or iOS architecture can be targeted if we do it right, without a big fuzz. However we need to think differently user experience on those devices. I think with a Office renderengine we can focus on

Also we should cluster Importers/Exporters into one set. OOXML and ODFormat is the same XML Idea. There should not be the trouble of inventing the wheel all over it again and again. Also data connectivity should be placed here. There should be One approach to access or write to Disk, cloud, internet, database. I would prefer Java here, since it is quite capable of handling XML, internet, db and data streams. Maybe not obvious that I see a database here. For me a DB is never a Frontend, only a backend tool. OO is to me a clear Frontend tool.

I would like to cluster is to have One MacroInterface where all Languages can attach to.

The only thing this Architecture might be difficult are Extentions. We need to think how this has to be handled. Especially with the existing stuff around.

I think this aproach is easy to understand even for starters, compared to the Architecture currently used. If you think on the details just think of components you would expect to drill down in this section. Also we could start with only clustering the existing code, so we know what we look at. I think current Architecture does feature some of the layout at least a bit. Then start slowly to change code to honor the target architecture more and more. In total I think maybe a bit naive, that this way is do able without the need to do it all in one step, and beeing able to iterate at a speed we manage.

I want to add I am not completly sure about the current architecture. So if I am wrong and my understanding is frawed, please take my apologies. I wrote the mail because I do not believe in language discussions without haveing a architecture discussion first. And so I bring it on the table with the preperation state I am in.
It is better to have a bad start then to miss the discussion.
I rather would have liked to check more on current code befor makeing proposals which are based upon the Idea what I would like to have in order to guide me.

In the end I think even if you like the approach this can only the start of an architectural discussion. If you do not like the approach we need to sample the arguments and find a structure o g for. I am not fixed on this approach. It is only what I think of if I brainstorm a bit what components I would cluster in.

All the best

On 14.10.2016 18:01, Damjan Jovanovic wrote:
This was discussed several times before.

I was initially against the idea as Java can call C++ code easily these
days (eg. JNA, BridJ), but changed my mind when I realized how developing
OpenOffice itself in C/C++ is very difficult, and how much effort is wasted
(portability (eg. Win64), problematic build systems, security issues,
crashes) all because of C/C++.

But even at a rate of rewriting 1000 lines per day in Java, it would take
10000 days, which is about 28 man years, to rewrite OpenOffice's 10 million
lines of code...

I have been developing a compiler to automatically convert C++ to Java,
which should help. It will only supports a high-level subset of C++ and
won't convert all C++ code (no void pointers, no casts between object
pointers not in a class hierarchy, no casts between integer pointer types,
no raw memory access with memcpy() and the like). But what it does convert,
it will convert into beautiful, readable, maintainable, clear Java code
that is often of higher quality than the original C++ code was. It's still
in early stages and only converts basic types and operators on them, and
the if/for/return statements at the moment, there no
pointers/references/arrays/classes/enums/etc. yet. Preprocessor macros also
get inlined :-(.

Even when this compiler is finished though, 10 million lines won't be
converted overnight. It will still be a long slow process, with manual
review, and rewriting low-level code that uses void pointers etc. And if
Java becomes a mandatory dependency for OpenOffice, the current Java
support in OpenOffice has to be vastly improved. We either have to compile
Java modules into native code so that no JRE is necessary, ship with a JRE
(which can't be Oracle's JRE or OpenJDK's, since it's copyleft), or
automatically download and install a JRE ourselves at startup - the current
solution of an optional JRE you configure through the options menu won't

There is also the question of how best to port. We could gradually convert
the current codebase from the inside, presumably initially taking small,
preferably already optional, non-UI, non-localisable, and preferably
already problematic - modules - that are only accessed via UNO, and
reimplementing them in Java, which is a first-class UNO language.
Alternatively we could start a new project, and port useful bits of code to
it, while redeveloping others. Given the vast amount of infrastructure in
the project - UNO, documentation generators, localization code - and the
amount that has to be ported to become useful - only the former approach
seems feasible.

I think the next step is to find a good first module to port, as that can
also help guide further compiler development.


On Fri, Oct 14, 2016 at 12:24 PM,<>  wrote:

I have a suggestion that Apache should write OpenOffice using Java and
Netbeans platform.

Sent from Mail for Windows 10

Reply via email to