You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Alexandru Objelean (JIRA)" <ji...@apache.org> on 2007/08/28 09:27:33 UTC

[jira] Created: (WICKET-898) JS namespace pollution in wicket-extensions

JS namespace pollution in wicket-extensions 
--------------------------------------------

                 Key: WICKET-898
                 URL: https://issues.apache.org/jira/browse/WICKET-898
             Project: Wicket
          Issue Type: Improvement
          Components: wicket-extensions
    Affects Versions: 1.3.0-final
            Reporter: Alexandru Objelean
             Fix For: 1.3.0-final


1. Any widget (javascript file) from wicket-extension should not pollute the window namespace (do not create simple function with fancy long names). For instance, palette.js contains paletteResolve, paletteChoicesOnFocus, paletteAdd, etc.. which is not recommended for best practices. I suggest to use closures for this and use namespace for each widget. 
    As a result, you will have something like this: Wicket.Extensions.Palette.paletteAdd() etc.. for public js methods, while private methods would not be visible due to closure scope. (Module Pattern: http://yuiblog.com/blog/2007/06/12/module-pattern/)

2. Have some sort of convention for namespacing widgets. For instance, 
* modal.js use:  Wicket.Iframe
* progressbar.js use: wupb
* palette.js do not use at all namespace...

I propose to use it the same way for all widgets. And the most suitable namespace would be: Wicket.Extension.....

Thank you!


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-898) JS namespace pollution in wicket-extensions

Posted by "Alexandru Objelean (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexandru Objelean updated WICKET-898:
--------------------------------------

    Description: 
