Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
JavaScript MDN documentation hierarchy change proposal
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
David Bruant  
View profile  
 More options Oct 10 2012, 5:57 am
Newsgroups: mozilla.dev.mdc
From: David Bruant <bruan...@gmail.com>
Date: Wed, 10 Oct 2012 11:57:41 +0200
Local: Wed, Oct 10 2012 5:57 am
Subject: JavaScript MDN documentation hierarchy change proposal
 Hi,

I've been thinking about how the JavaScript MDN documentation is organized
and wish to change this organization to be more easily searchable and so
that the documentation hierarchy helps better undertsand how the language
works.

In this message, I'll be explaining problems I see, proposing improvements.
After constructive debates, I'll write another proposal and reach out to
the broader JavaScript community. After another round of feedback, I think
it'll be time to actually make the changes.

# URLs

## Built-ins

### Problem

Let's take the example of Array.isArray :
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_...

Pretty much everything is fine except:
* "Global_Objects". I think very few people search for "global objects
Array". I wish I would say I know what people search for, but I don't.
jean-Yves, do you have generic keywords often used for built-in library
searches?
* "Array/isArray"
There is no reason not to have "Array.isArray" in the URL.

### Proposal

developer.mozilla.org/{locale}/docs/JavaScript/Reference/Built-ins/Array.is Array<http://developer.mozilla.org/%7Blocale%7D/docs/JavaScript/Reference/B...>

There might be better ideas than "Built-ins", I'm all hears.

## Syntax

### Problem

Let's take the example of object literal getter syntax
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operato...

Everything is fine except "Operators". The "get" is not an operator (while
"+" or "!" are). It might be that JavaScript MDN doc grew organically so
people just used "Operators" as a generic (but misleading) term for
"syntax".
However, as new syntax constructs (destructuring, default arguments, for-of
loops...) are added, I think it's time to fix the terminology

### Proposal

https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Syntax/get
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Syntax/...

# Differenciating constructors and instances

## Problem

As mentioned in an older post, there is an ambiguity when people are
searching for "object" or "array". Are they looking for the Array
constructor or array instances. We might consider take casing into account,
but that doesn't sound like a reliable improvement over what we currently
have.
Currently the content for both the Array constructor and array instances
are in the same page
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_...
Likewise for dates and some others.

## Proposal

Have 2 pages, one for the constructor, one for the instances. Each page
contains a disambiguation message like:
"You're looking at the Array constructor page. If you're interested in how
array instances work, there is another page for that" (with link to the
page).
Likewise in the array instances page.
I'm hopeful this distinction will help newcomers to JavaScript understand
better the constructor/instances thing and that constructors and objects
themselves too.

I can make a disambiguation template to be put on top of each page where
it's necessary.

I don't see any other big problem with the JavaScript hierarchy.
Tell me what you think.

Thanks,

David


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Colby Russell  
View profile  
 More options Oct 10 2012, 9:28 pm
Newsgroups: mozilla.dev.mdc
From: Colby Russell <sevensp...@gmail.com>
Date: Wed, 10 Oct 2012 20:28:20 -0500
Local: Wed, Oct 10 2012 9:28 pm
Subject: Re: JavaScript MDN documentation hierarchy change proposal
On 10/10/2012 04:57 AM, David Bruant wrote:

> In this message, I'll be explaining problems I see, proposing improvements.
> After constructive debates, I'll write another proposal and reach out to
> the broader JavaScript community. After another round of feedback, I think
> it'll be time to actually make the changes.

There has been a proposal to do these things since 2006.

<https://developer.mozilla.org/en-US/docs/Core_JavaScript_1.5_Referenc...>
<http://web.archive.org/web/20060206115241/http://developer.mozilla.or...>

> Let's take the example of Array.isArray :
> https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_...

> Pretty much everything is fine except:
> * "Global_Objects". I think very few people search for "global objects
> Array". I wish I would say I know what people search for, but I don't.
> jean-Yves, do you have generic keywords often used for built-in library
> searches?
> * "Array/isArray"
> There is no reason not to have "Array.isArray" in the URL.

This is truth.  You'll notice that the "reorg" link from above would
have us put things this way (if Array.isArray had existed when that page
was created).

> ### Proposal

> developer.mozilla.org/{locale}/docs/JavaScript/Reference/Built-ins/Array.is Array<http://developer.mozilla.org/%7Blocale%7D/docs/JavaScript/Reference/B...>

> There might be better ideas than "Built-ins", I'm all hears.

Lose the "Built-ins" part, too.  And as long as we're talking about
what's ideal, the {locale}/docs/ needs to go away, too.  "Built-ins" is
nice, but there's no reason for the hierarchical stuff to appear
anywhere but on the reference's main index page.

Using indexOf as an example:

"MDN > JavaScript > Reference > Array.prototype.indexOf" should be the
breadcrumbs, where the dots can take the place of the standard
breadcrumb separators; "Array" links to [1], "prototype" links to [2],
and indexOf is the page you're on, located at [3].

