Git Product home page Git Product logo

meta's Introduction

Dojo Logo

dojo-meta

Join the chat at https://discordapp.com/invite/M7yRngE

This repository contains information regarding Dojo (versions 2 and newer) that crosses package boundaries.

Visit us at dojo.io for documentation, tutorials, cookbooks, and other materials. This repository contains detailed information on the structure of Dojo, while dojo.io is focused on getting started with and learning Dojo.

Guidelines and Style Guide

There are several documents that are relevant for contributing to Dojo.

Dependent Technologies

While Dojo tries to provide a holistic set of tools to build web applications, there are several key technologies where we feel that Dojo would be better integrating and building upon versus building from the ground up.

In order to ensure that Dojo is a solid set of JavaScript tools and libraries, Dojo is built on TypeScript. This provides us with structural design time typing as well as an effective way to communicate the intent of the Dojo APIs. It also provides us the ability to adopt ES6+ syntax features but make distributables that will be backwards compatible to the target browsers for Dojo.

TypeScript and Dojo Compatibility Matrix

TypeScript and Dojo both iterate rapidly. In general Dojo strives for maximum compatibility, with a plan to periodically increase the minimum TypeScript version so we can begin relying on newer TypeScript features. Please review this list when using Dojo:

Dojo version TypeScript version (minimum) TypeScript version (maximum)
2.0 2.6.x 2.6.x
3.0 2.6.x 2.6.x
4.0 2.6.x 3.1.x

Packages

There are several packages that makeup the Dojo platform:

Less Active Packages

We have some other packages which are not actively used by Dojo or still in their planning stages:

We have some deprecated packages:

  • dojo/actions - A command like library for Dojo applications - This is deprecated because we have not found this abstraction to add value
  • dojo/app - An application framework for Dojo - This is deprecated because widgets + routing + stores are sufficient to deal with higher order application concerns
  • dojo/cli-build-webpack - A legacy application and widget build command - *This is deprecated as it has been superseded by @dojo/cli-build-app and @dojo/cli-build-widget *
  • dojo/compose - A mixin/trait based composition library - This is deprecated because TypeScript now offers mixin behavior
  • dojo/dom - A set of APIs for manipulating the DOM - This is deprecated because Dojo fully abstracts away DOM access.
  • dojo/interfaces - Common interfaces and types for Dojo - This has been deprecated as interfaces now live in their respective repositories
  • dojo/parser - A HTML document parser for instantiating objects declaratively - This is deprecated in lieu of functionality provided using Custom Elements from @dojo/widget-core.

Examples

We have added a repository of examples which have been built on Dojo. Those examples are available in the dojo/examples repository and are live at dojo.github.io/examples.

Support Packages

There are several packages which are designed to support the Dojo platform. Generally these packages are not directly used by end developers:

There are additional packages which are not actively used:

  • dojo/diagnostics - A set of modules that can be used to instrument Dojo 2 applications to provide additional diagnostic information.
  • dojo/devtool - A devtool extension for Chrome and Firefox that provides an interface to the dojo/diagnostics information.
  • dojo/test-extras - A set of modules to help with testing Dojo (relevant features moved into @dojo/framework)
  • dojo/web-editor - A web editor that can run projects exported from cli-export-project. Today we recommend using the Dojo template on CodeSandbox.

Status

The following tables contain status information for the packages:

Package CI Status Code Coverage npm Stage
dojo/cli Build Status codecov.io npm version 4.0
dojo/framework Build Status codecov.io npm version 4.0
dojo/interop Build Status codecov.io npm version 4.0
dojo/themes Build Status codecov.io npm version 4.0
dojo/widgets Build Status codecov.io npm version 4.0

CLI Packages

The dojo/cli will provide extensible functionality via a variety of packages that can be plugged into the CLI.

Package CI Status Code Coverage npm Stage
dojo/cli-build-app Build Status codecov.io npm version 4.0
dojo/cli-build-widget Build Status codecov.io npm version 4.0
dojo/cli-create-app Build Status codecov.io npm version 4.0
dojo/cli-create-theme Build Status codecov.io npm version 4.0
dojo/cli-create-widget Build Status codecov.io npm version 4.0
dojo/cli-export-project Build Status codecov.io npm version Alpha
dojo/cli-test-intern Build Status codecov.io npm version 4.0

Enhancements and Extensions

These are packages which provide extended functionality, usually to other tools, which are used by Dojo. For those using the out of the box tooling, there is little value in these packages, but for those having to integrate Dojo into an existing development pipeline, these packages are likely to be of use.

Package CI Status Code Coverage npm Stage
dojo/devtool Build Status codecov.io npm version Alpha
dojo/diagnostics Build Status codecov.io npm version Alpha

Internal and Support Packages

In addition to dojo/cli there are some packages which are designed to be used both by the Dojo team internally, but also others who are developing Dojo applications:

Package CI Status Code Coverage npm Stage
dojo/grunt-dojo2 Build Status codecov.io npm version 4.0
dojo/grunt-dojo2-extras Build Status codecov.io npm version 4.0
dojo/scripts Build Status codecov.io npm version 3.1
dojo/webpack-contrib Build Status codecov.io npm version 4.0

Example app packages

Package CI Status Code Coverage
dojo/examples Build Status codecov.io

Inactive or Deprecated packages

Package CI Status Code Coverage npm
dojo/actions Build Status codecov.io
dojo/app Build Status codecov.io
dojo/cli-build-webpack Build Status codecov.io npm version
dojo/cli-css-typings
dojo/compose Build Status codecov.io npm version
dojo/crypto
dojo/dataviz Build Status
dojo/dgrid Build Status codecov.io npm version
dojo/dom Build Status codecov.io
dojo/interfaces Build Status npm version
dojo/loader Build Status codecov.io npm version
dojo/parser
dojo/streams Build Status codecov.io npm version
dojo/test-extras Build Status codecov.io npm version
dojo/web-editor Build Status codecov.io npm version

Licensing information

ยฉ 2019 JS Foundation & contributors. New BSD license.

meta's People

Contributors

agubler avatar doomtoo avatar dylans avatar juanpicado avatar kitsonk avatar lscharen avatar maier49 avatar msssk avatar nicknisi avatar novemberborn avatar pdfernhout avatar rishson avatar rorticus avatar sebilasse avatar tomdye avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

meta's Issues

