Tuesday, February 7, 2023
Learning Code
  • Home
  • JavaScript
  • Java
  • Python
  • Swift
  • C++
  • C#
No Result
View All Result
  • Home
  • JavaScript
  • Java
  • Python
  • Swift
  • C++
  • C#
No Result
View All Result
Learning Code
No Result
View All Result
Home JavaScript

Is localStorage or Indexeddb a better option for client-side JavaScript app in today’s age? – JavaScript – SitePoint Forums

learningcode_x1mckf by learningcode_x1mckf
September 7, 2022
in JavaScript
0
Time limit for notify – JavaScript – SitePoint Forums
74
SHARES
1.2k
VIEWS
Share on FacebookShare on Twitter


You might also like

An Introduction to Lodash and Its Benefits for JavaScript Developers – MUO – MakeUseOf

Mimic Javascript actions on identical element? – JavaScript – SitePoint

How To Hire a Professional JavaScript Developer and Find the Best … – Intelligent Living

I’m seeking to write a easy productiveness app for each day programming/freelancing duties. It’ll be totally static html/bootstrap/js browser operating app with none backend. The thought is to open supply it later and host it on github pages.

For storing the precise knowledge (duties, milestones, hours labored, and many others.), I’m a bit confused between obtainable choices like localStorage and indexeddb. I’d have ideally most popular an SQL database and there appears to be one known as “WebSQL” however I’ve heard that it’s depreciated by requirements our bodies and never really useful for many initiatives.

Then again, we now have key-value databases like localStorage and indexeddb which I can construction my app logic round. Nevertheless, I’m involved concerning the area limits right here. My analysis to this point means that Indexeddb appears to have extra versatile limits however a bit cumbersome to make use of in comparison with localStorage which is simpler to make use of however you’ll attain the storage limits faster! However the knowledge on area limitations appear fairly imprecise and nebulous.

My query right here is:

  1. Which is the best database to make use of on this scenario?
  2. What are the real looking area limitations for each these storage strategies?

One thing you haven’t talked about and maybe not considered is for those who want the info in simply the one system that the browser is executing in or for those who want the info to be obtainable in a number of techniques, at the very least in a desktop and a telephone or one thing like that.

There may be a lot data obtainable from a search and I have no idea how a lot of it is very important you. Simply perceive that native storage may not be the identical as localStorage, that prompted me a bit confusion.

One can find articles and posts explaining that localStorage and indexeddb usually are not each merely key-value databases. I believe localStorage offers easy key-value databases however it is best to learn the fabric your self. The extra sophisticated one is extra highly effective. Use the straightforward one if it satisfies your necessities in any other case use the extra highly effective one. If you happen to need assistance selecting which one then the provide help to get can be nearly as good as the necessities you present.

1 Like

SamuelCalifornia:

One thing you haven’t talked about and maybe not considered is for those who want the info in simply the one system that the browser is executing in or for those who want the info to be obtainable in a number of techniques

That’s certainly one thing on the again of my thoughts. I’d ideally wish to handle the duties on my laptop computer browser but additionally be capable of view them on my Android browser too – in all probability a sync answer whereby the localStorage/indexeddb might be synced with a backend cloud API (Google Drive/Dropbox/and many others) ought to do the trick. However that may come on the later stage, not now.

In reality, I’m nonetheless twin minded about whether or not to do it as single-page JavaScript or simply drop this entire concept and do a basic self-contained PHP/MySQL net app which gained’t want any sync. Are you able to recommend any concepts?

prahladyeri:

my laptop computer browser but additionally be capable of view them on my Android browser too

If they’re (almost) all the time related to the web then there is no such thing as a synchronization needed; or at the very least not by you. They each can use the identical cloud database as if the database is native.

prahladyeri:

single-page JavaScript or simply drop this entire concept and do a basic self-contained PHP/MySQL net app

