Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polymer elements created with Dart must work out of the box when used in non Dart applications #19849

Closed
DartBot opened this issue Jul 5, 2014 · 4 comments
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Jul 5, 2014

This issue was originally filed by @Emasoft


PROBLEM:
Many web developers are really considering Dart for building web applications but they are confused about Polymer. They fear that Polymer elements created with Dart cannot be used in non Dart applications. They would like to be sure that Polymer elements created with Dart would be compatible with non Dart applications before adopting Dart.

SOLUTION:

  • Polymer elements created with Dart must work out of the box when used in non Dart applications.
  • A javascript compact polymer element generated from a Polymer.Dart element should be self-sufficient and self-contained. It should be possible for the developer to easily just drop it into a new page and start using it on its own, whitout any additional coding or external libraries.
  • Polymer.Dart should provide fallbacks and polyfills to make the elements behaviour identical both in javascript and in Dart even without including the dart.js library.
  • dart2js should be able to export a compact javascript version of the elements made with Polymer.Dart, forcing a very aggressive "tree shaking" optimization on the resulting code to minimize code size.
  • dart2js should be able to optionally generate self-contained javascript code for those polymer elements. The exported javascript code should be able to work with other polymers elements and polymer.dart elements without conflicts even when the same Dart framework code is duplicated in many elements. It should be possible for many of these distinct polymer elements to work and function in the same application without interfearing with each other or depending on other modules being present or loaded.
  • An explicit "export as a javascript Polymer element" option should be added to the Dart Editor when Polymer.Dart is used in a Dart project
  • The developer should always be able to export his Polymer.Dart element both in the Dart standard version (with standard javascript fallback requiring dart.js) and in the compact self-contained javascript version with no requirement for dart.js or other additional libraries.
@dgrove
Copy link
Contributor

dgrove commented Jul 7, 2014

Added Pkg-Polymer, Triaged labels.

@sigmundch
Copy link
Member

Removed Priority-Unassigned label.
Added Priority-Medium, PolymerMilestone-Later, Area-Pkg labels.

@DartBot
Copy link
Author

DartBot commented Feb 10, 2015

This comment was originally written by robert.ru...@asg.com


IMO, this issue represents an important enhancement to the Dart platform that will allow adoption of Dart Polymer for many ubiquitous use cases -- for example, in building and distributing components or component libraries for use in web mashups, similar to: https://github.com/ForceDotComLabs/mobile-ui-elements/.

Self contained single page web applications are not the only means by which code is distributed on the web, but currently, Dart Polymer elements seem to be confined to this distribution idiom. In contrast, JS Polymer elements are easily distributed on the web and can be consumed both in JS and Dart.

@DartBot DartBot added Type-Enhancement area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. labels Feb 10, 2015
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This issue has been moved to dart-archive/polymer-dart#231.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants