4 ms·
Show HN: Zam – A new JavaScript Library that's a faster alternative
- amatera 9y agoWhy you use XMLHttpRequest instead of Fetch API (which makes ajax utilities more or less useless)? It would also be nice to have a custom ajax error handling. Console logging is nice to have, but sometimes you maybe want to throw in custom error handling.
- zamjs-router 9y ago"Why you use XMLHttpRequest instead of Fetch API" I've been going back and forth on this one. The faster one is dependent upon the browser. https://github.com/arendjr/fetch-vs-xhr-perf https://github.com/arendjr/fetch-vs-xhr-perf
- amatera 9y agoThanks for the explantation. I wasn't aware of this (but i guess this will change when the fetch API is more widely used and vendors are implementing faster methods).
- davelnewton 9y agoWouldn't it make sense to say what it's a faster alternative to?
- zamjs-router 9y agoIt's a faster alternative to React, jQuery, and Zepto. I'm going to test against Vue today.
- amatera 9y agoCan you elaborate how this is an alternative to React? I see this could be a lightweight alternative to jQuery, but React?
- zamjs-router 9y ago"React allows developers to create large web-applications that use data and can change over time without reloading the page. It aims primarily to provide speed, simplicity, and scalability" You can do the 'almost' same thing with with Zam, but without the slow Virtual DOM. I say 'almost', because you really need to be good at vanillajs if you expect to create a massive and scalable web application that's written in Zam.
- fiatjaf 9y agoWell, in the programming world you can do 'almost' anything with anything, basically. So -- if you really good at it -- anything is an alternative to anything else.