I don’t do JavaScript or PHP. So another person round right here may help with that. For a SPA I might use Blazor Webassembly (utilizing C#) however I assume you do not need to.

1 Like

If you happen to’re connecting knowledge between a number of units, you continue to must sync or simply plain use an exterior knowledge supply of some variety. Javascript can do it, although it tends to be much less safe if its something apart from purely private use, due to the entire… password to the exterior storage mechanism being saved on the native machine factor.

Accessing localStorage is a synchronous operation; probably slowing issues down for those who do a whole lot of learn/writes. And also you already know concerning the dimension limitation.

A self-contained PHP setup might be overkill for inner to an app; take into account there that both the PHP agent have to be operating inside an internet server, or you would need to have your app invoke the CLI, however then the concept of classes goes out the window, so that you’d need to ship a good bit of information into the CLI to get it to pretend one.

I can’t say i’ve ever used indexeddb, so I can’t remark there.

2 Likes

I might by no means suggest constructing a shopper software solely if you wish to share knowledge on a number of units.

Once you use a number of purchasers there ought to all the time be a server who’s synchronizing them.
After all you may solely use a cloud database however as already talked about this isn’t very safe.
Additionally, how would you want to put in the native app? Will you deploy a zipper bundle which have to be unpacked in an area folder and then you definately name the index.html? That doesn’t look very consumer pleasant to me.
What about for those who change one thing? How will you make certain that not an outdated model is operating on one machine whereas a more moderen is operating on one other machine. In worse case you might have modified the database schema for the brand new model. The outdated model will crash then.

After all this could be solely a small software for you however you wish to make it public on Github. So your intend is, that others will use it too.

For me you shouldn’t attempt to make an internet app a “not net app” by eradicating the net server, which is the principle a part of an internet app. Even as a result of getting a costless Webserver anyplace just isn’t a giant deal.



Source link

Share30Tweet19
learningcode_x1mckf

learningcode_x1mckf

Recommended For You

An Introduction to Lodash and Its Benefits for JavaScript Developers – MUO – MakeUseOf

by learningcode_x1mckf
February 6, 2023
0
Google expands open source bounties, will soon support Javascript fuzzing too – ZDNet

An Introduction to Lodash and Its Benefits for JavaScript Developers  MUO - MakeUseOf Source link

Read more

Mimic Javascript actions on identical element? – JavaScript – SitePoint

by learningcode_x1mckf
February 6, 2023
0
Google expands open source bounties, will soon support Javascript fuzzing too – ZDNet

Mimic Javascript actions on identical element? - JavaScript  SitePoint Source link

Read more

How To Hire a Professional JavaScript Developer and Find the Best … – Intelligent Living

by learningcode_x1mckf
February 6, 2023
0
Google expands open source bounties, will soon support Javascript fuzzing too – ZDNet

How To Hire a Professional JavaScript Developer and Find the Best ...  Clever Residing Source link

Read more

How to Use Regular Expressions in JavaScript – MUO – MakeUseOf

by learningcode_x1mckf
February 6, 2023
0
Google expands open source bounties, will soon support Javascript fuzzing too – ZDNet

How to Use Regular Expressions in JavaScript  MUO - MakeUseOf Source link

Read more

Web Development & JavaScript Trends in 2023 – Electronicsmedia

by learningcode_x1mckf
February 6, 2023
0
Google expands open source bounties, will soon support Javascript fuzzing too – ZDNet

Web Development & JavaScript Trends in 2023  Electronicsmedia Source link

Read more
Next Post
Natural Language Processing and How ML Models Understand Text – The Real Python Podcast

Natural Language Processing and How ML Models Understand Text – The Real Python Podcast

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Related News

TechEd in India and why Indian IT Market needs more Java developers – India Education | Latest Education News | Global Educational News

TechEd in India and why Indian IT Market needs more Java developers – India Education | Latest Education News | Global Educational News

October 2, 2022
JavaScript Slows Progress, Should be Retired, Argues JSON Creator

C++ Zooms Past Java in Programming Language Popularity Contest

December 12, 2022
JavaScript Token (JS) has a Bullish Sentiment Score, is Rising, and Outperforming the Crypto Market Saturday: What’s Next?

JavaScript Token (JS) has a Bullish Sentiment Score, is Rising, and Outperforming the Crypto Market Saturday: What’s Next?

December 4, 2022

Browse by Category

  • C#
  • C++
  • Java
  • JavaScript
  • Python
  • Swift

RECENT POSTS

  • C++ Is TIOBE's Language Of The Year – iProgrammer
  • JobRunr, the Java Scheduler Library, Released Version 6.0 – InfoQ.com
  • An Introduction to Lodash and Its Benefits for JavaScript Developers – MUO – MakeUseOf

CATEGORIES

  • C#
  • C++
  • Java
  • JavaScript
  • Python
  • Swift

© 2022 Copyright Learning Code

No Result
View All Result
  • Home
  • JavaScript
  • Java
  • Python
  • Swift
  • C++
  • C#

© 2022 Copyright Learning Code

Are you sure want to unlock this post?
Unlock left : 0
Are you sure want to cancel subscription?