JavaScript + LC HTML5 = LiveCode.js

Mark Waddingham mark at livecode.com
Thu Nov 24 15:33:36 EST 2016


I should perhaps say that whilst what I'm saying above sounds somewhat doom and gloom, it isn't.

Browsers have a huge responsibility to keep your computer safe from malicious attack (there are people who spend all their time trying to find holes to wriggle through and then exploit).

Browser JS APIs are rich and diverse, and become more so each year.

For most things it will be a case of 'when', and not 'if'.

Sent from my iPhone

> On 24 Nov 2016, at 20:08, Mark Waddingham <mark at livecode.com> wrote:
> 
> The connection could possibly be made by using web sockets I guess (someone correct me if I'm wrong).
> 
> However, the user would have to download, install and run the helper process... At which point you might as well be running a desktop
> app I'd think.
> 
> Browsers do not and will almost certainly never allow execution of (native) subprocesses via JavaScript. (Nor any kind of native code which is not part of the browser executable - well, outside the browsers very tight sandbox).
> 
> Mark.
> 
> 
> 
> Sent from my iPhone
> 
>> On 24 Nov 2016, at 20:00, Roger Eller <roger.e.eller at sealedair.com> wrote:
>> 
>> Mark,
>> 
>> Would it be possible to have a LC executable (something resembling LC
>> Server) on a Desktop, allowing the browser to access the local machine by
>> way of that backgrounded process?  Could it be an out of the box capability
>> only turned on by the machine's primary user, via the html5 application
>> before it fully launches?  Similar to how Android tells the user what
>> permissions are needed is how I imagine it would present itself.
>> 
>> ~Roger
>> 
>> 
>> 
>> Roger Eller
>> Graphics Systems Analyst
>> 
>> 803 North Maple Street P: 864.967.1625
>> Simpsonville, SC 29681 C: 864.908.0337
>> SealedAir.com <http://www.sealedair.com/> Roger.E.Eller at SealedAir.com
>> <roger.e.eller at sealedair.com>
>> 
>> 
>> 
>>> On Thu, Nov 24, 2016 at 2:40 PM, Mark Waddingham <mark at livecode.com> wrote:
>>> 
>>> Indeed.
>>> 
>>> Once we have JS which 'does a similar thing' to answer file (or any other
>>> OS related piece of syntax) - hooking it up to that command is relatively
>>> straightforward.
>>> 
>>> The hard part is writing the JavaScript implementations of the various OS
>>> services we are so used to using directly in LC.
>>> 
>>> It is important to remember that browsers give no direct access to OS
>>> APIs, they are sandboxed and attempt to mitigate security issues as much as
>>> they can.
>>> 
>>> The only system type functionality you get is that exposed by supported JS
>>> APIs a given browser has.
>>> 
>>> Mark.
>>> 
>>> Sent from my iPhone
>>> 
>>>>> On 24 Nov 2016, at 18:41, Roger Eller <roger.e.eller at sealedair.com>
>>>> wrote:
>>>> 
>>>> File picker should not have to be built in another language, in my
>>>> opinion.  Ask or Answer file SHOULD just work.  Again, my opinion.  This
>>> is
>>>> LiveCode after all.
>>>> 
>>>> ~Roger
>>>> 
>>>>> On Nov 24, 2016 10:49 AM, "Todd Fabacher" <tfabacher at gmail.com> wrote:
>>>>> 
>>>>> Hello LiveCode community,
>>>>> 
>>>>> At Digital Pomegranate we are very excited about the update to LiveCode
>>>>> HTML5. We already have several projects that we plan on using the
>>> platform
>>>>> for. Since our LiveCode team has only a little experience in
>>> JavaScript, we
>>>>> are thinking of creating a LiveCode.js. This will be both a LC substack
>>>>> that wraps a Javascript function library which would be in a file named
>>>>> LiveCode.js.
>>>>> 
>>>>> Our thinking is it would have 5+ core functionalities that woul dbe
>>> shared
>>>>> by most HTML5 apps.  I think this would be a great community project and
>>>>> help people who may not be so familiar with Javascript and can stay
>>> focused
>>>>> on LiceCode.
>>>>> 
>>>>> Communications
>>>>> tsNet has given LiveCode async server communications, the good news is
>>>>> Javascript has had this functionality for quite some time. We would
>>> need a
>>>>> simple wrapper of the XMLHttpRequest functionality in LiveCode.js, so it
>>>>> seems seamless in Livecode.
>>>>> 
>>>>> I know LC can call the browser's javascript, but can the JS do a
>>> callback
>>>>> to LiveCode? It would be great if we could do sockets in JS and create a
>>>>> two way communications system.
>>>>> 
>>>>> RestAPI services
>>>>> I have seen recent notes about using revIgniter as a REST server, and
>>> there
>>>>> are many other options available. We use mostly WP and the WP RestAPI.
>>>>> 
>>>>> Remote Storage
>>>>> Mark's LiveCloud is a great option and there are several different
>>> options.
>>>>> As I said, we mostly use WP, but we also use Node.js w/ mongodb. The
>>>>> LiveCode.js  will just need a simple way of taking XML. JSON or an
>>> encoded
>>>>> array and sending it to the remote storage of choice and returning the
>>>>> values.
>>>>> 
>>>>> Local Storage
>>>>> The ability to create and use a local DB within the local browser. My
>>>>> understanding is that LC HTML5 will not because to utilize the database
>>>>> library, so we will have to use Javascript localStorage. We just need to
>>>>> create a controller that will connect LC to create, read and write to
>>> the
>>>>> local DB. Javascript even has a way to store the DB and can be accessed
>>> for
>>>>> the next session.
>>>>> 
>>>>> http://www.w3schools.com/html/html5_webstorage.asp
>>>>> 
>>>>> File Picker & Uploaded
>>>>> Not use how to do this in HTML5, but we will need a way to select a file
>>>>> and upload it to a server. We could use an HTML+JS dialog box to do it.
>>>>> 
>>>>> Best,
>>>>> 
>>>>> Todd
>>>>> _______________________________________________
>>>>> use-livecode mailing list
>>>>> use-livecode at lists.runrev.com
>>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>>> subscription preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list