Lambdas/Fat Arrow Functions

I believe we agreed that we should only use lambdas/fat arrow functions when we need the canonical this. If that is the case, we should add it to the guidelines.

Cross-link from other Dojo 2 repositories to files here

Now that we have CONTRIBUTING.md and STYLE.md in one place, we should reference them in that one place and clear them out of the individual repositories.

While we can safely remove STYLE.md from each repo, it makes sense to leave CONTRIBUTING.md present (but simply containing a link to the central one), so that the New Issue page on GitHub still shows the "guidelines for contributing" notice.

Making myself a checklist of repos here to cover:

  • core
  • crypto (PR)
  • dom
  • loader (PR)
  • package template
  • routing (PR)

Standardise Naming of has flags

We should standardise has flag naming to be more expressive. The ideally should refer to the macro standard of which they were introduced in.

For example:

  • html5- for items that were introduced as part of HTML5
  • dom3- for items that were introduced as W3C DOM Level 3 Specification
  • es5- for items that were introduced as part of ECMAScript 5
  • es6- for items that were introduced as part of ECMAScript 6/2015
  • es7- for items that are likely to be ratified as part of ECMAScript 7 (e.g. Object.observe)
  • css3- for items that were introduced as part of CSS3

Enforcing the style guide

Style guides are great for achieving consistency and avoiding certain classes of errors, but manually enforcing them is problematic. It's not fun for the reviewer nor the contributor. Therefore style guides are best enforced through a linting tool which contributors can run locally and which runs as part of the CI process.

Typically linters can flag violations as warnings or errors. Only errors would prevent CI from passing. Having too many warnings though would again require human interpretation, which is not ideal.

xo strikes a good balance. The only warning I've encountered is for TODO comments. That mostly serves as a reminder and and does not imply something is wrong with the code formatting.

If a style guide should be enforced by a linter, and if a linter can only meaningfully convey errors, this means that anything that's enforced through the linter is a MUST, not a SHOULD. Conversely, anything that cannot be enforced by the linter must be a SHOULD, not a MUST.

The goal should be to enforce the entire style guide through a linter. Unfortunately tslint is rather limited.

For now I suggest updating the style guide so what's enforceable is a MUST, and everything else a SHOULD. dojo/dojo-package-template#40 enables some additional tslint rules that maximize enforcement.

Beyond that we could consider contributing additional rules to tslint. However the tslint ecosystem is limited compared to ESLint. There's tslint-eslint-rules but that's still an in-progress port of the ESLint rules. typescript-eslint-parser enables ESLint to validate TypeScript. I think this is a more promising approach. ESLint is also part of the jQuery Foundation.

