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

[experimental][discussion] introducing baseBase setting to support base inheritance for groups #1720

Merged
merged 3 commits into from
Sep 25, 2014

Conversation

caridy
Copy link
Member

@caridy caridy commented Mar 20, 2014

With the upcoming SPDY support, we will have more and more applications using combine: false (combo is an anti-pattern when serving assets using SPDY), also, we will see some benefits when serving all assets from the same domain (yes, domain sharding is also an anti-pattern when using SPDY). In an effort to consolidate the inheritance of configurations from groups from the master settings to minimize the amount of settings to define per group, we are proposing to have a new configuration option called baseBase.

baseBase works similar to comboBase, which has to be completed with the root value to form the path to a module. If baseBase is specified at the top level, along with comboBase, and root is defined at the top level and per group, then it will be simpler to infer the base value per group based on the global baseBase.

The ideal configuration will be:

YUI({
      baseBase: 'http://mycdn.com/path/to/',
      comboBase: 'http://mycdn.com/path/to/combo?',
      root: 'yui-3.1.5.0/',
      groups: {
           foo: {
               root: 'bar/'
           },
           bar: {
                root: 'foo/'
           }
      }
})

In the example above, whether we use use combine or not, the base does not have to be defined, because it can be computed based on baseBase and the corresponding root value.

Few more thoughts:

  • base is king. If it is set, it will not be combined, so this change is BC.
  • baseBase CANNOT be infer from parsing the seed url, it always have to be defined manually (BC too).

Open questions:

  • should combine be inherited/computed as well?

@yahoocla
Copy link

CLA is valid!

@ericf
Copy link
Member

ericf commented Mar 20, 2014

I wonder if we should take a different approach here and have a new/better configuration API that's opt-in behind a flag?

Right now, the configuration we need to setup if very, very confusing for people, and adding baseBase just makes matters worse in that regard. Instead of glomming-on more ambiguous configuration options, can we step back, create the config values we really want, and put the processing of those values behind a feature flag?

@caridy caridy changed the title introducing baseBase setting to support base inheritance for groups [experimental][discussion] introducing baseBase setting to support base inheritance for groups Mar 25, 2014
@tripp tripp merged commit abb47a1 into yui:dev-3.x Sep 25, 2014
@caridy caridy deleted the group-config-inheritance branch September 25, 2014 04:03
@okuryu
Copy link
Member

okuryu commented Sep 29, 2014

Updated the HISTORY.md in ed102b9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants