Hello, I pretty much know the answer but still I have a little bit of doubt and I want to clear it totally.
At this point I am still learning Vanilla JS and thought of making a simple project like To-Do list which will save data in database… I still have not learnt the others like node and angular.
Edit: So is their really any way/option to connect any database (SQL, SQLite, MongoDB etc.) with Vanilla JS besides learning node and angular.
P.S. I am assuming that we can build database type projects with node and angular.
If this is a learning exercise then maybe there would be more value in doing an exercise in something that vanilla js would actually be used for.
That’s pretty clear and to the point.
If you are needing database access then maybe you should be learning server-side scripting too and learn how to connect to databases the right way, as it’s done in the real world.
Thank you Sam and WebMachine.
All Doubts cleared. Topic closed
Actually @littlebirdy, I think that the topic is still open if others would like to contribute to the discussion. You never know what interesting insights might be provided by others, and this is a topic that might be of interest to users other than you.
Note that Angular and node are very different in that the former is a client side framework, while node is a server side runtime environment. Now you can’t connect to a database (which is running on the server) with client side JS directly, not even with Angular or the like. All you can do is send HTTP requests, so you’ll need some sort of CRUD interface on the server (some databases such as CouchDB will come with their own HTTP interface, but it’s still just an interface).
If you want to connect to a database directly, you’ll have to operate on the server, and here the only notable option is node. You might still consider this vanilla JS though, I suppose (as long as you don’t pull additional packages, of course). It’s not a framework, it’s a runtime environment providing some additional API to interact with the file system etc. – just as the browser provides some additional API to interact with the DOM.
I guess my terminology was a bit misleading (I have not used Angular or Node myself), and thank you for providing more specific information. But one can fall into the trap when learning a language of wanting to do everything using the basic language itself - I have done that myself. You will get to a point, as others have advised on this forum, when it is really better to use the resources that are already out there to achieve your goal.
A few years ago I wrote a Firefox extension that worked with SQLite.
The SQLite database being a local database (i.e. client-side) not a web hosted database.
Yes Web Machine… I agree with you… Thanks for educating me on that.
And wow … inputs from M3, Mitti and FelGal is so good.
Thank you to all of you… My doubts and paths are cleared
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.