3 ms·
Show HN: DOM99 Simple HTML manipulation for the modern web
- herbst 11y agoYour example is not working (for me) on Chrome.
- plugnburn 11y agoWell, because Chrome isn't so ES6-compatible as Firefox yet.
- GroSacASacs 11y agoI will update the readme to show how to transpile DOM99 to ES5
- GroSacASacs 11y agoDone
- plugnburn 11y agoSome questions: - Why ES6/ES2015? - What are the advantages over Knockout? - Why does it weigh so much if its only ability is two-way data binding? And probably the most interesting question: - Why the heck do I need to use Browserify for something that will NEVER EVER run on a server side?! P.S. Nice monologue though. :)
- GroSacASacs 11y ago-Why ES6/ES2015? Because I got used to it before. You can use Babel to transpile to ES5. - What are the advantages over Knockout? I didn't use Knockout since a long time, it was a source of inspiration, so I can't fully answer this question. DOM99 doesn't tell you to use the Model-View-View Model pattern, but lets you organize your application as you want. This can also be a disadvantage if you are doing it wrong for example. - Why does it weigh so much if its only ability is two-way data binding? Because you looked at source files that are not minified. - Why the heck do I need to use Browserify for something that will NEVER EVER run on a server side?! You don't need browserify at all. I wrote the readme a bit too fast and forgot to mention other methods. You can also load it like any normal js file. Hope I helped, I will update the readme in a few minutes to show how to use it without browserify. If you have other questions just ask.
- GroSacASacs 11y agoYou should also consider the amount of work(CPU cycles etc.) required to run the software not just the amount of KB to download it. This however a metric that is more difficult to compare and measure.
- GroSacASacs 11y agoHere's what is coming in the next few days: - More examples that you can look at - Templates with data population mechanism - Better Readme file (how to use babel etc.) - Other system improvements
- plugnburn 11y agoUnderstood everything about it, except this: Could you please calculate what does it weigh minified in ready-to use ES5 state? I'd like to compare it to some other ready libraries and my own solution.
- GroSacASacs 11y agoI will make some system improvement before I calculate those kind of things, but I guess it will be less than 2 KB.
- GroSacASacs 11y agonew demo page for DOM99 http://rawgit.com/GrosSacASac/DOM99/master/index.html http://rawgit.com/GrosSacASac/DOM99/master/index.html (Works with Firefox) Proper template engine API and more system improvement coming next.