app with multi-GUI or app with one GUI ?

Application with multi-GUI (charva, Swing, SWT, html, ...) or app with only one GUI ?

When I first saw the integration of charva in JNode, I thought about the utility of writing an application for charva, and after for swing (, and after for SWT?) ...

To avoid rewriting many GUI for the same application, what about creating a generic framework to build a GUI : many factories that are able to build labels, tree, table, textarea ...
Thus, we have a factory for each of these : charva, swing, (swt ?), (awt?), and maybe html. Perhaps we can use JSF (Java Server Faces) or XUL (that convert XML->GUI and is used by mozilla).

About the current developments for charva, there is two cases:
- the applications are just maintained until swing is ready, and forgotten after. That's not worth doing great developpments in this situation.
- the applications need to be maintained after swing is ready. I don't like much the idea of rewritting (or only replacing charvax with javax in the source code) but what to do if we prefer having a GUI with Swing for these apps ? That's why I proposed creating an UI factory.

NB: SWT are the GUI components that have been created for the Eclipse IDE.
Beeing able to run eclipse under JNode is one of my wish and I think I am not the only one.

Fabien

GrafiXML/UsiXML

Maybe GrafiXML
can be that factory : it describes a UI in XML and render it the way you want (swing, swt, java, c++, ...)

Fabien

maybe the solution : using usixml/grafixml

I found a GUI designer named grafixml

It is using a standardized xml model named usixml whose aim is to design UI with abstraction of the implementation (swing, java, c++, TUI, ...).

PS: I have not tested it yet but it sounds interesting.

Fabien

UI

It is nice to read how many ideas come up on differnt user interface topics.
However we should not forget were we are at the moment, what we have at the moment, what are our short term and longterm goals and what JNode is.

JNode wants to be PURE Java. Do not even think about bringing native code in in any form. As it was said already, that probaly can be done somewhere else.

Regarding the UI topics a realistc order of implementing things could be the following:

1. Make the console work fine. (Just try to type a longer command than the width of the screen, or the available space between the prompt and the rigth edge of the screen, you will se what I mean. What is that ghost cursor there ? Why is the console so slow? and so on... )

2. Optimize charva performance-wise. Reduce the unneeded work it is doing all the time. Try to implement the missing components like JTree. Doing all this in the true spirit of charva (that is: with respect to Swing). There are lots of other things there. As soon as you strat to work on it you will see. Curently due to the way charva is implemented you cannot run two charva applications in the same time in different consoles. The way it uses threads and satic methods are among the factors that causes it.
Charva is extremely important. Stil for quite a while JNode will not have usable graphics. But in the meantime JNode will become suitable for running a lot of headless apps. Soon it will also be possible to develop under JNode, (at least small things , like tests or small prototypes). Charva canhelp a lot in all these things. Further when will we have a normal GUI we also will need console and text mode just like we need it today with other OSs. Not to mention when you log in to JNode with a simple text mode client. Charva apps should work there too. So there is ony one honest way to think about text mode UI in JNode today and that is: in the long term.

3. It is not clear yet whether an AWT implemenation based on Swing is the way to go for JNode. It might be easier to prive a JNode AWT from scartch. And there is some (or a lot of, if you like) things done already there. We have the WT components which could serve for this. They are as they are but they can be and need to be improved. JNode will need a basic desktop any way and WT could help there. It could also help to set up AWT much earlier than the time when Swing in classpath will be usable. The current wt component sintactically implement the corresponding awt peer interfaces. However the implementation methods are empty at the moment.
On the other side there is a small awt demo using an other set of components (minimally implemnted) that tries to darw something on the screen. It normally should draw circles and arcs but it just happens to draw lines instead. It woud be good to find out why. There are problems with the font rendering too. The speed of course but even worse is that it draws a really hardly readable mess intead of letters. I wonder why?
A usable AWT implementation would just be nice, after that Swing goes by itself. Smiling

4. Swing of course, is the next step. The best thing to do for that is to contribute to Classpath, and always look for ways to try to test soemthing from it under JNode. This would keep you busy for an other year and a half Smiling

5. By that time the SWT implementation on Swing will be usable anyway. And we can try to run JDistro too, and the 3D desktopt that Sun is working on these days, or maybe an other GUI based on the Jazz (a zoomable graphic library) that maybe will be created by somebody... Smiling
There are also projects (abandoned ones) that tried to implement an X server and X client in pure Java around year 2000. It might be possible to integrate them into Jnode as well.
However, since JNode should run any Java application it would be hard to make a list things to run on JNode, especially so becuse some of them wil be invented tomorrow and others a few days later... Smiling

So as you can see, there are just plenty of things to work on now, under the current conditions even if free Swing is still quite far.
At the moment I'm working on a small editor based on charva, and generally on setting up a simple development environment under JNode (edit, javac, java).
Further I'm trying to finish the L2 compiler. This would be a clearly visible performance improvment in all parts of JNode.
And I'm doing this in may sparse free time after work.
That's why I cannot say enough to just make your self dirty with the code, or come and have fun developping JNode if you like, whenever you are in the right mode for that.
And while doing so take care that all features be easy to use and fun to work with. JNode first should be as easily DEVELOPABLE as possible and then as usable and easy to work with as possible. We should never forget that we are the first users of JNode while creating it and what JNode will become is greatly depends on us and wil reflect ourselves in some way. Let's try to create a well articulted haromnious pure system where every feature shows that the developers were happy creating it because they regained a kind of freedome that was not available in the Java land for so many years. The Java programmer is not closed away from the hardware, from the compilers, from hacking on all parts of the system any more. Here is the chance again to understand every corner of your software, of your operating system. Say no to the empier of closedness, where you are deprived once and forever from the chance to know what is the software at your hand. And with JNode all this is available in the form of the distilled synthesis of the history of computing called Java.

DEVELOP YOUR FUTURE OPERATING SYSTEM TODAY!

Regards,
Levente

console bugs (point 1) fixed

I fixed these bugs :
- lines wider than Screen are now handled properly
- the ghost cursors should never occurs (now only the Screen can show the cursor, the buffer of consoles doesn't have trace of it)
- the line beeing edited is handled by a StringBuffer instead of a String (more memory efficient and maybe more fast)

Fabien

Agree

I agree with these statements totally; and I am glad someone has said them. The heart of Jnode is pure, not only because we will only use java, but also because we believe in the harmonious elegance that neat java code creates.
We will not long suffer clumsy code or ugly hacks. And we should not allow the porting of external projects until we are confident they do not compromise the heart of Jnode or the goals thereof.

With Respect,

Alex.

We need a Graphics2d impl first

What we need is a fast and stabile implementation for Graphics2D...now my question is who want's to help? More or less everything is there but the finetuning and font engines are for ones that realy know what they are doing in graphics field... and that's not me Sad ... So people if you want to have a GUI ever in JNode start help to finish this Graphics2D implementation...

What coordination ?

Hi,

Before going...

>What we need is a fast and stabile implementation for Graphics2D...

There are people here, including myself, who agree. So... I think we can start Smiling

>now my question is who want's to help?

As said before, I am volunteer for a font engine, really Unicode compliant, open source, and, thus, based on Graphite fonts, using the design described in the project Fonts in GNU Classpath.

As I've also said before, the main risk to to fork with GNU Classpath. How to handle this ? Wouldn't the concurrent debugging of JNode, Graphics2D, and a pure Java font engine be extremely painful ?

Cheers,

p.b.

Not related with JNode

This is not related with JNode. It has to deal with java. I dont know if it is a good or bad idea, but the right place for this is maybe in JCP or something.

JNode will provide all the APIs java needs and some tools that an OS user needs (that can not be implemented with java). There is no reason to fork java or to create a new or a different java!

UIFactory

Hi,

>Thus, we have a factory for each of these : charva, swing, (swt ?),
>(awt?), and maybe html.

Mmmh... Until now, *official* Java only supports AWT and Swing. Why add so many different architectures ?

OK, we can find bridges between AWT/Swing, Swing/SWT, AWT/SWT, and even SWT/Swing... but developping from "non-Java" architectures would be an error IMHO.

Furthermore, SWT (or the unmentionned yet valuable GTK+) use native methods that use the underlying OS APIs. In the case of JNode... what is the underlying OS Eye-wink ? So : Java -> native -> Java ? Wow !

> Perhaps we can use JSF (Java Server Faces) or XUL (that convert
> XML->GUI and is used by mozilla).

Using XUL and maybe Luxor (which relies on Swing until now) for designing a generic JNode GUI would be great. JSF is, of course, also to be seriously considered.

But we can not prevent a user to deploy his own "canonical" application based on AWT or Swing IMHO.

>That's why I proposed creating an UI factory.

+1 Smiling

Cheers,

p.b.

Not possible

I think it is not possible -- and a bad idea Eye-wink

The first problem is you can not simply create a factory but you would also need a whole set of interfaces (and having the components implementing them). But it would not be enough because the different toolkits use different ways to interact (hierarchy, events, ...) so you would need wrappers. Finally, the apps will be forced to use it.

Mozilla XUL is typical in this point of view, living in its own world. I don't think Java/JNode needs one more toolkit.

Instead, I suggest to focus only on Swing. And then to add support for other toolkits. The only problem is that Swing is not yet available in JNode.

Swing provides the structure to build what you want.

1) There is a lot of PLAF, including textual ones, 2D ones, 3D ones, ...

