Menu

#61 Javascript Library Handling

legacyRender
closed-fixed
5
2010-01-24
2008-10-18
No

Add Javascript Library Handling system and rules.

Because...
1) Recently, new modules tend to use javascript library like jQuery or prototype.js.

2) Now, each module put these libraries where they want because there is no rule about library location and naming rule.

3) Some javascript libraries can't use them together because some functions' name are the same. For example, both jQuery and prototype.js have $() function.

4) When the same library read twice, it may occur javascript error. For example, a module and the other module's block and theme load jQuery library separately...

So, if we leave uncontrolled this problem, it will slide into chaos and grow to untouchable issue.

Against this issue, the solution may be some steps.

a) Decide the location and naming rule about javascript library. For example, /common/js/jQuery/
This prevents the problem 2)

b) Decide jQuery or prototype.js or other as the XCL's javascript library. If a module or a theme uses other library, HE must pay attention to collision to the XCL's javascript library.
This prevents the problem 3)

c) Add function to load javascript library.
This prevents the problem 4)

Discussion

  • HIKAWA Kilica

    HIKAWA Kilica - 2009-10-25
    • assigned_to: nobody --> kilica
    • status: open --> open-fixed
     
  • HIKAWA Kilica

    HIKAWA Kilica - 2010-01-24
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.