Comments (4)
Thanks @Mr-Chehata - we did start with modules - as per the sections of the docs. This was based on the ES5 Module pattern as it was pre-ES6-adoption. It was found that as a Framework, the modules are less important to the coder - we almost always use all the modules. The code size issue was solved mostly by ZIM Distill (tree-shaking). The only minor issue there is caching... modules could be cached but Distilled code can be cached per user per app but not across apps.
ES6 modules are not going to work well with our users which range from professionals to kids. We do not want to force a namespace on people and there is no way that we want to slow down developers or kids by making them choose which classes and functions they want to import.
Modules could still come in handy for maintenance - and perhaps for collaboration. But ZIM is almost complete and as a sole creator, was fine for maintaining and building with a few bookmarks, etc.
So on the face of it - yes, modules are scaleable and good code structure... but there is a fair bit going on here. A namespace can be applied if desired by using zns=true before importing ZIM. Our methods are actually zim functions that can work as functions or methods to handle operating on raw CreateJS objects. There is the ZIM DUO technique of passing in parameters or a single configuration object with properties that match the parameter names. There is how distill works to record functions that are used. There is STYLE applied across DisplayObjects and Controls. There is a TypeScript parser that creates over 4000 lines of typing. There is a Docs parser that creates docs from the code. Many of these are easier with one file.
Of course, we are open to discussion, and help yourself to trying to put ZIM in modules, we would lend guidance if you were to try. It is something that we have though much about over the last few years - and fairly firmly decided that that we do not want "upgrade" - same with converting all the code to ES6. There is really no reason that we can see to do this. We have been moving forward with ES6 in examples - for instance, all the CodePen examples. And the ZIM Skool has been updated.
Cheers!
from zimjs.
Thank you @danzen for your explanatory Reply ...
I think this convincing for me , you already try it and seems that isn't a better techno-architecture for the Zim philosophy/culture ...
Thanks
from zimjs.
Thank you for caring @Mr-Chehata - we do not mean to put you off hanging around or using ZIM - and we will continue to assess the situation!
from zimjs.
Just a note, we have provided ES6 Modules at https://zimjs.com/es6.html#MODULES which wrap the ES5 code with exports. These are for the main ZIM but also for combinations of the libraries
from zimjs.
Related Issues (20)
- centerReg() does not working on ZimJS version 10 HOT 2
- Label.labelWidth change issue. HOT 1
- Zim.Frame("tagID") does not work well. HOT 3
- In IE11, the Frame can't load all images succeeded in the first time. HOT 4
- [Question] Can a movable element be present on more than 1 square? HOT 1
- hi, is it possible run on an environment which has no dom bom environment HOT 25
- h and v scroll conflicts list & window. HOT 7
- 2 bugs found. HOT 2
- bug report: SVGContainer("xxx.svg") parse error, but bitmap ("xxx.svg") works. HOT 3
- using zimjs in angular project HOT 4
- Drag make animation weird in ZIMSHIM (adobe animate) HOT 2
- please update typing definition for typescript user HOT 1
- Where is library repository? HOT 1
- Render to Three JS Canvas Texture HOT 4
- Invalid redirect HOT 1
- access to plasma zapp not working HOT 1
- ZIM NPM, Vue, Svelte, React and Angular HOT 2
- ball movement with connected physics HOT 1
- I had the unfortunate displeasure of trying to use a Texture Active. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zimjs.