2) It is possible to implement the other toolkits with Swing. For example, LaOS implements AWT peers in Swing, SWTSwing implements SWT in Swing, there is XUL engines for Swing and I also have a partial implementation of LCDUI (midlets) in Swing, ... And other toolkits like Zaval or Thinlets use Graphics2D so they can run in Swing too.

Most of it is already part of JDistro. So I'm suggesting to keep only two UI in JNode: terminal and swing.

About Eclipse, the shortest way to bring it to JNode is to contribute to the SWTSwing project. SWTSwing is already able to run a lot of components/tests. http://chrriis.brainlex.com/projects/swtswing/

About Charva, it would be nice to have a pure ansi-terminal version (afaiu already there in JNode) and a Swing one. BTW, I don't think there is a lot of demand for Charva-like apps. Instead, why not to focus only on GUI and TUI ?

Guillaume

Text-Mode JNode

Hi,
I think that having Charva (or something similar) working should be one of the priorities in Jnode:
as in Linux we should keep the JNode System fully usable (and stable) without dependencies to the GUI Process.

The best (no other OS has this feature !!) should be having an UIFactory that when the System hasn't the GUIServer running, to switch to Text-Mode Render (for ex. by Charva), but in a transparent way. I know that this is really strong to do.

Then, work on Swing (and AWT) will be useful ... and then on others GUI.

Bye,
Sandro

What are we talking about ?

Hi,

>Mozilla XUL is typical in this point of view, living in its own
>world. I don't think Java/JNode needs one more toolkit.

I didn't understand Fabien's suggestion like that. I rather understood it as a convenient approach for keeping *state* of the *high-level* GUI, i.e. JNode's "desktop". This state could be kept as XUL objects that could be rendered by whatever GUI (within its limitations, of course). A kind of super look-and-feel switch... Smiling

But my understanding may be wrong !?

>Instead, I suggest to focus only on Swing. And then to add support
>for other toolkits.

Yes and yes !

>The only problem is that Swing is not yet available in JNode.

Correct. Obviously, JNode contributors (I am volunteer for a font engine) will have to do the hard work, but I wonder if these efforts aren't rather to be coordinated by GNU Classpath. My dream would be to have the opportunity to define the "native bindings" when generating GNU Classpath. See http://jnode.sourceforge.net/portal/node/view/269 for more details.

Cheers,

p.b.

Pierrick, you are right

Pierrick, you understood what I would like to say : having an application that describe its GUI components and that can switch between implementations (Swing or any other 'renderer').

XUL was just an example but I know very few about it.

Guillaume seems to have a better knowledge than me concerning different GUI toolkits (I mainly know Swing)

So, the swing PLAF is able to handle TUI like charva ? If possible, that's great !

In my understanding, we need to implement first Swing (in the GNU Classpath project and implement specific things in JNode). The others toolkits (AWT, SWT ...) will come after.

Fabien

Tui

> XUL was just an example but I know very few about it.

XUL is very interesting and I have looked at a dozen of engines. Most of them are nice and very usefull. But I think it wouldn't help for the multiple UI problem.

On the other hand, you're right that it could be used for applications. Do you already have (major) script interpreters running in JNode ? And if yes, which ones ?

> So, the swing PLAF is able to handle TUI like charva ?
> If possible, that's great !

Yes. I see no reason why it would not be possible but I don't think there is already an implementation, even non-Free. The main problem is that you can not reuse BasicLnF and you have to code everything.

IMHO, the main problem is the Graphics object and the buffering strategy. I still didn't find how to use/set my own Graphics in Swing. Even overloading getGraphics() in the toplevel ancestor doesn't work because the RepaintManager uses Volatile/BufferedImage. Anyway, you can still bypass it at the ComponentUI level.

Also I find this project quite interesting:
TUIAWT: A Text User Interface for the Java AWT
http://www.bmsi.com/tuipeer/

> We need to implement first Swing. The others toolkits
> (AWT, SWT ...) will come after.

Yes for Swing and SWT. But in Sun JRE, Swing depends on AWT. If you want to implement AWT on Swing, then you have:
JFrame -> Frame -> FramePeer -> JInternalFrame.
Not a problem but you have to be carefull. IMHO, the first thing needed is a way to get a Graphics2D for the screen (in JDistro I solved this issue by using a real, heavy JFrame for the screen but I would be glad to replace it).

Guillaume

Hi again, >XUL is very in

Hi again,

>XUL is very interesting and I have looked at a dozen of engines. Most
>of them are nice and very usefull. But I think it wouldn't help for the
>multiple UI problem.

Mmmh... see my post "What are we talking about ?"... and the answers. XUL would only be a convenient representation for GUI *state*. Just a suggestion though...

>IMHO, the main problem is the Graphics object and the buffering
>strategy.

Yes !

> I still didn't find how to use/set my own Graphics in Swing

See this promising french product Eye-wink : http://www.eteks.com/pja/en/.

Be warned however : text support is *very* poor (see my posts in the forum). We definitely need a decent font engine (and, to tell you the truth, I dont know *any* that would be part of a common OS's core)

>But in Sun JRE, Swing depends on AWT
> JFrame -> Frame -> FramePeer -> JInternalFrame.

That's where JNode / GNU Classpath have to put their efforts IMHO.

Cheers,

p.b.

XUL/PJA

> see my post "What are we talking about ?"... and the answers.
> XUL would only be a convenient representation for GUI *state*.
> Just a suggestion though...

I agree XUL could be used for apps. For me, it also means that it should not be part of the OS. The initial post was about using multiple UI. AFAIK, there is no XUL engine able to render nicely a UI with different toolkit, and especialy not a text-based one.

On the other hand, it is possible to have multiple UI for the same app. Each UI has to fulfill an interface. See VAInstall as an example: two Swing UI (classic and xtra), one text UI and one automatic UI. It would be easy to add some more. http://vainstall.sf.net/

> See this promising french product Eye-wink :
> http://www.eteks.com/pja/en/

This is both a promising and quite old product. It was a must when Sun JRE didn't support headless graphic operations. It is still very usefull.

Guillaume

Brain-storming continues

Hi,

>I agree XUL could be used for apps. For me, it also means that it
>should not be part of the OS.

Well... I'm changing my mind : I wonder if *every* event in the UI, whatever the architecture, shouldn't be hooked in order to store the UI state in a XUL structure that would be able to recreate a similar layout on a totally different UI ?

Never mind... this topic was just a variant of "playing with the plug-ins".

[about PJA]

>This is both a promising and quite old product. It was a must when
>Sun JRE didn't support headless graphic operations.

Yes, but shouldn't this product come to light again in a JNode context since JNode is... almost headless ? Furthermore, and I think it is Sun's error, don't the core classes rely too much on the underlying OSes ? I'm afraid my recent font considerations are just an example of this frustating policy...

Well... time for me to go : I won't let you have your beerS alone Smiling

Cheers,

p.b.

Let's make Fabien and Guillaume agree :-)

Hi,

>Pierrick, you understood what I would like to say : having an
>application that describe its GUI components and that can switch
>between implementations (Swing or any other 'renderer').

Fine. Guillaume is the guru here http://www.desnoix.com/apple2/.

He demonstrated that a generic framework (a desktop architecture) could be run on different (very) low-level implementations, didn't he ?

>Guillaume seems to have a better knowledge than me concerning
>different GUI toolkits (I mainly know Swing)

As Guillaume said, let's implement it first ?!

1) it would be a great step forward for JNode's "graphic" support.
2) if anybody wants a his own API, we could provide AWT/Swing, SWT/Swing or whatever packages : a good test case for them though...

But, to sum-up : Swing first. Whether this would be handled by JNode or GNU Classpath is another (yet urgent) problem.

Cheers,

p.b.

A][c

> Fine. Guillaume is the guru here http://www.desnoix.com/apple2/

This article was posted on April, 1st 2004 Eye-wink

Jave a beer on me :-))

>This article was posted on April, 1st 2004 Eye-wink

Geeee... have two Smiling

p.b.

JNode on apple IIc ;-)

Back to to the past ... the apple IIc but with new technologies !
Sure, it was really a great challenge but is also a good demo for small devices (pocket PC, PDA, credit card ...).

The first swing components are already in Classpath project.
The main problem is where to find/define separation between VM specific and the VM independant things (for Swing but not only). It don't know the Classpath team opinion on this point.

Fabien

Pure Java

Until '98, Swing was a pure Java, independant, API. So nothing was depending on the VM, just on AWT. Unfortunately, Sun broke this very nice feature. I guess the main reason was to improve the performances.

> It don't know the Classpath team opinion on this point.

GTK. I think they prefer to use the native libs. It has quite a lot of advantages. The libs are highly developped, strongly tested and widely used. Think interoperability and integration. But this is not very good for JNode.

Why separate ?

Hi,

Brainstorm today... before the long WE break Smiling

>The main problem is where to find/define separation between VM >specific and the VM independant things (for Swing but not only).

Why do you want to take Swing oustide of the VM ? Basically, whatever your complex graphic function, you "just" need to output pixels on a screen, a printer, an image file...

So, virtually anything could be managed by the VM until an "atomic" instruction is sent to the device.

Of course, if a device supports (notion of "multiple-level capabilities") complex curve drawing, fast bitmaps, multiple layering, auto-anti-aliasing or whatever, the JVM would better have to call those instructions first. That may result in multiple declinations of Graphics2D.

>It don't know the Classpath team opinion on this point.

I'm afraid their opinion is clear : GTK everywhere Smiling Sorry... just kidding.

Cheers,

p.b.