I am making a simple web app mostly in JavaScript. I was wondering as to how do I deploy settings/preferences? Do I just store user preferences somewhere and make use of if...else... statements all over the code?
I think that there must be a better alternative. I am know JS, jQuery & PHP and willing to learn anything new if at all required.
I have already made the app, only the settings are remaining. I know what options to give users and how to program them in js.
What's the most optimal way? How is it done in professional web apps and software made by companies (I am independent Student Developer - this is my first "BIG" project)?
EDIT:
For all the modifications that the settings are supposed to make (in this particular app), the whole js code base would litterally be filled with many branches of if...else...statements and I think that would make the code a lot harder to read and maintain.
In my app, the whole database table to be fetched from the database and the number and types of HTML DOM manipulation to be done, new elements to be added to HTML dom and whether some are visible or not would change. How do I deal with all that?