Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Pseudo-God
Mar 13, 2006

I just love oranges!
https://www.scrumy.com is really cool, and has all the features a scrum beginner might want. My company paid a ton for some 500 ton giant, when this website could have done the same job for only $5 a month for the pro version.

Adbot
ADBOT LOVES YOU

Pseudo-God
Mar 13, 2006

I just love oranges!
In PHP, if I want to connect to a DB, I usually set the DB connection details in some config file, or even the page source itself, and this information is never revealed to the end-user. However, I cannot figure out how to hide these details in a JS only app, where everything is exposed to the browser. Is it possible to store confidential details, such as DB passwords, in a JS file or similar, but prevent them from being read by the user?

Pseudo-God
Mar 13, 2006

I just love oranges!
I was wondering if it was possible to replace the database with AJAX calls to a third party, but I can't see a way to store the credentials without exposing them to the end-user.

Pseudo-God
Mar 13, 2006

I just love oranges!

G-Prime posted:

Why not set up a server-side script that accepts predefined actions from POST actions, and leave the DB abstraction to that? You could make calls to that through AJAX and never expose the DB.
I want to do it without a server-side script at all, but I guess the tech is not here yet.

Pseudo-God
Mar 13, 2006

I just love oranges!

Thermopyle posted:

1. You need to build a server-side layer between your DB and your client-side apps that communicates in JSON or whatever.
2. It's not possible to hide the auth info to a DB or the layer mentioned in the last point from the end-user. You can require logged-in users and that's about it.
Like I said earlier, apparently it's not possible to do this entirely in front-end JS. However, it may be possible to have a tiny PHP/ASP/node/ruby etc script, which can hold authentication data, and act as a relay to the external DB.

Pseudo-God
Mar 13, 2006

I just love oranges!
I got this idea a couple of days ago when I was checking out neocities.org. I was wondering if it could be possible for them to actually have a database hosted by a third party, but without the public having direct access to the data. It's not possible according to you guys, but a tiny server-side script could be used, in whichever language, to store these credentials and contact the third-party database.
I also never said that SQL would be used, but an abstracted one, where you write to a URL, and get a URL back to access this data.

Pseudo-God
Mar 13, 2006

I just love oranges!

Stoph posted:

Parse (https://parse.com/) and Firebase (https://www.firebase.com/) are hosted backends for a "static files application". Perhaps you should give them a look.
I should have guessed that these things already existed. Thanks to everyone for the guidance.

Pseudo-God
Mar 13, 2006

I just love oranges!
A backend-less future could be simulated by having a minimal backend, which is only used for authentication and security. In principle, there will always be data which should not be exposed to the user. For everything else, a JS only app is perfectly suitable.

Adbot
ADBOT LOVES YOU

Pseudo-God
Mar 13, 2006

I just love oranges!

an skeleton posted:

AngularJS question ahead:
I'm trying to turn off a save button based on one of the inputs inside of an ngGrid (populated dynamically based on data) being invalid. It may not be possible, but does anyone have any bright ideas?
I did this at work a couple of days ago, but by using jQuery. You check the input each time, and if it fulfills certain conditions, you bind a click handler to your button like so:
code:
$("#mybutton").click(function(){
    $(this).preventDefault();
});
Once the conditions of the button press change, you will have to unbind and rebind another click handler on it. The reason why this has to be done is that in Javascript, when you bind a click handler to a DOM object, the bound state will persist even though the original conditions that caused the bind may no longer be valid.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply