dimanche 4 mars 2018

Best practice to use prototype design pattern to initials plugins and simple jQuery code

I'm working on real project like CRM and I have to use javascript plugins like select2, chartjs and etc. Now I want to manage code and decrease duplicate code. Also I write some jQuery code that in my project is need like additional dynamic field. I put js script in main.js and include it in all page.

Also I know about Revealing Prototype Design Pattern and it can help me.

What's best practices to use this design pattern to initial plugins or some jQuery code?

What's best structure to do that?

Aucun commentaire:

Enregistrer un commentaire