Open formula1 opened 10 years ago
There are 2 places that need to communicate:
Eventually we might want to add a server api, but so far there hasn't been a need.
I'm guessing you'll probably want to implement RTC at some point as well
I haven't thought of it yet.
Remote Applications
I plan to have an app for users to create custom apps. The user can put in a name, url, icon and maybe a couple other settings. There is a lot of potential like what you mentioned.
Options
I prefer the promises and pub sub. Callbacks seem to get more complex.
Should streams be enabled by something like methods.stream()? The examples I have found have a node client. Do web pages treat streams as a normal response?
$("Application.editor[accepts=text/html]") .openFile("path/to/the.file") .done(function(){ $(this).focus() }).error(function(){ $("Application.packagemanager[serves=apps]") .focus() .search("Applications.editor[accepts=text/html]") });
I really like that idea. One concern is would it require storing the data in the DOM?
I have decided to read Javascript Patterns to better understand Javascript.
Starting and Stopping Services - One thing I'm currenlty in the process of fixing is stopping an application on the server without stopping the entire system. I'm going to be using child_process for this. However, This will also add a communication layer between the server and an application.
That will be important for Silk to be lightweight - starting and stoping apps when needed instead of always having them running.
The Common API
So, heres what we can do.
add
method. For requests we're using call
. We can use the same thing, however I think get
and give
or something similar may be better. get
is used in multiple libraries as well as being a common HTTP concept. give
is generally library dependent, express has use/get/post, I'm guessing meteor has add.on
and off
for listeners as well as an emit
for emitters. I want to make it regexified however I believe that may be a lost cause for the time being as the event syntax may change. We can also extend event emitters as we please instead of wrapping them.RTC
This is one of the things I'm going to do next because I think its interesting.
Server Connections API
This will be important at somepoint, however I also think it ties in strongly with security and ensuring apps don't conflict when it comes to port numbers. This may also be a new issue as well
Selector
I'm Opening up a new Issue for this
As it is, Communication between Frames is done through JsChannel, Server and Client Websockets and I'm guessing you'll probably want to implement RTC at some point as well (not because its necessary but because its fun). However, the communication between everything is different. Theres a few things that I've thought about
The Question
People (including me) generally don't want to learn 5+ different ways of doing very similar tasks
Necessities
Options (Can mix and match as we please)
Our System Now
Thoughts
jQuery is the standard of Clientside Web Development. Whether its the sexy use of css selectors, the animation api or just making ajax requests it is the bees knees compared to native. I question if we can implement something similar such as
$("Application.editor[accepts=text/html]") .openFile("path/to/the.file") .done(function(){ $(this).focus() }).error(function(){ $("Application.packagemanager[serves=apps]") .focus() .search("Applications.editor[accepts=text/html]") });
It doesn't have to be that specific syntax but I believe there is potential. I believe you were starting this with silk but am not 100% sure.