1. http://developer.mozilla.org/JavaScript/Reference/Array
2. http://developer.mozilla.org/JavaScript/Reference/Array.prototype
3. http://developer.mozilla.org/JavaScript/Reference/Array.prototype.ind...

> ## Syntax

> ### Problem

> Let's take the example of object literal getter syntax
> https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operato...

> Everything is fine except "Operators". The "get" is not an operator (while
> "+" or "!" are). It might be that JavaScript MDN doc grew organically so
> people just used "Operators" as a generic (but misleading) term for
> "syntax".

Yup.

Again, no need to replace a saw horse with a track hurdle just to be
"proper".  Lose the whole thing altogether and be done with it.

Wikipedia is instructive.

* Make <http://developer.mozilla.org/JavaScript/Reference/get>, and

* Make <http://developer.mozilla.org/JavaScript/Reference/...> a
disambiguation page linking to
<http://developer.mozilla.org/JavaScript/Reference/..._(rest_parameters)> and
<http://developer.mozilla.org/JavaScript/Reference/..._(spread)>, with a
blurb about how they're mirror twins.

:D

Don't do it, man.

I did *exactly* this in 2008.  You'll have to use archive.org to have a
look, because it doesn't look like Kuma handles it well at all.

See
<https://groups.google.com/d/topic/mozilla.dev.mdc/l9Tmt22nQwA/discussion>
or search for the topic "Core JavaScript Reference not so useful
anymore" in this group.

What it comes down to is that, as Shaver said then, when people click
through to the "String" page from the Reference index, they want to  see
the methods to manipulate string instances.

(As an aside: I felt *really* vindicated with ES5, where most of the
methods added were on the constructors themselves instead of the
prototype.  E.g., Object.defineProperty(obj, desc) instead of
obj.definePropery(desc).  And it's funny today seeing Shaver write,
"Script authors don't -- and don't need to -- understand the prototype
model, in the large[...]")

***

The issue with the reorganization stuff is the same now as it was then,
though.  It's a matter of the server software not supporting this stuff.

--
Colby Russell


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Bruant  
View profile  
 More options Oct 11 2012, 6:20 am
Newsgroups: mozilla.dev.mdc
From: David Bruant <bruan...@gmail.com>
Date: Thu, 11 Oct 2012 12:20:32 +0200
Local: Thurs, Oct 11 2012 6:20 am
Subject: Re: JavaScript MDN documentation hierarchy change proposal
Before anything else, thanks for all the history digging. I wasn't there at
the time so it's good to know

2012/10/11 Colby Russell <sevensp...@gmail.com>

This looks so good!!

It's not that much about being proper or ideal. JavaScript evolves. i think
it's nice if people can easily understand if something new is just syntax
(which is just a convenience, but brings nothing new) against a new
feature, like WeakMap or Proxies which bring a new capability to the
language. The boundary I'm trying to make is between "what you can do with
the language" and "how to express yourself with the available syntax". I
think is a worthwhile distinction to be made, akin to the difference
between ideas (which are abstract) and the "syntax" to express an idea
(which is just a mean differing from language to language). With the rise
of compile-to-JS languages, differenciating the "VM" and the syntax will
become increasingly important I think.

Maybe "Built-in" is a bad idea, because http://developer.mozilla.org/**
JavaScript/Reference/Array.**prototype.indexOf<http://developer.mozilla.org/JavaScript/Reference/Array.prototype.ind...>
looks
nice indeed, but it doesn't hurt to have /Syntax especially since it's hard
to make nice URLs with syntax constructs (like ... or the very generic
"get" as can be seen below)

I'm not sure about "..." and disambiguiation, but that's an idea.

Ok, lesson learned :-)

> You'll have to use archive.org to have a look, because it doesn't look
> like Kuma handles it well at all.

> See <https://groups.google.com/d/**topic/mozilla.dev.mdc/**
> l9Tmt22nQwA/discussion<https://groups.google.com/d/topic/mozilla.dev.mdc/l9Tmt22nQwA/discussion>>
> or search for the topic "Core JavaScript Reference not so useful anymore"
> in this group.

> What it comes down to is that, as Shaver said then, when people click
> through to the "String" page from the Reference index, they want to  see
> the methods to manipulate string instances.

This is very true. So I guess we need to have both content on the same
page. I wish to find a way to being able to differentiate both on the page
anyway, but it can come later.

> (As an aside: I felt *really* vindicated with ES5, where most of the
> methods added were on the constructors themselves instead of the prototype.
>  E.g., Object.defineProperty(obj, desc) instead of obj.definePropery(desc).
>  And it's funny today seeing Shaver write, "Script authors don't -- and
> don't need to -- understand the prototype model, in the large[...]")

Things have changed a lot since 2008. The trend is not to "script authors",
but "app developers" with the idea of larger-scale application. I think
it's more relevant today that ever that people understand how JavaScript
works.

> The issue with the reorganization stuff is the same now as it was then,
> though.  It's a matter of the server software not supporting this stuff.

It's coming very soon, my friend ;-)
(meta bug) https://bugzilla.mozilla.org/show_bug.cgi?id=764431
http://www.bitstampede.com/2012/10/10/kuma-update-october-10-2012/

I only started to think about a reorg because I knew the support for that
was coming soon :-)

