Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #28506 > unrolled thread

Node.js and browsers/windows

Started byJay Braun <lyngwyst@gmail.com>
First post2015-08-07 15:36 -0700
Last post2015-08-12 10:40 -0700
Articles 3 — 3 participants

Back to article view | Back to comp.lang.javascript


Contents

  Node.js and browsers/windows Jay Braun <lyngwyst@gmail.com> - 2015-08-07 15:36 -0700
    Re: Node.js and browsers/windows Silvio <silvio@internet.com> - 2015-08-12 13:53 +0200
    Re: Node.js and browsers/windows Sam Desborough <sam.desborough@gmail.com> - 2015-08-12 10:40 -0700

#28506 — Node.js and browsers/windows

FromJay Braun <lyngwyst@gmail.com>
Date2015-08-07 15:36 -0700
SubjectNode.js and browsers/windows
Message-ID<4af82289-4a28-49ae-9fa3-3442b46e6618@googlegroups.com>
Although I am a veteran programmer, I am new to JavaScript, not so much as a "new" language (though there are some interesting aspects), but as a collection of technologies:  HTML and CSS, XML and its various namespaces like SVG, the role of the browser in client-side applications, and how JavaScript adds dynamic behavior.

Now that I have done some reading, I am starting to think that my particular application differs from typical client-side JavaScript applications, but could still benefit from JavaScript and related technologies, running with Node.js.

Here is a brief description of my application and an approach that I am considering.  Please let me know if you think I am headed for a dead end, or if you think of alternatives to my approach.

An existing legacy simulation model runs on a computer "somewhere", and publishes updates about objects to a TCP/IP socket.  It is not running as a web server, but rather as a simple application that dumps data to TCP/IP.  That part is already implemented, and is a "given".

The new graphical application, which will run on about a dozen computers in other locations, needs to listen to the data and update a graphical display.  Eventually, it will need to send data back the other way, based on mouse clicks on various objects and other events, and ultimately data that users enter into menu forms.

SVG is the cornerstone of my solution because it provides all of the abstractions I need to display the various objects over a map background (I already have the SVG for the map).  And that has led me to JavaScript.  It is also the reason why I originally assumed that this would be a browser-based app.

But if I set aside the browser and use something like Node.js, I can use its net API to input the TCP/IP data.  I still have a "client" of sorts interacting with a "server", but the protocol is different.

My concern is the graphical aspect, i.e., the display, event handlers, and menus.  Do I need a browser to display SCG graphics?  Are there APIs (perhaps in Node.js) that create a browser or window that frames SVG elements that the app creates?  Do I still have access to the event handling offered by JavaScript?

Thanks for your thoughts,
Jay

[toc] | [next] | [standalone]


#28519

FromSilvio <silvio@internet.com>
Date2015-08-12 13:53 +0200
Message-ID<55cb33c8$0$2844$e4fe514c@news.xs4all.nl>
In reply to#28506
On 08/08/2015 12:36 AM, Jay Braun wrote:
> Although I am a veteran programmer, I am new to JavaScript, not so much as a "new" language (though there are some interesting aspects), but as a collection of technologies:  HTML and CSS, XML and its various namespaces like SVG, the role of the browser in client-side applications, and how JavaScript adds dynamic behavior.
>
> Now that I have done some reading, I am starting to think that my particular application differs from typical client-side JavaScript applications, but could still benefit from JavaScript and related technologies, running with Node.js.
>
> Here is a brief description of my application and an approach that I am considering.  Please let me know if you think I am headed for a dead end, or if you think of alternatives to my approach.
>
> An existing legacy simulation model runs on a computer "somewhere", and publishes updates about objects to a TCP/IP socket.  It is not running as a web server, but rather as a simple application that dumps data to TCP/IP.  That part is already implemented, and is a "given".
>
> The new graphical application, which will run on about a dozen computers in other locations, needs to listen to the data and update a graphical display.  Eventually, it will need to send data back the other way, based on mouse clicks on various objects and other events, and ultimately data that users enter into menu forms.
>
> SVG is the cornerstone of my solution because it provides all of the abstractions I need to display the various objects over a map background (I already have the SVG for the map).  And that has led me to JavaScript.  It is also the reason why I originally assumed that this would be a browser-based app.
>
> But if I set aside the browser and use something like Node.js, I can use its net API to input the TCP/IP data.  I still have a "client" of sorts interacting with a "server", but the protocol is different.
>
> My concern is the graphical aspect, i.e., the display, event handlers, and menus.  Do I need a browser to display SCG graphics?  Are there APIs (perhaps in Node.js) that create a browser or window that frames SVG elements that the app creates?  Do I still have access to the event handling offered by JavaScript?
>
> Thanks for your thoughts,
> Jay
>

This is probably off-topic here but anyway..

I do not see how you would have a client-side interface without a 
browser. Are you considering implementing some desktop application or 
app for this?

SVG can be displayed outside of an HTML content but if you want to 
script event handlers and possibly update the SVG when new data arrives 
then you will want a browser unless you really intend to make things 
complicated. That could be an actual plain browser or an embedded variant.

I would go with a normal browser based UI. Sounds straightforward enough 
using websockets to talk to node.js. If you want you could package the 
whole thing as an HTML5 offline web application.

Cheers,

Silvio

[toc] | [prev] | [next] | [standalone]


#28521

FromSam Desborough <sam.desborough@gmail.com>
Date2015-08-12 10:40 -0700
Message-ID<197e01cb-ecc9-42a7-9167-fa93cd2a1979@googlegroups.com>
In reply to#28506
Have a look at http://nwjs.io/. It allows you to create browser applications in node.

Alternatively, you could write a server in node to consume the tcp/ip data and send/receive data (using websockets seems like a good idea for your requirements) to a browser-based client. 

On Friday, August 7, 2015 at 11:36:19 PM UTC+1, Jay Braun wrote:
> Although I am a veteran programmer, I am new to JavaScript, not so much as a "new" language (though there are some interesting aspects), but as a collection of technologies:  HTML and CSS, XML and its various namespaces like SVG, the role of the browser in client-side applications, and how JavaScript adds dynamic behavior.
> 
> Now that I have done some reading, I am starting to think that my particular application differs from typical client-side JavaScript applications, but could still benefit from JavaScript and related technologies, running with Node.js.
> 
> Here is a brief description of my application and an approach that I am considering.  Please let me know if you think I am headed for a dead end, or if you think of alternatives to my approach.
> 
> An existing legacy simulation model runs on a computer "somewhere", and publishes updates about objects to a TCP/IP socket.  It is not running as a web server, but rather as a simple application that dumps data to TCP/IP.  That part is already implemented, and is a "given".
> 
> The new graphical application, which will run on about a dozen computers in other locations, needs to listen to the data and update a graphical display.  Eventually, it will need to send data back the other way, based on mouse clicks on various objects and other events, and ultimately data that users enter into menu forms.
> 
> SVG is the cornerstone of my solution because it provides all of the abstractions I need to display the various objects over a map background (I already have the SVG for the map).  And that has led me to JavaScript.  It is also the reason why I originally assumed that this would be a browser-based app.
> 
> But if I set aside the browser and use something like Node.js, I can use its net API to input the TCP/IP data.  I still have a "client" of sorts interacting with a "server", but the protocol is different.
> 
> My concern is the graphical aspect, i.e., the display, event handlers, and menus.  Do I need a browser to display SCG graphics?  Are there APIs (perhaps in Node.js) that create a browser or window that frames SVG elements that the app creates?  Do I still have access to the event handling offered by JavaScript?
> 
> Thanks for your thoughts,
> Jay

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web