-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App Organization #23
Comments
Thanks for bringing this up. I have been thinking about this for a while. I agree that we should switch to package.json. If an app uses bower or needs anything else done on install it can add it to the install script. Then the bower components would be in the app's folder and it will have the versions it needs. I don't think there is a reason to also support app.json. Files
|
Since the app's id is in the url, on each restart an app would get a new url which requires the window manager to be reloaded. We could save the id in package.json, or we could save it in the db in ~./silk. We should also save if npm install was run successfully.
|
Do you think its a good idea to create a seperate folder for the app manager? Would you mind if I reorganized a bit? |
Are you wanting to move the App Manager app into core?
Feel free to.
Thanks for the link. I have already gained some ideas by looking at it. |
The abstraction of it yes. Perhaps its good to put it into a seperate repository (again :P) Let me know any thoughts. Should we do this in another repo? A couple of things that should be seperated out
Important aspects about the Client and Server
What we know as a fact is the app manager can
Client
From here, how the windows are displayed (whether they are dragged and dropped or full screen) doesn't matter. So here are some facts
|
We should switch to ES2015. For async and await we will need to use babel or something similar since V8 doesn't support it yet. The code for async and await seems more complicated. I will try it in a project this weekend. Messaging API - We have two implementations, one on the server and one in the client api. We should switch to the client api one. How do you want to go deeper? I think we should also move the client API to it's own repository and publish it on bower and npm. Data Synchronization API: There is three places that could be synchronized:
I agree we shouldn't worry about permissions yet. I agree with almost everything you wrote about the application manager. Would the window manager use the ApplicationManager? That makes a lot of sense since the window manager is designed to be easily replaced. We want to eventually allow apps like http://benkaiser.github.io/stretto/ and https://www.nylas.com/n1, and maybe even github atom to work with minimal modification. I think it would be easier with electron than nw.js. I will do some experimenting this weekend. A first step could be allowing silk apps to run outside of silk and in electron. |
Electron has an option to disable nodeIntegration in windows: var mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: false
}
}); We would only be able to support apps that disable the node integration. We might also need to have our own module for communication between the window and the main process to support running in silk, in electron, and remotely in silk. |
I am going to work on this over the next week. This is my plans for now:
@formula1 Do you have time to help with this? |
External apps is finished. They have a green underline on hover in the app menu. |
Yes and no, at the moment there was another project that grabbed my attention and/or could bring more developers into NodeOS core https://github.com/guisouza/tEmbO - tEmbO is a tiny replacement for react but it has far bigger implications. For example:
The Communication API is absolutely paramount to your work (as well as a number of projects I work on). I absolutely agree we should probably more the communication api into a new repo. I got started on this earlier But I hadn't worked on it for a while because of how crazy/tedious it can get. I'll push up what I have though either today or tomarrow. |
That is an interesting project. I am excited for what you create! It could also be used to automate creating UGUI apps. Let me know when you push the communication api. We have it implemented in 3 or 4 places in Silk and all have some problems. It would be nice to have one library that works well. |
https://github.com/formula1/JS-Messaging Not quite ready though. There are alot of things I have yet to implement. But I'm trying to start things fresh. |
I have been thinking about this a lot recently. Our priorities for the app manager should be (not necessarily in this order):
To refresh the app, when running with --dev we can use nodemon or our own watcher to restart the app on a change. The developer could have webpack-dev-server to refresh only the client, and for projects that don't, we can have a refresh button in the task bar.
The problem with that is we lose our "free" remote access. Once option is only allow remote access for apps with nodeIntegration set to false, and maybe in the future have a hybrid approach with part of the screen using a remote desktop protocol. |
So this started off being about the removal of bower, but I think its a good time to understand what Silk does/doesn't, what an app does/doesn't and how we plan to process it
app.json -> package.json
Since npm is the package manager of everything, it makes it easier for us to just add parts onto the package.json. This is common in things like jscs, js-lint and other linters. For our purposes, we ought to allow both implementations but a few things should be made clear
Usage of WebComponents: bower, browserify and the future
Currently we are using tablesaw and materialize in an important way inorder to provide applications to the client. However, as applications become more isomorphic the destinction between client and server starts to fade. In my opinion, this puts us in an awkward situation.
We probably shouldn't remove bower but we should take a heavy look in how how we want to install "building blocks" for applications and how we want to ensure these aspects are available
Files/Streams, "auto-open", choose an application
I put files and streams in the same boat because at some point I think we will want to implement a similar situation for audio, video and streaming text (ansii characters from the terminal as an example)
As it stands we are using regex which is likely not the best implementation. By basing it off something like accepts we have a further integrated ourselves in a web standard (http headers). And as those get updated, we get updated.
As for streams, this is also particularly important to me simply because streaming video/audio is something I use daily (twitch.tv) and I strongly believe its something that we can benefit from.
Routing: A node application, a seperate environment, a terminal interface or more?
Looking into the future, eventually rendering of an html will likely be done through a node application. Something to the effect of
Looking towards this future what eventually happens is instead of of client application sending text through websockets we will be sending them directly through node. Since this case we should also be thinking of our apps in this way as well. Apps ability to change through own router is imperitive in addition to our own ability to add and remove them as well.
The text was updated successfully, but these errors were encountered: