I didn't see an existing 'general' javascript page so I started one in the Developer->Conventions area.

https://wiki.openmrs.org/display/docs/Javascript+Conventions

-Steve

On 04/16/2012 12:56 PM, Darius Jazayeri wrote:
Steve,

We don't have such a convention. I strongly approve of this one. Can you add this to a relevant wiki page, or start a Javascript Conventions page?

-Darius

On Mon, Apr 16, 2012 at 9:34 AM, Mark Goodrich <[email protected] <mailto:[email protected]>> wrote:

    Steve--

    We don't really have any javascript conventions, as far as I know.

    The convention of using an "openmrs" namespace (and using
    "openmrs.your_module" for module namespaces) seems good to me.

    Mark

    -----Original Message-----
    From: [email protected] <mailto:[email protected]>
    [mailto:[email protected] <mailto:[email protected]>] On Behalf Of
    Steven Githens
    Sent: Monday, April 16, 2012 5:51 AM
    To: [email protected]
    <mailto:[email protected]>
    Subject: [OPENMRS-DEV] Javascript Namespacing

    Hello OpenMRS Dev,

    Do we have a convention for namespacing any new javascript being
    written in OpenMRS? Most of the functions I've seen so far are in
    the global namespace.

    While working on a portlet for my reporting ticket last week I
    started using openmrs.reporting [1] for the time being.

    Cheers,
    Steve


    [1] Just using the idiom:
    var openmrs = openmrs || {};
    openmrs.reporting = openmrs.reporting || {};

    _________________________________________

    To unsubscribe from OpenMRS Developers' mailing list, send an
    e-mail to [email protected]
    <mailto:[email protected]> with "SIGNOFF
    openmrs-devel-l" in the  body (not the subject) of your e-mail.

    [mailto:[email protected]
    <mailto:[email protected]>?body=SIGNOFF%20openmrs-devel-l]

    _________________________________________

    To unsubscribe from OpenMRS Developers' mailing list, send an
    e-mail to [email protected]
    <mailto:[email protected]> with "SIGNOFF
    openmrs-devel-l" in the  body (not the subject) of your e-mail.

    [mailto:[email protected]
    <mailto:[email protected]>?body=SIGNOFF%20openmrs-devel-l]


------------------------------------------------------------------------
Click here to unsubscribe <mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l> from OpenMRS Developers' mailing list


_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-devel-l" in the  body (not 
the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

Reply via email to