
Show HN: Zam – A new JavaScript Library that's a faster alternative - zamjs-router
https://github.com/roecrew/zam/
======
amatera
Why 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
"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
Thanks 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
Wouldn't it make sense to say what it's a faster alternative _to_?

~~~
zamjs-router
It's a faster alternative to React, jQuery, and Zepto. I'm going to test
against Vue today.

~~~
amatera
Can you elaborate how this is an alternative to React? I see this could be a
lightweight alternative to jQuery, but React?

~~~
zamjs-router
"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
Well, 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.

