Yet, it is possible.
I’ve recently run into a question: “How would I load more classes in one file?” Of course, my first thought was “Why would you want to? Ext/Touch is not built this way. One class per file is the ideal setup where everything is clean, predictable and understandable.”
But, you know, curious me… First I started to think about technical aspects, “How would I do it if I would want it despite all common sense.” And then, “What could it be useful for?”
Well, the usefulness is really questionable. I might want to load several classes at runtime that I do not want to load initially? Or, I want to check something very fast and I don’t want to generate the whole application? Or, I want to test something and I do not want to pollute the application folder with a number of files that I need to delete afterwards?
So or so, I would definitely not use it as a coding approach. If I ever used it, it would really be only marginally or for testing.
What do you think?
Now technically. How to do it?
I wanted to code model, store and grid all as separate classes with
Ext.define() in one file but that file must be accepted when passed to
Ext.require() or listed in