- 
                Notifications
    You must be signed in to change notification settings 
- Fork 195
Closed
Description
Dear Neveldo,
If I may, I would like to suggest some internal change about the plugin architecture.
Right now, the plugins architecture, from top to bottom, is:
- (some processing for lazy loading and such)
- Creation of a function named Mapael:
- accepts an Options parameters, and parse it
- performs a huge processing on each elements targeted
 
- Listing of Mapael internal function Mapael.xxx()used all along
- Listing of default values Mapael.defaultOptionsand so on
- Assign $.fn.mapaeltoMapaelfor jQuery
The biggest problem here is the Mapael function, and the huge foreach processing inside of it.
I would like to suggest to implements a slightly different architecture pattern: https://github.com/jquery-boilerplate/jquery-patterns/blob/master/patterns/jquery.basic.plugin-boilerplate.js
The difference will not be so big actually. The main thing is that there will be an Init() function, and that we check against an already existing Mapael on the container.
What do you think?
Metadata
Metadata
Assignees
Labels
No labels