David


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jean-Yves Perrier  
View profile  
 More options Oct 11 2012, 10:09 am
Newsgroups: mozilla.dev.mdc
From: Jean-Yves Perrier <jperr...@mozilla.com>
Date: Thu, 11 Oct 2012 16:09:46 +0200
Local: Thurs, Oct 11 2012 10:09 am
Subject: Re: JavaScript MDN documentation hierarchy change proposal
I'm all for having shorter URLs (I still have to look in details about
JavaScript).

But I do believe we should untie the breadcrumbs and the URL. (As we
just untied <title> and <h1>, and partly URL)

We want as short URL as possible (to ease search, better SERP, but also
URL guessing), but we want more complex breadcrumbs to ease navigation.

To take examples outside the JavaScript hierarchy:

{locale}/docs/CSS/animation-duration is a nice URL (I skip the
{locale}/docs problem, which is a separate one)

But:

CSS > Reference > Animations > animation-duration is a better
breadcrumbs for navigation as hovering/clicking on each keyword bring
adequate links.

(To have the '.' as a breadcrumb separator, and hence as a link separate
is 'a priori' ok too, given that the theme gives enough hint they are
clickable)

Regarding JavaScript, I'm not sure to have understood if there is a
significant homonym problem or not (I'm a bit lost with prototype method
and non-prototype method).

(Note that I don't have filled the bug for separating breadcrumbs and
URL hierarchy)
--
Jean-Yves

On 11/10/2012 12:20, David Bruant wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Bruant  
View profile  
 More options Oct 11 2012, 10:18 am
Newsgroups: mozilla.dev.mdc
From: David Bruant <bruan...@gmail.com>
Date: Thu, 11 Oct 2012 16:18:22 +0200
Local: Thurs, Oct 11 2012 10:18 am
Subject: Re: JavaScript MDN documentation hierarchy change proposal
[cc'ing dev-mdn]

2012/10/11 Jean-Yves Perrier <jperr...@mozilla.com>

It seems like it's be a significant change in how URL and breadcrumbs will
be related, because up to now, it was pretty straightforward.
If we want to go down that road, we need to think about it as early as
possible.

> Regarding JavaScript, I'm not sure to have understood if there is a
> significant homonym problem or not (I'm a bit lost with prototype method
> and non-prototype method).

There is none as long as we can write "Array.prototype.concat" vs
"Array.isArray" in the URL

 David


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
l.m.orchard  
View profile  
 More options Oct 11 2012, 10:55 am
Newsgroups: mozilla.dev.mdc
From: "l.m.orchard" <lorch...@mozilla.com>
Date: Thu, 11 Oct 2012 07:55:51 -0700 (PDT)
Local: Thurs, Oct 11 2012 10:55 am
Subject: Re: JavaScript MDN documentation hierarchy change proposal

Breadcrumbs and URL paths are very tightly bound in Kuma. And, as development progresses, new features have only been making that relationship more ingrained. We've just done a ton of recent work with page moving that relies on that relationship.

I don't think separating the URL from the topic hierarchy structure is something that would be easy or happen quickly.

--
lorch...@mozilla.com
{web,mad,computer} scientist


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sheppy  
View profile  
 More options Oct 17 2012, 4:27 pm
Newsgroups: mozilla.dev.mdc
From: Sheppy <the.she...@gmail.com>
Date: Wed, 17 Oct 2012 13:27:11 -0700 (PDT)
Local: Wed, Oct 17 2012 4:27 pm
Subject: Re: JavaScript MDN documentation hierarchy change proposal
I personally prefer URLs and breadcrumbs to be strongly bound together and to match. I'm fine with moving content around, however, to adjust the breadcrumb chain; indeed, a massive site reorg is one of MDN's priorities for the coming months.

I agree with everything I see here about the JS documentation; it does need to be straightened up and it sounds like the proposals here are all reasonable ones (given the constraint of not separating breadcrumbs from URLs).

Eric Shepherd
Developer Documentation Lead
Mozilla
http://www.bitstampede.com/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sheppy  
View profile  
 More options Oct 17 2012, 4:27 pm
Newsgroups: mozilla.dev.mdc
From: Sheppy <the.she...@gmail.com>
Date: Wed, 17 Oct 2012 13:27:11 -0700 (PDT)
Local: Wed, Oct 17 2012 4:27 pm
Subject: Re: JavaScript MDN documentation hierarchy change proposal
I personally prefer URLs and breadcrumbs to be strongly bound together and to match. I'm fine with moving content around, however, to adjust the breadcrumb chain; indeed, a massive site reorg is one of MDN's priorities for the coming months.

I agree with everything I see here about the JS documentation; it does need to be straightened up and it sounds like the proposals here are all reasonable ones (given the constraint of not separating breadcrumbs from URLs).

Eric Shepherd
Developer Documentation Lead
Mozilla
http://www.bitstampede.com/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »