- node-webkit looks nice, but I think it might be slow and is ugly
because it uses DOM. Also, it currently requires me to manually patch
webkit code for installing and I think it doesn't run on Windows yet
- there's a bunch of attempts to do GTK bindings, but most of them
seem to be pretty old and unmaintained - however, node-gui looks
promising to me, and according to the README, it also works on Windows
What's your opinion? Anything important I didn't consider? Are there
any bigger examples of GUI code written in node I could look at?
Jann
I too want native apps in node that work cross-platform. node-webkit
has promise, but it's a long ways off. GTK is a mess and I don't
think any of the bindings are complete or up to date.
One easy solution is to just use chrome with the -app flag or
mozilla's chromeless for the gui. Sure it's a browser, but it looks
more native.
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
Huh? What does using the same language have to do with that? As long
as I can use the different kinds of frontends from node, it should be
no problem, right?
> I too want native apps in node that work cross-platform. node-webkit
> has promise, but it's a long ways off. GTK is a mess and I don't
> think any of the bindings are complete or up to date.
Mmmhm... probably true.
> One easy solution is to just use chrome with the -app flag or
> mozilla's chromeless for the gui. Sure it's a browser, but it looks
> more native.
Yes, that's probably a relatively good meantime solution - however,
I'll probably have to write something ugly to access the DOM from
node...
Without knowing your App in detail you don't need to. The tendancy is
to write the server-end in node only caring for the things you need
the server for, and the frontend in Browser Javascript which does all
the markup. Then have both communicate with each other via JSON. You
should not need to access some DOM specifics from node. Of course you
can easily do your JSON-based call to do that, but it would be far
more elegant to have the communication on a more abstract level.
Instead of for example server saying "write headline, make it bold,
and red, and write warning", you just send "{cmd: warning}" and have
the browser client do the markup.
Hmm, looks interesting, too. Please post about whether it worked. :)
There's been a Tcl/Tk web plugin for over a decade. (I don't think
it's been updated for years, OTOH.)
> There's been a Tcl/Tk web plugin for over a decade. (I don't think
> it's been updated for years, OTOH.)
>
Yeah, I should have been more specific, it works, but not in all cases.
--
Mike
This is all micromanaging the client from the server. It will work I
wont deny that, but it comes with a few drawbacks. Bandwidth Load,
Sending every single DOM setting and change from server to client
causes more bandwidth, response time, anything you change needs a
client<->server communcation, leaving the user a worse responseviness
feeling, development encapsulasion, having client/server be more
seperate things where the former cares about the updates is better in
seperating the tasks for development. Its like doing an online game,
and instead of the server sending the client proper changes of the
virtual world for it to render properly, it would instead in analogy
to setting each and every DOM paramter from server provide a 2D movie.
If you need to keep at this strict server controlled design, just
generate webpages all over, like in the old pre-ajax web, instead of
making micro calls to the DOM.
I'm not very good at explaining things, many have told me this.
But you really miss understood me.
On Sun, 2012-02-12 at 10:33 +0100, Axel Kittenberger wrote:
> > Examples of the Server side could be something like the following:
> > [....]
>
> This is all micromanaging the client from the server. It will work I
> wont deny that, but it comes with a few drawbacks. Bandwidth Load,
> Sending every single DOM setting and change from server to client
> causes more bandwidth, response time, anything you change needs a
> client<->server communcation, leaving the user a worse responseviness
> feeling, development encapsulasion, having client/server be more
Bandwidth, load, responsiveness, communication, are all derived from one
drawback, "performance" And I must disagree with you on this. I'm
talking about less than 2k per each send/recv, in most cases less then
100 bytes. Hardly a nanogram compared to something like a game or a
movie. I'm talking about Enterprise business applications, where the
data buffers are usually less than 2k. Additionally, I've done some
testing, in an intra-net environment doing straight socket I/O it is
extremely fast. Over an Internet connection it does very well. I
estimate about 30 to 50 round-trip updates between the client and the
server per second. Now thats not using Node, thats all ANSI C (not c++)
and socket calls. My understand is that after the initial http handshake
Node can do standard socket calls outside of the http protocol, so it
shouldn't be much slower at all.
> seperate things where the former cares about the updates is better in
> seperating the tasks for development. Its like doing an online game,
> and instead of the server sending the client proper changes of the
> virtual world for it to render properly, it would instead in analogy
> to setting each and every DOM paramter from server provide a 2D movie.
I think you're saying that separating the GUI development from the
application development is a bad thing. The way you ran all those
mis-spelled words together, its not real clear what you're saying. But,
if this separation is a bad thing too you, then again I strongly
disagree! I think you totally misunderstood my point. But I have an
analogy also, Data Base Management Systems.
Lets roll the clock back about 40-50 years. Application developers at
that time didn't have allot of Database systems to choose from. They
simply rolled their own databases, handling their own indexes, wrote
their own hash tables, and so on. Starting in the 1960's IBM developed
the first Navigational database, then hierarchical databases, and
network databases. It was almost 1980 when we saw the first SQL
database. Still there were application programmers who continued to roll
their own, because it was faster, maybe. More so because people don't
like to make a change when what they have is working just fine. People
generally don't get it, like whats the advantage, or thats not what I
was taught. Today the average programmer reads/writes data from a
database without much concern about how it all works, that is someone
else's job. The programmer simply uses a small amount of information
about the data (meta-data), and requests the data.
Similar scenario can be said about data communications or Network
programming. Node.js definitely proves that!
If you don't understand what the database problem was back then, and you
don't understand why they fixed it, then I am wasting my time. So the
industry fixed the database issues, and fixed the Networking issues. The
UI back then was simple, literally is was read and write, but today it
is a problem, its chaotic, it not standardized, its allot of roll your
own. Somehow this too must get fixed!
Wouldn't it be nice if a programmer could converse with a GUI by simply
writing something like:
Select * on Inventory-Screen;
If sort-by-partnum was clicked then do the sort logic.
Or if Enter was clicked then do the logic to process the data buffer.
Now Axel, come on. In your opinion it would be faster to rebuild the
entire GUI or page? What I'm saying is, only send whats changed, in this
case it is the data buffer, and no doubt less than 1k bytes. Why send
and rebuild the entire GUI or page? Sending the entire thing is what I
want to avoid. Also, on the server, I'd like to avoid creating and tare
down a processes every time the user clicks on a button.
If I had the server side Node functions working as I explained (or tried
to explain) in my earlier post, then I could develop the glue between
the app and Node so the App would only need that one line to interact
with a full blow GUI in a Web environment.
Developing GUI Business applications would be drastically less
expensive, or maybe programmers could make more money in less time.
> If you need to keep at this strict server controlled design, just
> generate webpages all over, like in the old pre-ajax web, instead of
> making micro calls to the DOM.
>
You really miss understood me!
Is there some open-source code for that?
Thats throwing vastly different things into one bucket deliberately
blurring up instead of precising things. Responsiveness, (server) load
and bandwidth are completey different bottlenecks.
> I think you're saying that separating the GUI development from the
> application development is a bad thing. The way you ran all those
> mis-spelled words together, its not real clear what you're saying. But,
> if this separation is a bad thing too you, then again I strongly
> disagree! I think you totally misunderstood my point. But I have an
> analogy also, Data Base Management Systems.
I wonder how you come to this reading. You really misunderstood, doing
this very much words complaining being misunderstood when you
misunderstand. Reading your post again, yes I did partially
midunderstand, all you interface has nothing to do with DOM. You seem
to mix up data and DOM. I said, having GUI development and server
development separated is often better in sense of encapsulating. And
the database analogy is very faulty. When you could compare it to some
of the Oracle PSQL variants, where GUI development and database
development was essentially thrown into being one thing. I consider
this unfortunate. IMHO database design and GUI design should be two
different things. Having specific calls to get what data is fine.
However, I consider it better design, when the client has the final
say on the markup instead of server managing everything.
PS: I know its the internet where kindness is optional, but you should
work on your attitude.
True, but in the context of this thread (GUIs for node apps running on
localhost), that shouldn't be a problem.
Unfortunately, the code is a bit old and never was quite right on Windows (this was pre-0.5 Node, the only Windows support was through Cygwin), and is way too messy/encumbered in project-specific code to be released, but it's certainly a feasible and not even all that challenging option!
-Matt
Did you see node-webkit? It's a newer project, and it gives you node
bindings inside of the browser. Unfortunately, no windows support yet,
and you have to apply a bunch of webkit patches manually.