In the meantime the following points from the style guide are not enforceable by tslint:

  • Variables and parameter names generally SHOULD NOT be prefixed with underscores, but this may be warranted in rare cases where two variables in nested scopes make sense to have the same name, while avoiding shadowing the outer variable.
  • Conventional variable names (dfd for Deferred, etc)
  • Abbreviations and acronyms MUST NOT be uppercase when used as a name (e.g. getXml not getXML).
  • Collections MUST be named using a plural form.
  • Names representing boolean states SHOULD start with is, has, can, or should.
  • Names representing boolean states MUST NOT be negative (e.g. isNotFoo is unacceptable).
  • All immutable variables MUST be declared with const / All mutable variables MUST be declared with let
  • All variable declarations MUST use one const or let declaration per variable. The exception to this rule is the initialization expression of a for statement, and object/array destructuring (e.g. for imports).
  • Variable declarations SHOULD be grouped by declaration type; const first, then let
  • Variables SHOULD be declared where they are first assigned
  • When type coersion is necessary, it SHOULD be performed using the appropriate global function (not constructor)
  • Arrow functions MUST include parentheses around parameters and curly braces around the function body (i.e. implicit returns aren't allowed)
  • Arrow functions SHOULD NOT be used simply as function shorthand; they should ONLY be used specifically for execution context preservation
  • Avoid casts when possible. If a type declaration can solve the problem instead, prefer that over a cast
  • Class properties SHOULD be ordered alphabetically, case-insensitively, ignoring leading underscores, in the following order (refer to style guide for order)
  • Interface properties SHOULD be ordered alphabetically, case-insensitively, ignoring leading underscores, in the following order (refer style guide for order)
  • Module exports SHOULD be ordered alphabetically, case-insensitively, by identifier
  • Module imports SHOULD be ordered alphabetically by module ID, starting with the package name. Module imports from the current package SHOULD come last.
  • Functions MUST be declared before their use. The exceptions to this rule are functions exported from a module and methods of a class
  • Comments documenting methods MUST be written in JSDoc format. Type information SHOULD NOT be included, since it should be possible to pick up from function signatures.
  • Semicolons MUST NOT be preceded by a space.
  • Commas MUST NOT be preceded by a space.
  • Commas MUST NOT appear at the beginning of lines (i.e. no leading commas).
  • All other binary/ternary operators MUST be surrounded by a space on both sides, unless immediately followed by a newline, in which case the operator SHOULD precede the newline (except for .). (Newline precedence)
  • Colons in object definitions MUST NOT be preceded by a space.
  • Colons in case clauses MUST be followed by a newline, and MUST NOT be preceded by a space.
  • The body of each case clause must be indented one level deeper than the case clause
  • The body of each case clause MUST conclude with the break keyword or a // fall through comment.
  • Question: What about block scopes in case bodies?
  • The opening and closing brackets on objects and arrays MUST be surrounded by whitespace on the inside of the object literal
  • Parentheses MUST NOT have space on the inside
  • Anonymous functions MUST have a space between the function keyword and the opening parenthesis; named functions MUST NOT have a space between the function name and the opening parenthesis
  • Blocks with a single statement MUST NOT be written on the same line as the opening brace
  • else and while keywords MUST be on their own line, not cuddled with the closing brace of the previous if/do block.

Dojo 2 Stores Proposal/Specification

Story

Dojo 2 needs a full featured persistent storage APIs that make it easy for subscribers to get/set the information relevant to their needs.

Features

The specification should express several features:

  • Embrace TypeScript and typing of data.
  • Allow subscribers to retrieve subsets of data, versus whole objects.
  • Allow subscribers to receive relevant change records, versus whole objects.

Considerations

There are several things to consider:

  • There is dojo/dojo/store and dstore as prior art.
  • How does GraphQL (or another type of incremental query language) fit into somethings like this?

Widgets and Language Resources

How does the i18n solutions fit into the widgeting system? One of the main purposes of the shadow DOM was to allow such sorts of substitution, but considering the Dojo 2 widgeting system is based on a virtual DOM, how best should i18n be integrated into the widgeting system?

Consider support SystemJS Plugin API

SystemJS defines a separate plugin API than AMD. While they are roughly close, they are different enough to not be compatible ๐Ÿ˜ž.

It is likely that consumers of Dojo 2 will want to utilise it with SystemJS and if it is reasonable to have the AMD plugin API co-exist with the SystemJS one, then it would be good for our users. It would also potentially aid issues like theintern/intern#626.

Migration to typings

We should consider migrating to typings/typings for type management for Dojo 2. It solves some of the challenges that TSD and the other sort of issues that can occur with complex type management and dependencies.

Adopt ImmutableJS as a core design pattern

Topic

Should we adopt ImmutableJS as a core design pattern for Dojo 2?

Background

ImmutableJS provides a library for dealing with immutable data.

Immutable data cannot be changed once created, leading to much simpler application development, no defensive copying, and enabling advanced memoization and change detection techniques with simple logic. Persistent data presents a mutative API which does not update the data in-place, but instead always yields new updated data.

Immutable provides Persistent Immutable List, Stack, Map, OrderedMap, Set, OrderedSet and Record. They are highly efficient on modern JavaScript VMs by using structural sharing via hash maps tries and vector tries as popularized by Clojure and Scala, minimizing the need to copy or cache data.

Immutable also provides a lazy Seq, allowing efficient chaining of collection methods like map and filter without creating intermediate representations. Create some Seq with Range and Repeat.

Considerations

  • How would we integrate ImmutableJS?
  • How would it integrate to our build pipeline?
  • What APIs should we change or replace or augment to leverage ImmutableJS and how do we expose it to the end developer?

Dojo 2 and ES6 Modules

While we will likely continue to prefer AMD/UMD for module loading, it is entirely conceivable that people might want to utilise Dojo 2 in ES6 Modules and we should try to provide as much functionality as possible.

I propose we only support targeting ES6+ with the ES6 module format (so we may need to complete #25 before we can fully complete this).

Things I think we should do:

  • Update the Gruntfile to allow generation of an ES6 module build.
  • Test loading the modules via SystemJS and see how they behave.
  • Identify any considerations for using the AMD plugin API and what impacts that would have on using with SystemJS and if there is any way to support a similar API with SystemJS.

Dojo 2 and ES6

Now that many browsers have sufficient support for ES6, we should try to support targeting ES6 for Dojo 2 and then consider including an "ES6" targeted version in our distributions.

Since 1.7, TypeScript allows targeting ES6 with other module formats (e.g. UMD).

Things I think we need to do:

  • Build a version of Dojo Loader targeting ES6 and run test suite against it
  • Build a version of Dojo Core targeting ES6 (still UMD modules) and run test suite against it
  • Update the Gruntfile to allow transparent building of ES6 distributions (for now, we should just have something like grunt dev:es6 and grunt dist:es6 instead of creating multiple outputs.

Both activities should be done in feature branches off of the main repos, so they can be worked on easily by multiple parties.

In particular, we might run into issues with some type conflicts with some of the built ins that we try to shim (especially Symbol). I know @devpaul was doing some work on this for #18, but I think this is a big enough chunk of work to break it out separately.

TypeScript 2.0

We should get ahead of the release of TypeScript 2.0. This is the Epic issue for dealing with this.

Build time concatenation/layering

The Dojo 2 build system should allow a developer specify concatenation/layering of modules to create a built output of an application.

Clarify order of module imports

Based on a question received today, this should be clarified to indicate that module imports from the current package are expected to come last. Right now the wording is ambiguous as to which end it would appear at.

dojoReady?

@taoqf commented on Fri Apr 22 2016

in which packge can i find this?
i find it in dojo/dojo2 which saysThis repository is not part of what will become Dojo 2. We are not looking for contributions to this repository. If you wish to use or contribute to Dojo 2, please visit dojo/meta to find more information on the current status and packages of Dojo 2

Build Time Optimization for i18n

Somewhat dependent on #53, this issue it to propose how any resource bundles can be build optimized. There are clearly two concepts, we need a mechanism to have n number of language/region codes to be statically resolved at build time and bundled into a distributable. We also still need to be able to resolve non-bundled region codes and allow them to be loaded at run-time.

Committer Workflow Updates

Now that squash commits are allowed via GitHub and we have been turning off merge commits on the repos, it provides a cleaner workflow via using the GitHub interface, but it doesn't handle all workflow scenarios where merge commits, which can be fast forwarded, make sense. I would hate to turn that on, because it might be "dangerous" as it isn't the typical workflow, but we should at least document it.

Either way, the Committer Workflow could use some updating.

Destructuring RegEx into Arrays

We should codify destructuring RegEx into arrays for capturing groups, as this gives more clarity in the code. For example:

const aRegEx = /(\S+)\s*(\S+)/;
const aString = 'foo bar';
let [ match, group1, group2 ] = aRegEx.exec(aString);
console.log(group1, group2); // => foo bar

Targeting of Builds

Broken off from #18.

How do we deal with ES6+ only distributions effectively?

From a problem statement, it is essentially an end user should be able to build an optimized build that targets a "modern browser" and effectively elides unnecessary code while still maintain the same API so the user does not have to rewrite their code. We should also provide them with the appropriate tooling to be able to also provide code that can be elided when targeting a "modern browser". We may also want to include a pre-built "modern" version in our distributions to make it easy for someone to grab-and-go.

There are at least three keys to this puzzle:

  • We need a better understanding of how we are going to elide code with the has API.
  • We need Conditional Decorators which is targeted for TypeScript 2.1.
  • We need Granular Targeting which doesn't have an item yet on the TypeScript roadmap but it is committed (I suspect it is an omission, likely 2.1).

Are there any other thoughts/considerations/etc?

Build Proposal/Specification

Story

Dojo 2 needs a set of tooling to make building Dojo 2 applications straight forward, as well as an easy way of managing dependencies of Dojo 2 packages.

Features

The proposal should express the following features:

  • Ability to easily include dependent packages
  • Ability to build from TypeScript source, including all source packages that are written in TypeScript
  • Build time concatenation/layering
  • Build time minification
  • Generation of typings for a package

Considerations

There are several things that should be considered:

Creating and Loading Language Resources

The most basic use case that falls under i18n is the ability to specify a language/region code and an identifier which represents a resource (text or some other structure) which is suitable for the language code. The system needs to resolve the best match of language/region code.

@bryanforbes has worked on a concept of using ES Observables which provide subscribers with the current language codes resources. If the language code is changed, the observables will publish the changed resources and the consumer reacts to that change. While this is an elegant solution, I wonder how this scales when you have a significant amount of subscriptions and does the frequency of changes during a lifecycle of a loaded page. For example, would if a region change that required a page reload be too limiting of a use case in order to simplify how the mechanism would work.

In Dojo 1, the resources are loaded using the AMD plugin mechanism. The long term disadvantage to requiring that for Dojo 2 means that the only way to get that functionality would be to use an AMD loader. The plugin architecture also looks like it might run into issues when the ES Module Loaders finally arrive natively, as they are unlikely to provide a "plugin" type interface, though the debate is currently ongoing.

So given all these considerations, this issue it to lay out a proposal of creating resource bundles, loading them and offering them up to a consumer.

Modularity of CSS

One of the challenges with modular code is that it also can be a challenge to manage CSS in a modular way and be able for code to be explicit about what CSS is required. Web Components solves this problem by integrating the logic (JavaScript), structure (HTML) and presentation (CSS) into a single entity which is loaded.

Since the direction of Dojo 2 isn't to solve this encapsulation problem via the Web Components architecture we need another mechanism for managing CSS. The options I can see we might consider:

  • Package Level CSS - Each package would have the CSS for all the widgets that it contains and additional themes could/would be loaded on top of the base CSS. A pre-processor can be used for making it easy to maintain. The challenges with this is that it becomes difficult to build time optimise any of the CSS and it becomes an all or nothing proposition.
  • Adopt css-modules - A specification of how to modularise CSS and keep it easily tied to the code. This has the advantage of making the CSS dependencies clear. This would require an AMD plugin, one that may even integrate with a pre-processor, and do a build optimization step. Because a definitive dependency graph could be determined at build time, this likely would end up in fairly well optimised built CSS.
  • Follow a pattern, like Radium, which favours inline styles which can be expressed in a syntax similar to CSS, but calculate and set the styles at DOM rendering time. This has the advantage of logic being able to manipulate the styling.

There maybe other patterns we could consider, but these are the ones that come to my mind.

Regionalization/Localization

Not all features of internationalization are just languages and RTL/LTR input and display. There are also other considerations like constructs like like dates, times and numbers (possibly more). What other features are needed and how should they be expressed?

Actively de-support IE9

Originally, Dojo 2 planned to support IE9. There are several challenges though to continue to support it:

  • Flexbox is non existent, affecting planned widget layout
  • Pushstate isn't supported, affecting the features of routing
  • Lack of classList support (though dojo/dom doesn't depend on that anyways)

Therefore we should consider actively de-supporting it, meaning we stop testing against it and we try to remove code/feature tests we know are only working around IE9.

Allow more awesome arrow function usage

The style guide is rather sour on arrow functions:

Arrow functions MUST include parentheses around parameters and curly braces around the function body (i.e. implicit returns aren't allowed).

There was quite an uproar in the standard community when parentheses became required in v6. This was reverted in v7. Leaving aside the desired for minimalism amongst those who use standard (myself included, I don't need no semi-colons! ๐Ÿ˜‰ ), writing lean arrow functions is pretty great for functional code and promises:

myArr.map(str => str.toUpperCase());

myPromise.then(arr => arr[0]).then(firstResult => {
  // do stuff
  return result;
});

versus:

myArr.map((str) => {
  return str.toUpperCase();
});

myPromise.then((arr) => {
  return arr[0];
}).then((firstResult) => {
  // do stuff
  return result;
});

Except that even that last example isn't allowed, because:

Arrow functions SHOULD NOT be used simply as function shorthand; they should ONLY be used specifically for execution context preservation.

So then we get:

myArr.map(function(str) {
  return str.toUpperCase();
});

myPromise.then(function(arr) {
  return arr[0];
}).then(function(firstResult) {
  // do stuff
  return result;
});

There's already a bunch of violations in dojo-core for this rule.

Personally I think everything should be allowed, whether that's using plain function, or arrow functions, with or without parentheses. It mostly depends on the code and strict rules are hard to enforce.

tslint config that goes beyond the style guide

The following tslint rules are in our tslint.json but are not explicitly described in the style guide:

  • comment-format: check-space: enforces the rule that all single-line comments must begin with a space, as in // comment
  • curly enforces braces for if/for/do/while statements.
  • label-position enforces labels only on sensible statements.
  • label-undefined checks that labels are defined before usage.
  • no-arg disallows access to arguments.callee.
  • no-consecutive-blank-lines disallows having more than one blank line in a row in a file.
  • no-constructor-vars disallows the public and private modifiers for constructor parameters.
  • no-debugger disallows debugger statements.
  • no-eval disallows eval function invocations.
  • no-trailing-whitespace disallows trailing whitespace at the end of a line.
  • no-unreachable disallows unreachable code after break, catch, throw, and return statements.
  • no-unused-variable disallows unused imports, variables, functions and private class members.
  • radix enforces the radix parameter of parseInt.

These should be added to the style guide for clarity.

Generation/management of typings for a package

The Dojo 2 build system should allow generation of typings and management of typings for a package that it creates so it can be easily consumed by another package or integrated into a final production application.

Bower and Dojo 2

We need to really come up with what we are going to do with Bower. Obviously there is a big cowpath (๐Ÿฎ ๐Ÿš—) to npm, but we need to figure out how we are going to publish to Bower. Now that we have reworked the distributions, it should be in a stable situation to properly consider this now.

Following Idiomatic JS

Our organisation is looking into having a documented consistent Style guide for JS / TS and dince we've been long term users / contributors to Dojo, I stumbled across this.

Out of curiosity, did the core team consider https://github.com/rwaldron/idiomatic.js

If so, any reasons why this was not chosen?

Seems to be standard within the community, makes sense and quite extensive too (translated into various languages etc)!

Virtual DOM for Dojo 2?

Topic

Should we consider a virtual DOM for Dojo 2?

Considerations

There are several considerations that should be made about a virtual DOM for Dojo 2:

  • Perceived benefits:
    • Allowing batching/diffing of DOM operations to improve perceived user responsiveness
    • Insertion of a control point between Widgets (and other DOM operators) and the DOM
    • Ability to support serialization of DOM actions which allows for easier isomorphic code
  • Perceived disadvantages:
    • Additional overhead on the client
  • Should a virtual DOM include the full sub-set of DOM operations, or only those operations we would want people to use in the construct of a Dojo 2 Widget?
  • Are there existing libraries that are sufficient to integrate into Dojo 2?

Decide on API documentation generation workflow

Setup workflow to generate API docs for Dojo 2 packages. Things to consider:

  • Will we do something similar to Leadfoot and DigDug ( https://github.com/SitePen/jsdoc-catalyst-theme and https://theintern.github.io/leadfoot/ )?
  • Will we build API docs per package or one view for all packages?
  • Will we set this up to automatically rebuild nightly? Per new tag? Manual only?
  • Multiple version support?
  • Host on GitHub or Dojo web site?
  • Integration with other documentation (e.g. something like a reference guide or tutorials, demos, etc.)?
  • Other things to consider?

Update specification documents

I think our various specification documents are getting a bit stale. It would be nice to keep them in sync with our current thinking where possible.

LTR and RTL

Are there any specific considerations for Left To Right and Right To Left input and display. How does this get managed? In Dijit, RTL was totally an add-on mixin type architecture. Does layering on top of an existing widget architecture work, or should the concept of LTR and RTL be built into the foundations of the widget system?

The API supporting the first Dojo2 widgets

What API layer should be underneath the first Dojo2 widgets?

There are at least two approaches to providing a base API for creating extensible a11y i18n Dojo2 widgets (assuming a vdom is used). One is a HyperScript-like API that is close to the DOM, and the other is a (presumably new) API that hides the DOM. Pros and cons are below.

HyperScript API

One approach is to use a HyperScript-ish API with a chosen vdom that is close to the DOM to construct some a11y and i18n widgets (with at the very least an equivalent for each core Dijit1 widget). Those widgets could then be composed into more complex widgets as needed, and so programmers could mostly avoid learning about the DOM if they were willing to work just within what was possible by that approach. Programmers who were comfortable with the DOM could use HyperScript directly to make new widgets by working close to the DOM if they needed to.

Pros:

  • We would be building on proven technologies that have good performance.
  • Good components on top of a HyperScript API might hide the DOM in a "good enough" way for most use cases.
  • A Dojo2 GUI could always be made to perform as well as possible by dropping down to coding at the HyperScript API level.
  • Existing widgets implemented using HyperScript (like for Mithril or virtual-dom) could be readily adapted to Dojo2 projects.
  • The Dijit2 widget set might have immediate uptake and contributions by existing users of the chosen vdom (who then might also get interested in the rest of Dojo2 if they liked the new Dijit2 widgets).
  • Any of the core maintainers of vdom projects like Mithril, Mercury/virtual-dom, or Bobril would likely be pleased to see a big set of widgets using their vdom, especially a11y ones with i18n support, and so they might be more inclined to be cooperative if small changes were needed to the vdom or API in relation to Dojo2.
  • Any future experiments towards a better-than-DOM API could eventually be built on HyperScript at a little extra performance cost.
  • We could make support functions to help create a11y and i18n widgets using composable functions instead of subclassing.
  • Working at the DOM level may get easier over time regarding the need to hide browser inconsistencies, given Microsoft has ended support for IE versions before IE11 on current Windows platforms, browsers are often now autoupdating, and older hardware will eventually be upgraded.
  • Most JavaScript developers probably already know the basics of the DOM and CSS, and there is much explanatory material already available on the web on using the DOM and CSS to achieve all sorts of effects.
  • We could start building Dijit2 as soon as an initial vdom was decided on, and thus we could start creating pre-alpha Dojo2 apps sooner which would drive further design discussions about Dojo2 to explore other issues @kitsonk has raised (like immutability).

Cons:

  • The DOM is often said to be not a great API.
  • Depending on the vdom choice, an existing component building API in, say, Mithril might not be ideal from a Dojo2 perspective and require an extra wrapping layer
  • Other functionality of the framework might overlap Dojo2 and be hard to hide if using the vdom's existing HyperScript layer.
  • Developers working at the HyperScript API level might create widgets that are not a11y or ignore separation of concerns.

DOM-hiding API

A different approach is to choose or create some low-level API that hides the DOM entirely (and perhaps CSS too), and then build Dojo2 widgets on that new API. Dojo2 developers would be expected to always either be building a webapp on top of that new API or to be composing components previously built on that new API. No DOM knowledge would be expected among Dojo2 developers.

Pros:

  • The new API (or perhaps chosen API if such exists) would presumably be a better designed API than DOM.
  • The new API might be easier to learn and remember compared to learning DOM.
  • The new API could be designed to help enforce separation of concerns somehow.
  • The new API could be designed to enforce a11y or i18n somehow.
  • A new API could hide current browser inconsistencies at a low level and also provide a way to deal with future browser incompatibilities.
  • The new API (if well designed) might even be portable to other GUI toolkits like Swing, QT, or TK (or might just be exactly the same API such as Swing's).

Cons:

  • Performance may be slower depending on the degree of mismatch between the new abstraction and the DOM.
  • Any new API typically has little documentation at first, and what documentation there is may get rapidly out-of-date.
  • Trying to design some better-than-DOM API for the low level might take a long time -- delaying the development of Dojo2 widgets and webapps.
  • Any new API has a long uphill climb for adoption.
  • The new widgets would likely be harder to integrate with an existing vdom API and so might have little community support at first.
  • Any new abstraction over the DOM and/or CSS would likely still "leak" and so still require webapp developers to learn the DOM and CSS. In such a situation, the new API could run the risk of being seen as just "in the way" of desired DOM and CSS interactions.
  • DOM knowledge that Dojo2 developers did have would not be useful and might even be misleading in using the new API (e.g. Dijit introduced addChild to substitute for DOM appendChild, yet removeChild is the same between Dijit and DOM).
  • It likely would be impossible in practice to build a HyperScript API on top of a non-DOM-oriented API, foreclosing that option (without going around the new API somehow).
  • Essentially, a substantial new API to replace the DOM and CSS is a research project with an uncertain outcome.

Discussion

This issue is a summary of Issue #15 to better promote discussion as recommend by @dylans. That issue itself was a spinoff of issue #11.

Because Dijit had contributed so much to the success of the Dojo toolkit according to Dylan's 2010 FOSDEM talk, I feel this Dojo2 widget issue should be a high priority one to resolve and get moving forward on.

I am biased on this based on previous experience migrating from Dijit1 to Mithril and enjoying working with Mithril. With a HyperScript approach used in a Mithril way, I feel there is a relatively straightforward path, where in a few weeks of full-time work, we might have the beginnings of a set of Dojo2 widget components good enough to start critiquing and improving and using in pre-alpha projects as test cases to drive further design discussions.

What do other people think? Are there more pros and cons I should add to be fairer? Are there other options worth listing besides those two?

Standardise argument conventions

Based on the thoughts in dojo/core#28, I would like to propose the following...

That if an argument is not optional, in an API then it should be included in the signature of the function call. If the parameter is optional, then it should be included in in an argument called options which ideally will be defined using an exported interface and should be either a default or optional argument that is placed last.

Overloading and intersection types for clarity of the API should be used sparingly and when there is justification that it increases the utility or clarity of the API.

An example of some good APIs:

export interface FooOptions {
    bar?: string;
    baz?: number;
}

function fooA(location: string, options?: FooOptions): void {
    /* cool stuff */
}

function fooB(arg1: string|number, arg2: string, options?: FooOptions): void {
    /* cool stuff */
}

function fooC(options: FooOptions = { bar: 'bar' }): void {
    /* cool stuff */
}

Convert to UMD Definition Files for TypeScript

Currently our definitions are exported in a way that are considered "global" by current type acquisition engines, although we have never worked that way. There is a way to define types now as "UMD" definitions, which will effectively mirror the module structure of the code and create definitions that can be better consumed and namespaces by resulting packages.

Should Dojo2 widgets be based on a HyperScript-ish API?

This issue is a spinoff of issue #11. @dylans wrote there: "I will say that many of the virtual DOM APIs feel like they're going to turn code into long chains of imperative code make me think there must be a better way, as that style of coding discourages reuse." On "long chains of imperative code", some examples would be nice so I'm sure I know what Dylan mean. The rest of this assumes he means the imperative nature of the HyperScript-ish API. That may not be what he meant, but as I like talking about the benefits of the HyperScript API, it gives me a good excuse to talk about that. :-)

As I said there, based on an enjoyable experience with Mithril, I feel it is almost certain that an imperative HyperScript-like API is both a good choice for a modular interface to whatever vdom implementation is underneath that HyperScript layer and a good choice to support whatever Dojo2/Dijit2 abstractions are built above that HyperScript layer.

Advocating for a HyperScript API layer specifically is moving beyond the vdom pro/con issue towards a Dojo2/Dijit2 widget API, and so I created a new issue for it. Still, as HyperScript relates to the feasibility of using a vdom, it does have some bearing on deciding whether to proceed with a vdom approach. The rest of this tries to make a case that Dojo2 widgets should be written on top of a HyperScript-like API such as used by Mithril and Mercury to define their vdoms.

To clarify what this issue is not intended to be about:

  • Whether Dojo2 should have its own HyperScript-ish layer or instead use an existing one is mostly a separate issue. Probably I think Dojo2 may end up with its own implementation, but I am not sure.
  • The choice of a HyperScript-ish API is also a separate issue from deciding whether to use an existing vdom or writing a new one, since the same HyperScript-ish API could in theory target more than one vdom. A HyperScript layer could also be written for a preferred vdom that does not have one already, so using a HyperScript layer is not limiting in that sense.
  • Whether users should expect to muck around directly with the vdom representation which a HyperScript layer produces (as with my "subtractive" kludge mentioned later) is again a different issue from whether there is a HyperScript-ish API easily available to Dojo2 developers.
  • Whether Dojo2 should support templates of some sort is a different issue. I touched on that in issue #11, explaining why I feel ad-hoc HTML-ish templates are not a great idea for sophisticated webapps, and I know that may be still a controversial position, but since you can translate templates into either HyperScript API calls or directly to vdom structures, supporting a HyperScript API is not limiting in that sense of precluding templates.

== A motivating example

As an example of such a (hypothetical) HyperScript-like API in use for Dojo2, here is some hypothetical code to display a greeting and a timestamp, and to support updating the timestamp either via a button click or via some hypothetical TimeStampEditor widget (perhaps just a button that puts up a prompt or perhaps something fancier with a date picker and a clock face). Assumed below is that when the onclick function is set, it is automatically wrapped by another function that queues a redraw (similar to what Mithril does). Also, while this example uses mostly lower level HTML definition, I'd expect most Dojo2 applications are going to be composing their GUIs mostly with Dijit2 widgets of various sorts (including with i18n support and a11y support and so on).

import h = require("dijit2-vdom");
import TimeStampEditor = require("TimeStampEditor");

// Define a model as a plain JavaScript object (with no support for dependencies)
var model = {
    lastTimestamp: null
};

function updateTimestamp() {
    model.lastTimeStamp = new Date().toISOString(); 
}

// Create an editor component we will use later
var editor = new TimeStampEditor(model, "lastTimestamp");

// Return a vdom structure reflecting the current model and able to change that model
function render() {
  return h("div#greeting", [
    h("span.salutation","Hello!"),
    h("hr"),
    "Time: ", 
    model.lastTimestamp,
    h("button", {onclick: updateTimeStamp}, "Update time"),
    h("br"),
    "Or edit it here:",
    h("br"),
    h.component(editor)
  ]);
}

updateTimestamp();

// Render a vdom into the DOM and get ready to rerender as needed on redraw requests
h.mount("someExistingDivID", render);

I wanted to use "d" for Dojo as in my example in the previous issue. However, "h" may be more practical given existing tools that can convert HTML to HyperScript using "h".

This example differs from Mithril in that the component construction process is more explicit that the one Mithril uses -- which otherwise involves a behind-the-scenes construction process. The Mithril approach to components has pros and cons. One benefit of the Mithril approach is with dynamic GUIs where components might come and go a lot and need to otherwise be tracked somehow by the developer. In general, choosing a good way to construct and track components is a challenge here, so the best way to do components is an open question to think through-- and the Mithril approach may still be best in practice, or might be built on in some other direction.

== The case for building Dojo2 widgets on a HyperScript-like API

Obviously, there are multiple programming paradigms (including Imperative, Procedural, Declarative, Functional, Object-oriented, Event-driven, and Automata-based). On typical current hardware, all running code is ultimately imperative code defined by machine language stored in sequential bytes in memory. So, the issue is what abstractions we choose put on top of that imperative base for what purposes (including subjective aesthetics).

One advantage of a low-level imperative base of using HyperScript to define vdoms via function calls is that you can then build whatever abstractions you want on top of that in a reasonably efficient way. Otherwise, you may end up trying to map whatever abstraction you want to use today onto, say, someone else's OO or functional model chosen yesterday which has its own set of assumptions, with a result that may be slow and hard to debug due to extra unneeded layers.

Working with a HyperScript-ish API feels very close to just specifying all the HTML DOM nodes yourself. Any webapp programmer is going to have to get comfortable with the DOM sooner or later, so why not sooner? Then, such an informed programmer will probably eventually want to turn towards abstractions over that layer to save time or avoid repetition to hopefully reduce maintenance costs.

In the simple example I provided of using a "h" function to compose a GUI in an imperative way, that's just the base. A single-page webapp I wrote with about forty virtual pages (first using Dijit and then converted to Mithril's vdom approach) uses a declarative approach to define most pages using JSON-ish structures that are then converted via a "builder pattern" to more imperative vdom construction functions (Mithril's API), where Mithril in turn then does more work on rendering to initialize and assemble components and translate them to DOM nodes. However, I could (in theory) have somehow used, say, a constraint resolving engine like Cassowary to go from specifications to Mithril m function calls. Or a trained neural network or whatever. Also, the application-specific widgets themselves were functions that usually created objects which then used the imperative Mithril functions to compose parts of UIs (including sometimes using other widgets instead of simple DOM objects).

So, in practice, I don't feel an imperative-ish vdom API base is limiting. It is even freeing in that you can build whatever you want on top of it. Granted, it may be sometimes useful or even more computationally efficient in some sense to work below that API, an example of which is below. But the imperative API by itself does not prevent you from creating good abstractions for using it towards a goal of reusable code.

Obviously, a good framework is going to provide opinionated tools for using that imperative base effectively and quickly to build data-rich web applications. That's where Dojo2/Dijit2 could shine best in my current opinion -- in innovative leveraging of a HyperScript-ish API above a vdom to support reuse at that higher level of abstraction (while also not preventing lower-level work at the HyperScript level or below when needed for some reason).

For example, "standardWidgets.ts" is some code I wrote for that webapp which creates some standard widgets for that builder like checkboxes, textareas, radio buttons, and so on using Mithril in a way where all those "widgets" pass W3C validation for basic accessibility (with labels and "for" attributes). That code could be clearer and more modular, so I'm not holding it up as something to emulate in that way. The point is that it shows how you can take the low level imperative approach of using a HyperScript-ish API and use that low-level API however you want within JavaScript/TypeScript -- in this case, driven by more abstract GUI specifications. If I someday had time to add ARIA support to improve accessibility beyond standard accessible HTML, then I could make some changes to that code (and elsewhere) to add the right ARIA attributes. Or I could replace most of that code with calls to a library that used a HyperScript-ish API to define ARIA-compliant labelled widgets.

In the case of Mithril, the vdom representation is essentially a relatively straighforward JSON-like object (though including functions). So, you can even bypass those imperative HyperScript-like function calls to some extent if you really want to, because they are just returning nested JavaScript data structures made mostly of basic JavaScript objects. Although then you are linking your code to a specific underlying vdom representation if you do that.

For example, as a kludge I did just that in the standardWigets.ts file mentioned above where it creates sets of checkboxes and radio buttons. I call delete questionLabel[0].attrs["for"]; to remove an unneeded "for" attribute generated into the vdom representation elsewhere by the panel builder system as a default which is appropriate most of the time given otherwise there is always one label to go with each input widget. That kludge unfortunately binds that code tightly to the Mithril vdom representation. It works, but "subtraction" is problematical, especially when it violates some abstraction boundary as it does in this case. So, ideally, I should refactor that entire build process so the "for" attribute is never added in those cases -- maybe someday. My main point is that you can get in there and bypass a HyperScript API and muck about with underlying representations the API constructs if you really want to -- once you have committed to a specific vdom. Or, at least, committed to a set of vdoms that use a common internal representation if you want your code to be usable for more than one vdom. Still, doing so even for just one vdom may be problematical if the vdom representation were to change -- although that is probably unlikely for any specific mature vdom library as a likely breaking change for many users who would have done this sort of thing.

Ultimately, building a complex webapp for a browser requires using JavaScript to create and configure trees of DOM nodes. There has to be some imperative layer in a webapp or supporting libraries that does that work (even if just ad-hoc internal APIs calling DOM functions). Typically, with a vdom approach, this DOM manipulation is isolated to some rendering function that does a diff from some new vdom structure you assembled somehow relative to the last one you supplied to decide how to change the DOM. The new vdom structure can be assembled via HyperScript-ish function calls. Or it can be assembled from interpreting some template or specification either indirectly into HyperScript calls or directly into assembling the vdom representation. The only question might be, do you try to completely hide that vdom construction layer for some reason in Dojo2? I'd advocate that a HyperScript-ish API layer should not be hidden, and instead such an API should be celebrated as an opinionated choice to support adaptation and extension of Dojo2/Dijit2 in unplanned ways -- similar to the approach Mithril, Mercury, and some other vdom systems take regarding that.

Now, it may be tempting to say, Dojo2 could construct vdom structures for Dijit2 widgets somehow better than via an imperative HyperScript API. Maybe it will someday. Dylan is right to question that imperative style and ask if there could be something better. But you generally also have to walk before you can run. Right now, Dojo2 does not have any released vdom Dijit2 widgets. A HyperScript API still provides a solid and proven-successful place to start in making Dojo2 widgets, even if down the road better approaches might be possible or even required for special cases including optimization for vdom construction or diffing.

But having better vdoms or using vdoms in better ways is orthogonal to having good vdom-based applications right now. The HyperScript API (coupled with some Mithril-like support code) provides a way to sidestep all that vdom experimentation, to start building applications now which can use what is out there. Such code can likely benefit from further vdom improvements later with hopefully relatively minor changes to most code if it works at the HyperScript API level.

Reuse is obviously desirable as Dylan mentioned in his comment in the other issue. However, reuse is also difficult given you need multiple examples to figure out how to design reusable stuff. You almost always also need to make assumptions that limit reuse in some direction. You also typically start wrestling with tradeoffs of adding complexity to be general (for related humor, see "Why I Hate Frameworks") versus writing simpler code to be faster and more understandable. You need to make such a tradeoff unless you get lucky with some new inventive idea to avoid a tradeoff, which is rare -- but I feel Leo Horie is onto that sort of invention with Mithril. Compared to what I've seen and heard about many other frameworks, Mithril just feels like an elegant and effective way to make webapps (although not without some warts like related to component initialization complexities).

That process of making such design decisions is of course a deep and perhaps endless discussion (perhaps as a design equivalent of Gรถdel's incompleteness theorems). There may well be other great ideas out there for vdom-based webapps which are much better than a HyperScript API used in a Mithril-ish way, and which I do not know of (and I welcome hearing about them). But what I do know is that by adopting the proven base of a HyperScript-like API for composing UIs in JavaScript/TypeScript using a vdom approach similar to Mithril, we empower Dojo2 developers to start having those sorts of deep discussions about reuse in the context of working Dijit2-based code, which may prompt further insights into better abstractions from practical experience.

CSS Pre/Post Processors for "Internal" Use

Dojo 1 used less as a pre-processor, but largely the team has felt that wasn't the best decision and subsequent development has focused on Stylus.

SASS is very popular as a CSS pre-processor, but being based on Ruby increases the dependencies on what is largely a design-goal of having JavaScript based tooling for Dojo 2. There would have to be a compelling reason (in my opinion) to adopt SASS.

In addition, with a desire to utilise FlexBox for layout with Dojo 2 widgets, there maybe a need for either using a post-processor or a some sort mixin solution (e.g. nib for Stylus) for the pre-processor to be able to transform the CSS.

We also need how a pre-processor would work along side any sort of CSS modularity solutions (see #28).

Application Factory Proposal/Specification

Story

In order to make it easy to develop full featured web applications, one way of building the application is describing it in meta-data which then gets "inflated" into an instantiated applications.

Features

The application factory should express the following features:

  • Interface to a Dojo Store to retrieve its meta data
  • Have a small, concise API surface
  • Integrate into Dojo Topics and Events as appropriate to extend/modify behaviour

To bootstrap, ideally you would have something as straight forward as this:

import restStoreFactory from 'dojo-store/rest';
import appFactory from 'dojo-app/factory';

const myApp = appFactory({
    store: restStoreFactory({
        url: '/app/myApp'
    })
});

myApp.start();

Considerations

Some points to consider are:

  • Does this supplant/transform the Parser?
  • What sort of schema is needed to define the application in data?
  • What sorts of features are needed from other parts of Dojo 2 to support this?
  • What is the application factory lifecycle?
  • How does it integrate into concepts of Actions and Routing?

Distribution Formats

Thinking about how we should format distributions, I was thinking something like this:

dist
โ”” umd - individual UMD modules with external sourcemaps
โ”” es - individual ES6+ targeted modules in es6 module format
โ”‚      with inline sourcemaps and sources (essentially for
โ”‚      rebundling)
โ”” src - source TypeScript files
โ”” typings - Any typings for the package, including the packages typings
  index.js - a UMD module that contains all the packages modules in a single bundle
  index.min.js - a UMD module that contains everything minified
  index.js.map - A sourcemap file for index.js
  index.min.js.map - A sourcemap file for index.min.js
  package.json - CommonJS package meta-data
  bower.json - bower package meta-data
  README.md - Package's readme
  LICENSE - Package's license

I think it will be important to consumers to have easy ways to consume the packages in different workflows. I would expect our build pipeline would eventually just grab the /src and keep rolling things up into a final distribution build, but I can see where people will want to grab things like /es and use Babel or something else to do their targeting won't need to have TypeScript installed.

ES6 Typings

As discussed in #18, we have scenarios where when having ES6+ targetted code versus ES5 targetted code, the typings have to be different. Even with shimming the way we do, we run into issues when targetting ES6 (for example TypeScript complains when you aren't using the native Symbol when you target ES6) and it is difficult to deal with Iterators. @devpaul pointed out that ReactiveX/RxJS (who likely have some of the most mature) have to "cheat" by typings things as any.

We think Conditional Decorators Microsoft/TypeScript#3538 and Micro Targetting Microsoft/TypeScript#4692 will potentially provide us with the tooling to make it easier to generate ES6 code as well as generate the correct corresponding typings.

We should also check out how typings/typings will help manage these situations, to understand if different targeted versions of typings can be made available to be consumed.

Adopt Observables as core design pattern

Topic

Should we adopt RxJS/Observables as a core design pattern?

Background

The Reactive Extensions for JavaScript (RxJS) is a set of libraries to compose asynchronous and event-based programs using observable collections and Array#extras style composition in JavaScript.

They are like if you combined Events+Promises+Generators. Where Promises are either resolved or unresolved, and Generators require the consumer to request the next value, Observables sort of combine the two to make event based programming easier.

RxJS 5 is being rewritten and is done in TypeScript.

Considerations

  • How would we integrate it?
  • What APIs would it replace or supplant?
  • Can we integrate it into our build tooling?

Split has into its own package

As we have looked at the dependencies for the foundational packages for Dojo 2, we have identified one API that would likely benefit from being on its own and that is the has API. This API is generally used and would be a joint dependency between dojo-core and dojo-shim. While it could "live" in dojo-shim it isn't really part of the purpose of that package.

In Dojo 1, we never fully took advantage of the API and it would be a shame to do that for Dojo 2. has() not only provides feature detection and branching, but it also can be integrated into the build process to do effective build optimisation with static assertions at build time.

Having this as a segregated API should make it easier and clearer for other Dojo 2 packages but other packages outside of Dojo 2 to leverage this API.

This all goes without saying that credit, as always, should be given to Peter Higgins on the original has.js library.

Ability to build from TypeScript Source

The Dojo 2 build system should allow a total build from TypeScript sources to a particular target. This should also allow integration of both other Dojo 2 packages that are built on TypeScript but also potentially external, 3rd party packages, that are build on TypeScript.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.