Hacker Newsnew | past | comments | ask | show | jobs | submit | amatera's commentslogin

And then you thought that millions of websites, a lot of commercialy crafted for customers, adopted it in no time? So an update, to the most used version which has even security isseus is not nessacary? You live in a nice world :)


You can supply your own http headers. So i guess you can send cookies and that things with it.


Looks more like a PHP JSON File writer and reader (with some extra stuff like nested properties) then a NoSQL Database.


Hi, its indeed.

But somewhere i need to store the data, this could a flat-file or could be a series of BSON files on disk.

For the purpose of this database and technology being used, JSON file seems to work just fine. I hope you get the point.


And why alternatives like Telegramm are not an easy to use option?


That might be an option, but not as ubiquitous and easy to use. We’re dealing with people who barely read and speak a single language, much less English.


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.


"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


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).


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


"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.


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.


Some weeks ago an experience developer said to me: "Parameterize a query? Since years i don't care about it, because ORMs like Doctrine or Sequelize take care of that"... So it's not only students or new devs who should watch out, because even ORMs can open up SQL injections.


Rails is well know for this. Here is a nice page listing common ones: https://rails-sqli.org/


Yeah, before using any ORM I always first check how it inserts the parameter values. If it's a string replacement, you need to be very careful.


There is nothing special about this code. I guess it should still work (but please don't use it ;-) )


Classes are just syntactic sugar. They use prototype under the hood. So maybe it's good to know what happen there.


Isn't putting target="_blank" in your markup not the better way instead of using a JS libary for that?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: