4 ms·
Nice work! But it always starts small, then users need a feature here, a feature there next thing you know you have a fat ass library just like the pre-existing
by Link- 13y ago
Nice work! But it always starts small, then users need a feature here, a feature there next thing you know you have a fat ass library just like the pre-existing ones.
- tjansen 13y agoActually my goal is that the library will always stay under 4kB. Setting yourself a limit is the only way to prevent feature creep, and 4kB seems quite ok. Over time, when support for older browsers can be dropped, there will be space for additional features. I am already working on a second <4kB module though, with support for collections, strings, templates, dates and number/date formatting and parsing. So yes, I know that 4kB is not realistic goal for a complete app framework. But I am confident that I can do it in 12-16 kB.
- Link- 13y agoThe problem with optimization is that you always have to compromise, either speed, features and performance for size or features and size for speed etc.. I think a probable solution would be to create a dynamically generated framework which allows the user to specify the needed features (jQuery-ui style).
- tjansen 13y agoActually there's a builder that allows you to pick the functions you need and compiles custom versions: http://minifiedjs.com/builder/ http://minifiedjs.com/builder/ I don't think that this is a practical approach for most people though. After a while it becomes quite annoying to create a new version everytime you need a function. It would be great, but unfortunately also quite difficult, to automate this.