Discussion:
[dart-misc] Pluggability and Javascript on Server-side
Stefan Schulz
2015-12-08 19:57:15 UTC
Permalink
Dear group,

(Maybe, I am looking for the wrong terms, but I did not find fitting
information. If this is the wrong channel, please, give me a pointer.)

I am currently investigating a development environment for web
applications. We do have some experience with NodeJS and see its easy
integration within the Javascript world. Especially, when it comes to
pluggability and developer base.

Coming from the Smalltalk and Java world, I'd obviously rather go for a
more OO style approach. We've done GWT for a big application, but for a new
project it seems rather cumbersome to re-live the experiences. Especially,
as it is quite resilient to allow for pluggability of extensions not
available at compile time.

Studying dart for a while now, I quite like the language and its abilities,
but could not find out about its pluggability regarding the server side.
I've seen isolates and js-interop, but did not see documentation, whether
Javascript could be used to write server-side extensions to plug in at
runtime and whether there is some way to ensure an API for plug-ins, or if
extensions also must be written in Dart and isolates and messaging are the
only way to connect them.

Any help or hint is much appreciated.

Thanks,
Stefan
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Matthew Butler
2015-12-21 15:16:30 UTC
Permalink
From what I can understand, you're asking about a server written in Dart
using Javascript extensions. This is not currently possible. The Dart VM
which would drive a dart server, does not parse or work with Javascript,
you would need a separate vm (eg Node.js/V8) just for that, and then you're
essentially running two servers as opposed to one with extensions.

Js-interop is designed to allow a Dart script to communicate with
Javascript scripts, usually in the ultimate situation where the Dart script
has been transpiled to Javascript and is running in a Javascript VM. (A
slight exception in the past when working with Dartium when it was two vm's
working simultaneously however recent changes to Dartium have begun to push
towards being a wrapper around the Javascript VM anyways).

So if you are looking at a Dart server (using the Dart VM) yes extensions
will need to be written in Dart. As for how they're integrated, that would
be more of an implementation thing. For instance the Dart Shelf middleware
server <https://pub.dartlang.org/packages/shelf> can have plugins written
which allow you to extend the capabilities of the standard Shelf service
without requiring additional isolates etc.

I hope that clears things up for you.

Matt
Post by Stefan Schulz
Dear group,
(Maybe, I am looking for the wrong terms, but I did not find fitting
information. If this is the wrong channel, please, give me a pointer.)
I am currently investigating a development environment for web
applications. We do have some experience with NodeJS and see its easy
integration within the Javascript world. Especially, when it comes to
pluggability and developer base.
Coming from the Smalltalk and Java world, I'd obviously rather go for a
more OO style approach. We've done GWT for a big application, but for a new
project it seems rather cumbersome to re-live the experiences. Especially,
as it is quite resilient to allow for pluggability of extensions not
available at compile time.
Studying dart for a while now, I quite like the language and its
abilities, but could not find out about its pluggability regarding the
server side. I've seen isolates and js-interop, but did not see
documentation, whether Javascript could be used to write server-side
extensions to plug in at runtime and whether there is some way to ensure an
API for plug-ins, or if extensions also must be written in Dart and
isolates and messaging are the only way to connect them.
Any help or hint is much appreciated.
Thanks,
Stefan
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Stefan Schulz
2015-12-23 07:43:25 UTC
Permalink
Thank you, Matt. That helps a lot. Although, it's not the outcome I would
have liked to have, as it points to rather go for some framework like
NodeJS, as javascript is more common to external developers than Dart.
Setting up two servers and defining and creating a communication layer in
between seems too complex, would give a perfect sandboxing architecture on
the other hand. Have to think about this.

Stefan
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Don Olmstead
2015-12-23 18:40:13 UTC
Permalink
This might help you get some idea what's available
https://github.com/yissachar/awesome-dart
Post by Stefan Schulz
Thank you, Matt. That helps a lot. Although, it's not the outcome I would
have liked to have, as it points to rather go for some framework like
NodeJS, as javascript is more common to external developers than Dart.
Setting up two servers and defining and creating a communication layer in
between seems too complex, would give a perfect sandboxing architecture on
the other hand. Have to think about this.
Stefan
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups
"Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Stefan Schulz
2015-12-25 17:46:23 UTC
Permalink
Thanks, Don. Interesting list. The question is not so much about Dart's
abilities.
For me, Dart would be the choice of language for building a web
application. Unfortunately, most web design agencies will rather have
competence in building Javascript-applications than using Dart. And we
cannot force them to learn Dart to plug into our framework.

I did see the js2dart compiler on that list, which might open a way, but it
seems abandoned.
Post by Don Olmstead
This might help you get some idea what's available
https://github.com/yissachar/awesome-dart
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Loading...