Wow great Kevin. Really interesting to see the thought process and how the ideas and solutions are getting better and better. Interesting Cef takes a window object to be added to, I had not thought about it exactly like that before. Excited to see the end result of these ideas :-)
Simon
--
You received this message because you are subscribed to the Google Groups "appjs-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appjs-dev+...@googlegroups.com.
To post to this group, send email to appj...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Wow that was fast, assumed it would be more challenging!
Wow well done again Ingwie! Amazed at the pace of these developments - keep up the great work.
Simon
Okey! Some new news from what I have here...and I have a near-alpha O.O!
So, the process is now going in a way that is different from before. I am patching the node.gyp and node_natives.h file in order to enable native modules to be compiled into the nodejs binary - same with javascript modules. That way, I have implemented ph7, native addon, and optimist (with its dependencies wordwrap and minimist) into the nodejs binary...but I am not done. So, here is a list of the status:
- FLTK+CEF PoC: It works. I can launch CEF thru FLTK, I just need to add minimal, platform specific, code to enable multiple windows and such...its really small. :o
- FLTK+CEF for NodeJS: Bindings in process. I am currently having some issues with GYP again x.x; And, well, with splitting the different calls. Its not easy, but its the biggest challange. But once this monster is done, then we have the browser we want. :)
- ph7: Its buggy currently, and I have a lot of redundant code. I have to work thru it, and fix it. But the base by itself actually works - but not all the things get converted correctly into ph7_values. o-o
- Deskshell-Core: The core code is already half-done. This is the code, that runs instead of nodejs' actual main() function. It can differenciate on the different file extensions, and such. So, its going somewhere.
- Deskshell: The public API is not done - yet.
- ttvfs: This is a new piece of C++ code i found. It enables AMAZING! features. I'll explain that in a bit.
So, yeah, ttvfs... ^^
A while ago, I was looking for some really exotic kinds of software; virtual file systems, reading RAM as a block device (to interpret it as FAT32) and things like that. Then, very randomly, I came across this small project called ttvfs: https://github.com/fgenesis/ttvfs
This VFS implementation does not just offer a cross-platform way to manipulate and handle files...no, it offers a special way of handling internal buffers. In fact, I can turn a char buffer into memory file. Here is a short bit of code to demonstrate what I ment:
// Now, lets create a memfile.
VFSFileMem* memZD = new VFSFileMem("data.zip", ZipData, ZipData_length, VFSFileMem::REUSE);
vfs.GetDirRoot()->add(memZD, true, VFSDir::NONE);
// Mount the memory-virtual data.zip as a folder called data.
vfs.AddArchive("data.zip", false, "data");
After the .AddArchive call, we now can access the contents of data.zip like it was a folder - AND data.zip is actually a char buffer residing in memory. That is cool, is it not? Okay, maybe you didnt understand what it does yet... So, let me word this differently.
> - ...
Pretty cool... That's an awesome step to a working POC... Like Simon said, can't wait to see it happening...
Take your time and play around with it. This is a really good direction and it is worth getting it to work really well. I am sure many similar problems will popup and you will get around them as you always do. Don't be stressed by us looking forward to the end result we all understand this will take its time, but is well worth investing in.
Simon
Take your time and play around with it. This is a really good direction and it is worth getting it to work really well. I am sure many similar problems will popup and you will get around them as you always do. Don't be stressed by us looking forward to the end result we all understand this will take its time, but is well worth investing in.
Simon
>Reason? Because…see. In libcef, and in nodejs’ binary, we have the same symbols defined. Therefore, I need to get the v8 engine matched. And I mean, very matched - same revision, same release. Then, I am quite curios about what will happen in memory. Say the dynamic symbol lookup („dyld" on mac) finds the symbol for v8::Initialize in node and CEF - which one will it choose, which one will allocate its memory, and where? I heared that dynamic libraries have their very own way of being allocated in memory. Its confusing to me, but I’ll know…at some point o.o
Good points Ashish, you are very welcome to the discussion, I know you have previously made excellent technical contributions. Maybe you and ingwie can get connected on chat and discuss ideas. If you do that post the conclusions to the mailing list so everyone is informed.
Simon
--
It is great to see somebody so much dedicated :)
I think that V8 is static library . Have you compiled it as dynamic library ?Even then think about it like that if somebody created a library like you know printf or cout functions of c and c++ are also in library, then if multiple programs use them, they should be given different memory, otherwise output of one program would garble into others :)Libraries are just code. Whichever process uses that code is given separate memory. So i think that if CEF and nodejs are separate process, they would be having different run-time v8 engines instances.if we put the nodejs and CEF in one process such that they both share same v8 instance then the thing would work out of box. ( original appjs was one process but had two v8's, so it required that js-bridge that mirrored everything in both lands ) it was like desksheel minus 'websockets'.
Also, if we study CEF3 architecture, i think ( i am not 100% sure ) that like when we open new tabs in chrome, it creates new renderers and new v8 engines in the renderer. So v8 is not designed to be like one global thing, from which both CEF or nodejs could talk.
I just have a random thought that if we can let CEF create its v8 and then we just expose the v8 - handler and where nodejs initiates v8, pass that handler there, may be furthur nodejs internal-objects would be created in the same v8.
> Its just the issue of finding two API-compatible v8 engines - in nodejs, and CEF. The problem isnt made easier with the fact that currently latest CEF has strong issues on OS X when running from the command line - it throws GL errors all over the place o_o. So I have to stick with the versionb efore that.
Quick note here: problem will be javascript is designed to be single threaded in its execution but with 2 v8 and two threads able to access same memory and objects you will get strange bugs and errors.
Very short reason: one command in JS may have many actual steps that are carried out in sequence, whoever in the middle of that sequence second v8 can be context switched in to the processor and execute on the same object / data. This is unexpected for the original programmer and undefined what will happen, e.g. if one v8 creates overwrites a text file with new text and another v8 reads the file maybe you get part of the text from first version of the file then context switch and you get the rest of the content from the second version of the file. Massively weird bug almost impossible to debug. This is why parallel programming is really tricky, this is one reason nodejs is way cool because event oriented means you can write complex applications but can ignore the hard parallel stuff.
Not sure that was well written or easy to understand but this area is tricky. Having a "web socket" interface between the two v8 (a pretend one with same properties but messages copied from one to the other instead of going over the network) smartly avoids all of these problems and makes solution easy to use and no weird bugs. This is Simons "conservative" approach.
Having said that direct access to jquery and the dom from nodejs is beautiful and may be worth doing any way (with a disclaimer ok this could be dodgy).
Another point though is I am coming with the traditional accepted approach to these problems so I don’t want to shut down the creativity, a fresh pair of eyes looking at the problem without preconceived ideas can come up with innovative solutions that are very smart. So play around and see if we can get something that is safe but cool.
Simon
Great sounds good, give it a try. As I tried to say go for it I am not putting the brakes on just flagging up relavent issues as they can be helpful to think through. Sounds like a good solution. If that global object had a function to register an event listener for a named event and a function to trigger a named event then you basically have a socket like api (json object as parameter in).
Simon
Simon
Only if the two v8’s matches, then I can be sure that moving objects between them will work as expected - and that I can use the same api across the entire app. Thats important, for memory management and for API maintenance. o.o
Ashish, if you wish to be added to the Deskshell-Core github group, just give me your handle :3
var fltk_cef = require("fltk_cef");var browser = new fltk_cef.Browser();var MirrorObject = browser.mirror;MirrorObject.myfunc = function(){ console.log("Meep"); };
Well, multiple threads can access the same data. I just have to implement things like Mutexes. In v8, that is a v8::Locker :)
For anybody who is curios, I have published my current work. Thing is, I am kind of burnt out X3. Not been able to really do a lot of coding...my mind went kind of dizzy, as I was getting back into doing simpler things. For one, I am trying to extend a build tool called ... "build". I am adding functions and the like to check for headers, tools, and the like. so it can be like a minimal CMake. It is so cool, that it got a minimal scripting language too - which is very, very clean. Like, we can do things like this:
A build config:
# This is how a target looks like.
target "test" {
# We build an EXEcutable.
rule "exe";
# We define inputs...
input [files("*.cpp")];
}
# And this is an action.
action "all" {
# We tell the tool that we want to build the target Test.
build: "Test";
}
Output:
$ build
--- build test ---
[ 0%] deps: functions.o
[ 33%] cpp: functions.o
[ 33%] deps: main.o
[ 66%] cpp: main.o
[ 66%] deps: test
[100%] exe: test
So, I am planning to utilize this more often now, and it will also run the overall building process of deskshell. Its being made Windows compatible atm...Well - that is what I am doing when my head simply cant compete X3.
http://strongloop.com/strongblog/whats-new-node-js-v0-12-multiple-context-execution/
Not sure if this is a useful solution or if it will trigger an idea for a solution in someone. Read it and add it into the mix of ideas currently being discussed.
Simon
<script type="text/javascript" src="http://localhost:8080/nowjs/now.js"></script>
<script type="text/javascript">
now.ready(function(){
// "Hello World!" will print on server
now.logStuff("Hello World!");
});
</script>
Hey everyone!
Phew, it's been a while, isn't it? :§
Well incase you wonder how I am...well, I certainly feel like the wobble-bass of Dubstep. XD From one side to another, forth and back...all around and over and upside down.
Why?
Because, development. In LESS THAN A MONTH i taught myself C. I then added some basic ObjC coding - and extended that all with my PHP knowledge and made it C++ - and finally Obj-C++. So things like
[instance Operation:@"default" withData:classInstance->getInfo()];
is not even unnormal, rather trivial. :) Kinda proud of myself right here!
But for what all the learning? Because Deskshell.
Evolution of Deskshell.
I have taken over appJS, and have looked into it and decided: I can not redo it. The reason is simple: the building just won't work! Making it CEF3 ready would require a whole re-write - so I just declared it as obselete and done. But, it's spirit is not gonna stay as it is. In fact, I have planned a relaunch as "AppJS Remix". I am a DJ - so for me, a remix is taking a song, and making something new of it. That is what I am doing with appjs here.
The Deskshell I am creating now is a structure based off nodejs, the thing we all know and - one or another ;) - may love. So, let me show you the structure first:
nodeJS -> deskshell-core -> |
-> nodeJS \
-> ph7 | -> libcef -> WebView
-> html5 /
I am not mad at you if you are like "WTH is that?!" - let me explain.
The new Deskshell version is based off a nodejs binary, that has a modified "entrence point" - that part, that is run when you call a binary. But nodejs' entrence point is actually a pure javascript file, and called by main(). The modified entrence script will read in the .desk file and initialize a module: Deskshell-core. The settings/configuration stored in .desk are then pushed to the "core" module. That module now decides on hwot o proceed:
- If the user specified to use a php script to bootstrap the resutlting app, lets use ph7.
- If the user wants to use nodejs, use nodejs in a new process and let the current just die away.
- Otherwise, create a webbrowser and display the content of the htdocs folder. That however is CGI enabled as well.
So, you can either bootstrap a programm (setting up custom listeners, functions, prepairing files, etc) or use Deskshell as a frontent for a plain HTML5 app. This all happens thru Deskshell-core, which is capable of calling in another engine, or relaunch itself. As you see, the plain binary will only really prepair for a new process. That said - you get two scripting languages in one. ph7 is a "fake" php, basically an embedable php for smaller projects based off the 5.3 definitions (no traits, no short-hand syntax for arrays/objects). However, its extendable thru a C-API. I have created a C++ wrapper (ph7++) that will hopefuly soonb e released by the dev team, once I helped them to fix the socket connections (socket_read/write/connect/...). I also ported some actual PHP extensions - currently only curl - to this engine. So in that term, you'd get a full PHP if you want to bootstrap your app using PHP, or even use it within the pages of your project that are subject to be displayed int he browser. .php files will be treatened as such - whilst .njs files will be processed by nodejs, giving you the ability to use nodejs templating engines for a Deskshell app.
The structure is ment to make it possible for javascript and PHP users to create a bootstrap if they want to. Both have their advantages, and disadvantages. I am a very engaged PHP developer, but I can do little JS. And drag0n, about which I will talk later, is a pure PHP project - so it will barely use any javascript at all.
Scripting the application launch also means that you can add custom features ont he go: Like you can implement a cgi for perl, python - or eve lua. Or you can check for updates. Oh, yes, we even have a gui.
The "new" GUI concept
I have been searching and doing heavy research on using a GUI framework, since CEF - chromium embedded framework - requires you to prepair a GUI for it, as it itself will only draw a bitmask into the window, and nothing else. That is also why their loading icons and such are png files - CEf displays a "picture". Of course, users with handycaps can use it too because its of course more than just a picture. But in all generall, CEF only really draws a picture, and according to the code that calls the library, updates the code.
My solution here was to use wxWidgets. Mainly because:
wxNode: https://github.com/joeferner/wxNode
and
wxWebViewChromium: https://github.com/steve-lamerton/wxWebViewChromium
As you see: The first makes wxWidgets available to nodejs - and the second acts as a simple wrapper for wxWidgets. With that in mind, we can now use a CEF instance according to the wx coding style! That said: We only need to compile one library (wxwidgets) with only the basic requirements in order to kick off a browser - with menu and whatever. And yes, a transparent window is possible too, from what I have seen in wxWidgets! So, you can still creare cromeless windows liek you did in AppJS.
Oh yeah, AppJS... ^^
AppJS Remix
Now that I told you how I am making the GUI, and how I am going to extend the GUI part to its underneath scripting engines, I can tell you that the extension - that will only be seen internally - will be called "appjs-remix". That means, that the combination of wxWebviewChromium and ndoejs actually represents the spirit of the old yet obselete appjs! I have thought - but not concepted - about re-implementing some of the old API in order to support some of the old features. However - once you are done, the actual event listeners you used to use are invaild. The scope then moves into a seperate process - with rendering and v8 engine - and I can not really port an IPC kind of communication - i am not skilled enough :I. But you'd at least get some of the old API back, that'd help you kick off a basic app again! ^^
Schedule?
First, chrismas. Then, I have to finish a PHP based intranet project for a company that I have worked for a while ago. They want to give me a job later, and help me a bit with my financials, it seems :p. Well, I have to make their project first, as I have been delaying for a while now and promised to do it in my winterbreak - which is now. After that, I will start pulling together a nodejs binary with the new libraries and programms integrated - basically, integrating the modules from above into the binary and seeing how they work, against which version, and how they work across plattforms. After that, I should have a nice pile with appjs-remix, ph7-node, wxnode and a base for deskshell-core. A nice pile to play with... then its just a matter of time to make Deskshell-core the "default" entry point. Once that is done, I actually oculd say that the binary itself is done. After it has been confirmed to worka cross platforms and that already created deskshell apps are still compatible, I can start to extend it further.
To make you think about something interesting:
- libcef is ~40MB big.
- ph7 - with my additions - is maybe 1MB
- wxwidgets full set of libraries on OS X are 42MB. Consider that we will only use maybe 1/10 of that :)
So, the future Deskshell runtime will be about 50-60 MB. But I am not done here. After I have this done, I can go and remove unneeded features out of CEF and start creating a new libcef - libcef-deskshell. That, if we dream a little, may only be 20MB. Calculating again, gives us a 40MB build. Now running UPX over it, by loosing a bit of speed in launching - we get down to 20MB. Now tell me if that isn't a small but powerful runtime?? =D
drag0n
Drag0n, yes, it still exists. Just recently I published a WIP repo of d0p - a type of archiving that allows adding a header description in YAML format to the archive. Then running 'd0p explain archive.d0p' can output useful information - such as a description, website, or whatever. In the sense of drag0n, it saves adding an informative folder with all the info files and alike. Instead, we can just query each header in the folder and store it in memory for a while and examine it, use it, or whatever. We can even use this method to read from a HTTP stream! So we can litterally extract the header out of the internet. Then we can display that in the drag0n interface and let the user confirm the installation - and download the rest, and stream the archive down to disk.
But drag0n has another, more important, factor. Drag0n consists of many different parts:
- "appstore" like interface to install and manage packages on a local system.
- Distribution platform for developers.
- Build tool for developers.
A subproject dubbed "d0.build" is just a little script that relaunches your shell and lets you use a portable toolchain, for building whatever application you may want to build! That said: its powerful. It can build packages from their source code right from a GUI and install them.
BUT THAT IS NOT ALL.
It is an appstore like thing. So, Deskshell apps can be distributed thru it. and since it is a deskshell app itself, you don't need to supply the whole runtime! Instead, it just "links" against the runtime it has within itself. So your previously 30MB big Deskshell app, due to inclusion of the runtime, may turn into a 5MB html5 based app. That does not just make downloading, but also installing a hell load faster!
Drag0n however does not just distribute Deskshell apps - but also GNUstep and gives a re-birth to a long-forgotten installer.
GNUstep and Fink
Eversince brew and MacPorts have launched, Fink has been pushed into the back of the scene, and I see a lot of people that use brew. But to be very honest, the reason why so rare people are using an installer is: No GUI. drag0n therefore provides a GUI and lets developers distribute apps for platforms that nobody has probably even seen xD. GNUstep is a platform to develop Objective-C/++ based applications across Mac, Windows and Linux. So drag0n installs already two platforms: Deskshell and GNUstep. And unterneath itself, it will use Fink with its very nice output format, and parses that in order to make manythings more understandable to the software itself. So in theory, alongside the drag0n structured repos, you can use an existing APT repo and just distribute packages thru that into drag0n. Why this works? Because Fink is APT for Mac. But drag0n will use the according package managers that are right for the current platform. I saw something called "win-get" for Windows, that is an APT clone for Windows. On anything Linux, I can just use the current package manager - zypper, apt, whatever.
Conclusion.
Due to my many projects within Fink, GNUstep and Deskshell, I am creating an SDK that makes creating HTML/JS/CSS based apps easier, but also adds support for server-side scripting with PHP and nodejs itself - making it a fully round-up solution to quickly create applications. And since you have actual wxWidgets bindings in there, you could even tell Deskshell to be fully pale, and use wxWidgets to create your app! That is, if you want to... ^^
But I am not done here, not closely. Due to my find-out about nodejs for ios, and the current CEF goal to port to Android and iOS, we might see Deskshell on mobile platforms too! And hopefuly I can find a way to devleop a port for win8 metro UI.
Getting involved.
The appjs project may be deprecated/obselete/whatever - but it is the perfect place to talk to me. It is where everything started. Alternatively, feel free to browse my site http://ingwie.me (still under construction) and contact me directly - or just mention Simon and ask him for his email. Simon knows - i think ^^; - everything about the plans that I have made - and ing eneral he is a very nice person to talk to and make concepts with. ^^
Kind regards, have nice holidays and all the like!
- Ingwie Phoenix, alias Kevin Ingwersen
PS: In some time soon, Ill make a video and hold a short speech about a lot more things than what I mentioned here. Yes...I ish bussy burdeh @.@ ... err, I mean, phoenix. o.o
Oh and if you find typos, you may keep them =D
My Other projects (skip if not curios)
- GNUstep for Mac OS: Create an alternative toolchain to Apple's Xcode and make OS X development easier - but also cross-platform development. My build will feature a static libobjc2 build, in order to make sure you dont depend on anything out of my build.
- Experimenting with wxWidgets and CEF: Making sure that the appjs-remix and wxWebViewChromium things work just as expected.
- Create the full drag0n structure and interface: I have a PHP layout for drag0n (d0) that will make it possible to use it anywhere where you want. And another idea is to create a single, little binary. So even if you dont have PHP or anything, but need a short bootstrap thing to download libraries or dependencies, that will help you. Just compile d0.cpp and d0p.cpp into a d0 binary, and you can issue commands such as "d0 install libicu" to get the latest version of icu into your current working path. As it will just be a bootstrap helper, it will not write any information files or alike - it will read everything off thru the internet.
- Create a Deskshell "compiler" for the current version to make proper Mac OS X bundles.
- Finish other stuff such as WingStyle, my own site, and my other stuff you can see on my small site.
Hi Ingwie :-)
Great ideas and creativity as usual. You are making a lot of sense and good research and experimentation. I will make the following points, see what you think of them:
A) I think CEF should embed nodejs as you have decided. Reason for me is startup time, shortest time from icon click to window display is the goal. We can then fire js events on the window -- onNodeJSAvailable() and so on. This is really important as it lets developers put a splash screen, loader or whatever they want and very simple apps load faster. Difference between 2 seconds to open and 30 seconds is a massive boost in quality feeling.
B) This is not a major point but remember we can open multiple windows so we will have multiple browser threads and stuff. This means multiple threads accessing same socket. Implemented in the standard event oriented design where you can fire a named event and pass json and then register a callback to receive all or a particular named event gets around all nasty issues, and is already familiar to web programmers.
C) Sorry to be boring but I suggest standard json for config. Reason is you can load and parse in both browser and nodejs without any library and in few lines of code. This makes it easy to write code to allow easy editing. I would suggest we have a little deskshell app for editing the config this can support yml and anything else developers want, but then saves to disk as json.
D) There are so many cool things you are investigating and great ideas -- very cool. What I would suggest is lets have an ultra minimal core that can load super fast. We can then have plugins / extensions that add capability to the platform. Again this will allow super simple little apps to be tiny, but kitchen sink massive apps to also be supported. Also makes cross platform development easier since certain modules can be available on certain platforms only initially then we can standardise later on.
E) Container apps / packaging is cool great to see you getting better and better solutions. Doing it in nodejs gives you ability to stream the files out of the box, but pure c++ is great. Lets implement both and let developers decide what is best for their app!
All this talk and excitement is making me motivated to release that hack I did with cef + nodejs, it is not as grand as your work but gives us something to experiment with in the mean time.
/Simon
--
You received this message because you are subscribed to the Google Groups "appjs-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appjs-dev+...@googlegroups.com.
To post to this group, send email to appj...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Looking forward to your input Paco :-)
<script> var globalNumber = 23; </script> <script type="text/php"> $globalNumber = 13; // globalNumber will change function changeNumber($number) { global $globalNumber; $number = 10; // globalNumber will not change $globalNumber = 10; // globalNumber will change } changeNumber($globalNumber) </script>or this code:
<script type="text/php"> function my_php_function($item) { $result = array(); for ($index = 0; $index < $item->count(); $index++) { $result[] = $item[$index] + 2; } return $result; } </script> <script> alert(my_php_function([1, 2, 3, 4])); </script>
<script type="text/php"> include("my_other_file.php"); </script>
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
Great discussion, excellent points.
The kroll thing is cool but we can do that in pure JS. Just include some deskshellMagic.js script tag upon loading it then scans for script tags with type="text/php" then it can take the text and call a function:
Deskshell.ext.php.eval (scriptText);
Deskshell .app file can list the api's to make available on startup. If php is to be loaded you can then have a persistent php environment that you can tell to eval bits of php script. Same would work for other languages.
As to passing actual objects around I dont like the idea since we don't want memory leaks or random crashes. However as Ingwie says the "socket.io" "design pattern" solves all of those issues, is well understood, no pointer or memory issues. If anyone listens to me then we will support that interface pattern. Data passed will be json string because it is good enough.
Now you all are brilliant so you are welcome to add the following api:
Deskshell.unsafeButFast.
And everyone can use that if they want. You can try passing DOM objects direct to php and fix it so it even works. It is possible to use messagePack to send binary data rather than json and so on. If we have a nice plugin architecture it is awesome since anyone can do an experiment and if it is better everyone switches to it :-)
As I understand it script tags with type attributes that are not something like text/javascript or similar are ignored by the browser and that works cross browser and platform, I remember using that trick some years back on a project I built.
/Simon
For startup time the current design starts nodejs, initializes, reads the config, runs user script that boots off CEF that then gives the user a window they can look at.
I like that design since it ia nodejs centric.
However for performance if the first thing that starts is CEF then internally it is multi-threaded and starts all the initialization in parallel, then use C library to read in json config and open a loading page/ splash screen url from that -- my horrible hack that does that is extremely fast to then open.
Then we can also boot off nodejs, php, whatever and when they are ready and willing fire js load events on the main page. This allows intelligent app designers to have really great load UI and deskshell appears to be blazingly fast.
As to the packaging, all I do is append all of the application files into a single file, at the end of that file is a json string with a table of contents. I then wrote streaming code so when you request a "file" it starts from the start offset and streams till it gets to the end. No compression since that will slow it down and is unnecessary: you can gzip or whatever the whole file afterwards if distributing over the network.
/Simon
Sounds great, a very good solution I think.
/Simon
Hi Paco,
When I talk about socket.io I just mean the "pattern" rather than actual implementation. If you view their website then they have nice docs about how to talk from "web page" to "server". My suggestion all along has been implement the same "interface" but you can have anything you want behind.
So for example nodejs can receive a pointer to the js object from the browser and then run code on it. However it is also easy (but not as fast) to convert js object to text string, copy that to php or nodejs or anything, convert string to php / js object and continue. This is 100% safe with no memory leaks, random crashes or risks. Also most modern web programmer understands the interface instantly and if not it is very quick and simple to use.
To answer your exact question, yes the current implementation gets nodejs to exec chrome and then opens debug websocket connection and also if needed a websocket connection between nodejs and browser.
Additional advantage of websocket interface pattern is that it will be easy to have same code work in deskshell as will work on application with remote server backend over websocket.
Yes I looked at dnode before we could use that. This is open source so feel free to create github repo and hack together a (bad) demo illustrating what you want to do, or just some gists with pseudo code as examples. Don't worry about it being beautiful we are all programmers so understand the development process. Then we can discuss the best way to add it to deskshell and any further ideas.
I am very happy to let deskshell develop in many directions and let the app developers decide which technologies they want to pick. I also see my role as just helping people get involved, supporting them and getting people working together rather than doing all the work myself while everyone watches me.
We have a lot of potential in this project and a lot of enthusiasm and rapid progress so you are very welcome to help and hack on whatever you feel is fun.
/Simon
Wow the pace of development and lateral thinking here is amazing :-)
Yeah it would be awesome!
I have downloaded the appjs-deskshell project to know more about the current way of doing things and start helping
Is there any other repository I should be aware of ?
Great! Go for it!!
require "utils/net"
var myArr = @{
var a=[];
for(var k,v in pfs.glob("mydir","*.c"))
a[] = v;
for(var k,v in pfs.glob("datotherdir","*.cxx"))
a[] = v;
return a;
};
$ ls -1 out
FLTK/
libAngelScript.a
libFLTK.a
libObjectScript.a
libTrololo.a
libcanister.a
libhttp_parser.a
libsqlite3.a
libttvfs.a