You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So after closing the original thread where the idea was designed, we know are that much closer to our graphic systems. With remote renderers complete and local one's in the works, one question still remains.
"So how do I make a window?"
Whether we treat the content of a window as a page, a canvas, or whatnot, the actual process to create this, and interface to work with it needs to be standard for apps to work across NodeOS platforms. Ideally, a well designed platform can also have a shell to allow it to run on platforms other than NodeOS.
The simplest way to go about this is to create a module. This modules sole job would be to tell whatever window manager happens to be on the device, to create a window (via some interface). And allow the app to render to the window. That is all, as any additional manager specific features could be included separately in different modules by that window manager's maintenance team.
Seeing that apps need to work in the browser, this 'module' could be a dual that work both as an import or a nodejs module. I will create a repository for us (the nodeos community) to begin hacking away at a system that works.
needs to be standard for apps to work across NodeOS platforms.
I meant to say, it needs to be standardized for it to work across NodeOS window managers. As not all managers may chose to run apps fullscreen, they need to be asked first and interacted with when an app works with a window.
And don't forget that apps which do not run on a Desktop will always be rendered as full screen apps, since the framebuffer size will be set to full screen... They do not have anything like a windowing system, this is oart of the desktop. I think we should make a standard format for apps that do run on Desktops, since they won't be able to just be a standard webpage ...
Isn't this fixed with the URLs design I proposed to launch GUI apps backend
servers? Or are you talking about a common protocol for the desktop
environments to interact with the window manager (maximize, minimize,
close...)? If so, the important part is to have a common API that all apps
could agree, and for this se could write a library that overwrite the
current methods for the browser Window object (or implement them for
non-browser environments). Is it really needed to store some state on the
Desktop Environment backend server? I think the Window Manager could (and
should) be implemented purely client side as Os.js does...
El 1/3/2016 4:53 AM, "Lite McFish" notifications@github.com escribió:
So after closing the original thread where the idea was designed, we know
are that much closer to our graphic systems. With remote renderers complete
and local one's in the works, one question still remains.
"So how do I make a window?"
Whether we treat the content of a window as a page, a canvas, or whatnot,
the actual process to create this, and interface to work with it needs to
be standard for apps to work across NodeOS platforms. Ideally, a well
designed platform can also have a shell to allow it to run on platforms
other than NodeOS.
The simplest way to go about this is to create a module. This modules sole
job would be to tell whatever window manager happens to be on the device,
to create a window (via some interface). And allow the app to render to the
window. That is all, as any additional manager specific features could be
included separately in different modules by that window manager's
maintenance team.
Seeing that apps need to work in the browser, this 'module' could be a
dual that work both as an import or a nodejs module. I will create a
repository for us (the nodeos community) to begin hacking away at a system
that works.
—
Reply to this email directly or view it on GitHub #215.
In other words: KISS (Keep It Simple, Stupid) and DRY (Don't Repeat
Yourself) rules ;-)
El 1/3/2016 8:08 AM, "piranna@gmail.com" piranna@gmail.com escribió:
Isn't this fixed with the URLs design I proposed to launch GUI apps
backend servers? Or are you talking about a common protocol for the desktop
environments to interact with the window manager (maximize, minimize,
close...)? If so, the important part is to have a common API that all apps
could agree, and for this se could write a library that overwrite the
current methods for the browser Window object (or implement them for
non-browser environments). Is it really needed to store some state on the
Desktop Environment backend server? I think the Window Manager could (and
should) be implemented purely client side as Os.js does...
El 1/3/2016 4:53 AM, "Lite McFish" notifications@github.com escribió:
So after closing the original thread where the idea was designed, we know
are that much closer to our graphic systems. With remote renderers complete
and local one's in the works, one question still remains.
"So how do I make a window?"
Whether we treat the content of a window as a page, a canvas, or whatnot,
the actual process to create this, and interface to work with it needs to
be standard for apps to work across NodeOS platforms. Ideally, a well
designed platform can also have a shell to allow it to run on platforms
other than NodeOS.
The simplest way to go about this is to create a module. This modules
sole job would be to tell whatever window manager happens to be on the
device, to create a window (via some interface). And allow the app to
render to the window. That is all, as any additional manager specific
features could be included separately in different modules by that window
manager's maintenance team.
Seeing that apps need to work in the browser, this 'module' could be a
dual that work both as an import or a nodejs module. I will create a
repository for us (the nodeos community) to begin hacking away at a system
that works.
—
Reply to this email directly or view it on GitHub #215.
And don't forget that apps which do not run on a Desktop will always be rendered as full screen apps,
Yes because of this the "window size" params would only be preferences.
Or are you talking about a common protocol for the desktop
environments to interact with the window manager (maximize, minimize,
close...)?
I would assume the window manager would be a part of the desktop environment and that the developer of the desktop environment should ensure the two are compatible. By a rendering protocol I mean, say I'm an app. How do I make a window to show my content to? Apps ought not to be limited to one frame. The ARP would specify how apps ough to simply create window. From there on, the interactions with it and such are all specific to the window manager.
Yes because of this the "window size" params would only be preferences.
I'm not sure if there's already support for this on HTML/Javascript or only as a parameter when calling window.open()... If so we should use it instead of invent our own mechanism.
I would assume the window manager would be a part of the desktop environment and that the developer of the desktop environment should ensure the two are compatible.
I agree.
By a rendering protocol I mean, say I'm an app. How do I make a window to show my content to?
Simple: use window.open() :-)
Running full-screen without a desktop manager? The browser native method will be used.
Running inside a HTML5 Desktop Environment? The Desktop Environment would have overwrite the window.open() method of the app window iframe so it will call the Desktop Environment internal mechanism to create a new window (mostly create a new iframe, but it would be whatever).
Running on an "alien" environment (for example a framebuffer-based renderer)? That environment should emulate the window.open() method someway.
Apps ought not to be limited to one frame. The ARP would specify how apps ough to simply create window. From there on, the interactions with it and such are all specific to the window manager.
I agree, but as I've said, I think it's just enough that all Desktop Environments and Window Managers use a common API, and the most obvious one is to use the methods from the browser Window object.
I am working on a new app framework fork Silk which is compatible with electron. Stretto already runs in Silk.
It requires nodeIntegration to be disabled in all windows and will not support preloading files. I have only found a couple electron apps that meets those requirements. But all apps made for Silk will run on Windows, OSX and Linux with no modifications.
nodeIntegration is what makes possible to access Node.js APIs directly from the HTML/client side code, isn't it? +1 to require it to be disabled, makes it more difficult to program but the architecture is more elegant and flexible.
By using window.open we actually break compatibility with existing browsers. Since window.open() exists already, when called in a browser it would create an additional window even though the code is already being run in one where as on node it doesn't have one. We also can't immediately create a window when imported into the module (required) if it's a module that is, because the app may not want to use the window right away (and hence the developers might have preferred to create it later)
The proposal solution is to implement both functions. One function would be used only at start to create the initial window browsers would already have. If called in a browser this would throw an error. However, developers can use a simple pollyfill to solve. If the function name was buildFrame then if(window.buildFrame) { window.buildFrame("window", 720, 480); }
I am working on a new app framework fork Silk which is compatible with electron. Stretto already runs in Silk.
If you chose to support nodeOS, you could easily just import said 'window' module and expand it to your users. I'm reserving the npm name 'frame' for it.
By using window.open we actually break compatibility with existing browsers. Since window.open() exists already, when called in a browser it would create an additional window even though the code is already being run in one where as on node it doesn't have one.
I understand your concerns, but you are taking a bad point of view: we are writting a Windows Manager using HTML iframes as containers to host the GUI apps "windows" content. The point is, you are missing that fact that each one of these iframes has its ownwindow object, and independent from the browser "main frame" one (the Desktop Environment / WIndow Manager). Taking this in account, nothing forbids us to inject code that overwrite the window.open() method inside that iframe to do a postMessage() call to the parent frame (the Window manager) to create a new iframe for the new GUI app "window" instead of having the browser default behaviour of create a new browser window, and in fact this is something similar to what Firefox does to show modal windows inside the browser rendering region instead of OS level independent windows. The main problem would be how to know when to inject that code on the iframe, since it must be on each iframe navigation change after the current page clean-up (if any) and just before the new page start downloading and executing new content.
Taking this in account, nothing forbids us to inject code that overwrite the window.open() method inside that iframe to do a postMessage() call to the parent frame (the Window manager) to create a new iframe for the new GUI app "window" instead of having the browser default behaviour of create a new browser window
Well... here we have something that could be discussed, what protocol to follow in this postMessage() based communication, this way the injected code to overwrite the behaviour of the window object on the iframes would be common and the diferent Windows Manager only would need to listen for this messages and process them :-) The most simple and minimal solution here is to use a 1:1 mapping from the window object method names and their calls positional arguments to JSON-RPC requests. Only problem I would find here is that I believe most of these methods are sincronous... :-/
Well... here we have something that could be discussed, what protocol to follow in this postMessage() based communication, this way the injected code to overwrite the behaviour of the window object on the iframes would be common and the diferent Windows Manager only would need to listen for this messages and process them :-) The most simple and minimal solution here is to use a 1:1 mapping from the window object method names and their calls positional arguments to JSON-RPC requests. Only problem I would find here is that I believe most of these methods are sincronous... :-/
Ah. I haven't worked much with JSON-RPC so I wouldn't be to useful here.
I understand your concerns, but you are taking a bad point of view: we are writting a Windows Manager using HTML iframes as containers to host the GUI apps "windows" content. The point is, you are missing that fact that each one of these iframes has its own window object, and independent from the browser "main frame" one (the Desktop Environment / WIndow Manager).
@Coretool Yeah... no. XD have fun with that. It's modified CEF impements x11 on linux (maybe support wayland) but the struggle it would take to implement it for the fb is real.
@piranna@Coretool sounds good. Awaiting a working noGui build. Let me
know if you guys get anywhere!
Could someone take a look on the docs how to give an URL to QtWebkit, at
least a hardcoded one? I only get a blank page (the same as @formula1 with
its experiment with webkit.js...).
Lol :-P Yes, you're right. We need more error checking there, since at this moment it hides the console output and gets control of the keyboard and only way is to swith off the machine, that's tedious to test...
I'm going to checkout breifly how embeddable servo is. They recently (I think last week) showed an intense proof of concept that rendered Rediculous things at > 60 fps. They acheived this through offloading most of the work to the GPU (so GPU-less machines may still be in trouble) but they are really doing great stuff over there. I really wouldn't be too suprised if a rust javascript engine becomes standard over time.
EDIT: Cancel that thought. Its still way too early and pretty laggy. Long term it would be great but unrealistic for the time being
I'm going to checkout breifly how embeddable servo is. They recently (I
think last week) showed an intense proof of concept that rendered
Rediculous things at > 60 fps. They acheived this through offloading most
of the work to the GPU (so GPU-less machines may still be in trouble) but
they are really doing great stuff over there. I really wouldn't be too
suprised if a rust javascript engine becomes standard over time.
It would be good to have several rendering engines to compare. I'm going to
try to find some time to fix the ICU static compilation, but if someone
wants to take a look on it or avout getting noGUI to render something, any
help will be welcome. In that way, I was thinking we could be able to
enable X11 support to make it easier to test and when we get something
usable disable it again, what do you think?
It would be good to have several rendering engines to compare.
I'm now contending with the struggle of designing and constructing my own mostly taking inspiration from Blink. Hopefully I'll be able to give more insight on possible solutions with my greater understanding of web engines when I'm done this project (Velocity)
@piranna I think I have to add some logging to noGui, it doesn't throw errors at all :/ ... I know that the 'normal' desktop version works but I've really no plan, why the static one doesn't... Enabling X11 would be great for testing and maybe a first release since it would make the qt stuff far easier (querying the display size, setting the view size etc ... even if I'm not sure if this would still be needed )
Activity
mitsukaki commentedon Mar 1, 2016
I meant to say, it needs to be standardized for it to work across NodeOS window managers. As not all managers may chose to run apps fullscreen, they need to be asked first and interacted with when an app works with a window.
Coretool commentedon Mar 1, 2016
And don't forget that apps which do not run on a Desktop will always be rendered as full screen apps, since the framebuffer size will be set to full screen... They do not have anything like a windowing system, this is oart of the desktop. I think we should make a standard format for apps that do run on Desktops, since they won't be able to just be a standard webpage ...
piranna commentedon Mar 1, 2016
Isn't this fixed with the URLs design I proposed to launch GUI apps backend
servers? Or are you talking about a common protocol for the desktop
environments to interact with the window manager (maximize, minimize,
close...)? If so, the important part is to have a common API that all apps
could agree, and for this se could write a library that overwrite the
current methods for the browser Window object (or implement them for
non-browser environments). Is it really needed to store some state on the
Desktop Environment backend server? I think the Window Manager could (and
should) be implemented purely client side as Os.js does...
El 1/3/2016 4:53 AM, "Lite McFish" notifications@github.com escribió:
piranna commentedon Mar 1, 2016
In other words: KISS (Keep It Simple, Stupid) and DRY (Don't Repeat
Yourself) rules ;-)
El 1/3/2016 8:08 AM, "piranna@gmail.com" piranna@gmail.com escribió:
mitsukaki commentedon Mar 1, 2016
Yes because of this the "window size" params would only be preferences.
I would assume the window manager would be a part of the desktop environment and that the developer of the desktop environment should ensure the two are compatible. By a rendering protocol I mean, say I'm an app. How do I make a window to show my content to? Apps ought not to be limited to one frame. The ARP would specify how apps ough to simply create window. From there on, the interactions with it and such are all specific to the window manager.
piranna commentedon Mar 1, 2016
I'm not sure if there's already support for this on HTML/Javascript or only as a parameter when calling window.open()... If so we should use it instead of invent our own mechanism.
I agree.
Simple: use
window.open():-)window.open()method of the app windowiframeso it will call the Desktop Environment internal mechanism to create a new window (mostly create a new iframe, but it would be whatever).window.open()method someway.I agree, but as I've said, I think it's just enough that all Desktop Environments and Window Managers use a common API, and the most obvious one is to use the methods from the browser Window object.
zodern commentedon Mar 1, 2016
I am working on a new app framework fork Silk which is compatible with electron. Stretto already runs in Silk.
It requires nodeIntegration to be disabled in all windows and will not support preloading files. I have only found a couple electron apps that meets those requirements. But all apps made for Silk will run on Windows, OSX and Linux with no modifications.
piranna commentedon Mar 1, 2016
nodeIntegrationis what makes possible to access Node.js APIs directly from the HTML/client side code, isn't it? +1 to require it to be disabled, makes it more difficult to program but the architecture is more elegant and flexible.mitsukaki commentedon Mar 2, 2016
By using window.open we actually break compatibility with existing browsers. Since window.open() exists already, when called in a browser it would create an additional window even though the code is already being run in one where as on node it doesn't have one. We also can't immediately create a window when imported into the module (required) if it's a module that is, because the app may not want to use the window right away (and hence the developers might have preferred to create it later)
mitsukaki commentedon Mar 2, 2016
The proposal solution is to implement both functions. One function would be used only at start to create the initial window browsers would already have. If called in a browser this would throw an error. However, developers can use a simple pollyfill to solve. If the function name was buildFrame then
if(window.buildFrame) { window.buildFrame("window", 720, 480); }quick and easy fix!
mitsukaki commentedon Mar 2, 2016
If you chose to support nodeOS, you could easily just import said 'window' module and expand it to your users. I'm reserving the npm name 'frame' for it.
piranna commentedon Mar 2, 2016
I understand your concerns, but you are taking a bad point of view: we are writting a Windows Manager using HTML
iframesas containers to host the GUI apps "windows" content. The point is, you are missing that fact that each one of theseiframes has its ownwindowobject, and independent from the browser "main frame" one (the Desktop Environment / WIndow Manager). Taking this in account, nothing forbids us to inject code that overwrite thewindow.open()method inside thatiframeto do apostMessage()call to the parent frame (the Window manager) to create a newiframefor the new GUI app "window" instead of having the browser default behaviour of create a new browser window, and in fact this is something similar to what Firefox does to show modal windows inside the browser rendering region instead of OS level independent windows. The main problem would be how to know when to inject that code on the iframe, since it must be on eachiframenavigation change after the current page clean-up (if any) and just before the new page start downloading and executing new content.piranna commentedon Mar 2, 2016
Well... here we have something that could be discussed, what protocol to follow in this
postMessage()based communication, this way the injected code to overwrite the behaviour of thewindowobject on theiframeswould be common and the diferent Windows Manager only would need to listen for this messages and process them :-) The most simple and minimal solution here is to use a 1:1 mapping from thewindowobject method names and their calls positional arguments to JSON-RPC requests. Only problem I would find here is that I believe most of these methods are sincronous... :-/mitsukaki commentedon Mar 2, 2016
Ah. I haven't worked much with JSON-RPC so I wouldn't be to useful here.
Ah okay, that makes a lot more sense
13 remaining items
Coretool commentedon Mar 4, 2016
@piranna I've looked into building electron and I don't think that it would be easy to make it render to the linuxfb...
piranna commentedon Mar 4, 2016
Sh*t... :-(
mitsukaki commentedon Mar 5, 2016
@Coretool Yeah... no. XD have fun with that. It's modified CEF impements x11 on linux (maybe support wayland) but the struggle it would take to implement it for the fb is real.
What other options do we have?
Coretool commentedon Mar 5, 2016
Just stick with noGui (or start with it ^^) and iframes ^^
piranna commentedon Mar 5, 2016
Good idea, let's get something working and later we'll move on.
El 5/3/2016 9:33, "John Green" notifications@github.com escribió:
mitsukaki commentedon Mar 6, 2016
@piranna @Coretool sounds good. Awaiting a working noGui build. Let me know if you guys get anywhere!
piranna commentedon Mar 6, 2016
Could someone take a look on the docs how to give an URL to QtWebkit, at
least a hardcoded one? I only get a blank page (the same as @formula1 with
its experiment with webkit.js...).
Coretool commentedon Mar 6, 2016
@piranna Take a look at noGui. (main.cc) It does that ^^ Change the code in
QUrl()to your url. Are there any network errors or what ?piranna commentedon Mar 6, 2016
Lol :-P Yes, you're right. We need more error checking there, since at this moment it hides the console output and gets control of the keyboard and only way is to swith off the machine, that's tedious to test...
Coretool commentedon Mar 6, 2016
Yeah... I've to add the keyboard shortcuts and so on.
formula1 commentedon Mar 6, 2016
http://doc.qt.io/qt-5/qwebview.html#load
Is this the method you're looking for?
I'm going to checkout breifly how embeddable servo is. They recently (I think last week) showed an intense proof of concept that rendered Rediculous things at > 60 fps. They acheived this through offloading most of the work to the GPU (so GPU-less machines may still be in trouble) but they are really doing great stuff over there. I really wouldn't be too suprised if a rust javascript engine becomes standard over time.
EDIT: Cancel that thought. Its still way too early and pretty laggy. Long term it would be great but unrealistic for the time being
Coretool commentedon Mar 6, 2016
@formula1 Yes, it's this method.
piranna commentedon Mar 6, 2016
It would be good to have several rendering engines to compare. I'm going to
try to find some time to fix the ICU static compilation, but if someone
wants to take a look on it or avout getting noGUI to render something, any
help will be welcome. In that way, I was thinking we could be able to
enable X11 support to make it easier to test and when we get something
usable disable it again, what do you think?
mitsukaki commentedon Mar 7, 2016
I'm now contending with the struggle of designing and constructing my own mostly taking inspiration from Blink. Hopefully I'll be able to give more insight on possible solutions with my greater understanding of web engines when I'm done this project (Velocity)
Coretool commentedon Mar 7, 2016
@piranna I think I have to add some logging to noGui, it doesn't throw errors at all :/ ... I know that the 'normal' desktop version works but I've really no plan, why the static one doesn't... Enabling X11 would be great for testing and maybe a first release since it would make the qt stuff far easier (querying the display size, setting the view size etc ... even if I'm not sure if this would still be needed )