1. Any widget (javascript file) from wicket-extension should not pollute the window namespace (do not create simple function with fancy long names). For instance, palette.js contains paletteResolve, paletteChoicesOnFocus, paletteAdd, etc.. which is not recommended for best practices. I suggest to use closures for this and use namespace for each widget. 
    As a result, you will have something like this: Wicket.Extensions.Palette.paletteAdd() etc.. for public js methods, while private methods would not be visible due to closure scope. (Module Pattern: http://yuiblog.com/blog/2007/06/12/module-pattern/)

2. Have some sort of convention for namespacing widgets. For instance, 
* modal.js use:  Wicket.Iframe
* progressbar.js use: wupb
* palette.js do not use at all namespace...

I propose to use it the same way for all widgets. And the most suitable namespace would be: Wicket.Extensions....

Thank you!


  was:
1. Any widget (javascript file) from wicket-extension should not pollute the window namespace (do not create simple function with fancy long names). For instance, palette.js contains paletteResolve, paletteChoicesOnFocus, paletteAdd, etc.. which is not recommended for best practices. I suggest to use closures for this and use namespace for each widget. 
    As a result, you will have something like this: Wicket.Extensions.Palette.paletteAdd() etc.. for public js methods, while private methods would not be visible due to closure scope. (Module Pattern: http://yuiblog.com/blog/2007/06/12/module-pattern/)

2. Have some sort of convention for namespacing widgets. For instance, 
* modal.js use:  Wicket.Iframe
* progressbar.js use: wupb
* palette.js do not use at all namespace...

I propose to use it the same way for all widgets. And the most suitable namespace would be: Wicket.Extension.....

Thank you!



> JS namespace pollution in wicket-extensions 
> --------------------------------------------
>
>                 Key: WICKET-898
>                 URL: https://issues.apache.org/jira/browse/WICKET-898
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-final
>            Reporter: Alexandru Objelean
>             Fix For: 1.3.0-final
>
>
> 1. Any widget (javascript file) from wicket-extension should not pollute the window namespace (do not create simple function with fancy long names). For instance, palette.js contains paletteResolve, paletteChoicesOnFocus, paletteAdd, etc.. which is not recommended for best practices. I suggest to use closures for this and use namespace for each widget. 
>     As a result, you will have something like this: Wicket.Extensions.Palette.paletteAdd() etc.. for public js methods, while private methods would not be visible due to closure scope. (Module Pattern: http://yuiblog.com/blog/2007/06/12/module-pattern/)
> 2. Have some sort of convention for namespacing widgets. For instance, 
> * modal.js use:  Wicket.Iframe
> * progressbar.js use: wupb
> * palette.js do not use at all namespace...
> I propose to use it the same way for all widgets. And the most suitable namespace would be: Wicket.Extensions....
> Thank you!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WICKET-898) JS namespace pollution in wicket-extensions

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg reassigned WICKET-898:
------------------------------------

    Assignee: Igor Vaynberg

> JS namespace pollution in wicket-extensions 
> --------------------------------------------
>
>                 Key: WICKET-898
>                 URL: https://issues.apache.org/jira/browse/WICKET-898
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-beta3
>            Reporter: Alexandru Objelean
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> 1. Any widget (javascript file) from wicket-extension should not pollute the window namespace (do not create simple function with fancy long names). For instance, palette.js contains paletteResolve, paletteChoicesOnFocus, paletteAdd, etc.. which is not recommended for best practices. I suggest to use closures for this and use namespace for each widget. 
>     As a result, you will have something like this: Wicket.Extensions.Palette.paletteAdd() etc.. for public js methods, while private methods would not be visible due to closure scope. (Module Pattern: http://yuiblog.com/blog/2007/06/12/module-pattern/)
> 2. Have some sort of convention for namespacing widgets. For instance, 
> * modal.js use:  Wicket.Iframe
> * progressbar.js use: wupb
> * palette.js do not use at all namespace...
> I propose to use it the same way for all widgets. And the most suitable namespace would be: Wicket.Extensions....
> Thank you!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-898) JS namespace pollution in wicket-extensions

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-898.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.0-beta4

fixed up palette and upload progress bar

> JS namespace pollution in wicket-extensions 
> --------------------------------------------
>
>                 Key: WICKET-898
>                 URL: https://issues.apache.org/jira/browse/WICKET-898
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-beta3
>            Reporter: Alexandru Objelean
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.0-beta4
>
>
> 1. Any widget (javascript file) from wicket-extension should not pollute the window namespace (do not create simple function with fancy long names). For instance, palette.js contains paletteResolve, paletteChoicesOnFocus, paletteAdd, etc.. which is not recommended for best practices. I suggest to use closures for this and use namespace for each widget. 
>     As a result, you will have something like this: Wicket.Extensions.Palette.paletteAdd() etc.. for public js methods, while private methods would not be visible due to closure scope. (Module Pattern: http://yuiblog.com/blog/2007/06/12/module-pattern/)
> 2. Have some sort of convention for namespacing widgets. For instance, 
> * modal.js use:  Wicket.Iframe
> * progressbar.js use: wupb
> * palette.js do not use at all namespace...
> I propose to use it the same way for all widgets. And the most suitable namespace would be: Wicket.Extensions....
> Thank you!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-898) JS namespace pollution in wicket-extensions

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen updated WICKET-898:
--------------------------------------

        Fix Version/s:     (was: 1.3.0-final)
             Priority: Minor  (was: Major)
    Affects Version/s:     (was: 1.3.0-final)
                       1.3.0-beta3

Don't set the fix version. We'll do that

> JS namespace pollution in wicket-extensions 
> --------------------------------------------
>
>                 Key: WICKET-898
>                 URL: https://issues.apache.org/jira/browse/WICKET-898
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-beta3
>            Reporter: Alexandru Objelean
>            Priority: Minor
>
> 1. Any widget (javascript file) from wicket-extension should not pollute the window namespace (do not create simple function with fancy long names). For instance, palette.js contains paletteResolve, paletteChoicesOnFocus, paletteAdd, etc.. which is not recommended for best practices. I suggest to use closures for this and use namespace for each widget. 
>     As a result, you will have something like this: Wicket.Extensions.Palette.paletteAdd() etc.. for public js methods, while private methods would not be visible due to closure scope. (Module Pattern: http://yuiblog.com/blog/2007/06/12/module-pattern/)
> 2. Have some sort of convention for namespacing widgets. For instance, 
> * modal.js use:  Wicket.Iframe
> * progressbar.js use: wupb
> * palette.js do not use at all namespace...
> I propose to use it the same way for all widgets. And the most suitable namespace would be: Wicket.Extensions....
> Thank you!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.