Google Web App vs Userform using Google Sheets - What's the Difference?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
alright so in this video I want to quickly cover how much difference there is between a web app and a user form so I very often get these questions like how do I do this and I will refer the person to a video I did and they will be like well that's a user form I wanted a web app so how much difference is there between having a user form and having a web app so if you look at this application and here I have the spreadsheets where I have well one of them is the data and the second one is another spreadsheet that has the user form so right now I can basically if you look at this combination fruits apples red see the last line here is 31 so let's go and add something to this so I'm gonna go ahead and add like 12 more I'm gonna click add to database and right now if we go back and check this out we should have that in our database so basically we can run this to add some records to that database it reads the quantity on hand whatever it does oldest things right it's a user form so if I open the script for this in the script we have this code AS which has nothing in it I have this you form HTML which is HTML with all the JavaScript I'm not gonna touch any of this I have this funks GS which is all the backend functions to add rows read some arrays and things like that and finally I have this load user form j/s that has these three functions one of them basically creates a menu and that menu is created when we open the spreadsheet and then finally when that menu opens up right here see when we run this it basically loads this sidebar which is where we run this function load form to load the sidebar so these three functions is what makes this user form basically we'll load it internally inside of our spreadsheet so what I'm gonna do I'm gonna convert this to a web app for that I'm just gonna comment all of these three functions and go back in here and create a function for our web app app should have a function do get and this should return an HTML service so very similar to how I have this that gets the HTML evaluates it I'm just going to pretty much copy those two lines and we have this that basically just creates an HTML service from this you form HTML file we have this that evaluates that to create HTML and finally we need to just return that HTML so for a web app we don't need to really save this now in a variable we can simply just return it so with this changes of me just removing all of these and replacing them with this do get function I'm gonna save this and publish this as a web app so deploy as web app and here we'll give this some description and execute the app as me that's good and who has access I'm gonna do public so I'm going to go ahead and deploy us so that gives us this link so if I go ahead and open that link see that loaded that same thing it's gonna look a little weird because now we have like buncha space compared to what we had before but here it's basically the same thing loaded in this URL for our web app so what I can do again this should be all tied up to this as an example let's go to this inventory and check one of these veggies onions one type should be 179 in stock so I'm gonna go to this veggies onions one type so it loads the same way it's connected to the same spreadsheet I can go here and add some new quantity 21 of those just to refresh your memory the last line in this results is this fruits apples red and line 32 so I'm gonna go back to this and basically just again select some date these are not required so I'm just gonna skip those but again all of these works the same way it would have worked in a web app and if you're interested how to build this user foreign level - you can watch that but I'm just gonna click on add to database successfully added it updated the quantity 200 if I go back to this there it is so just like that I have a web app from the user forum see how much changes that was very little to no existent I should be able to also uncomment this and save it and now I should have access to my web app which I should probably redeploy now because I made some changes even though it doesn't matter but just to show you this so updated if I go back and reload this see it still works the same way updates the quantity on hand for this 242 apparently if I go here 242 and now I should also be able to if I reload the spreadsheet open that as a sidebar too so now I have both the same code works as a user forum like this on the side and as a web app completely separate so the main thing the concern here is not how much difference there is because web app and user forum are pretty much practically the same thing in many regards what you should be concerned about however is that when you make something a web app and publish it the way I just did as a public setting so if I go under script editor see under publish when I do deploy I chose to do public now you could do only myself then it would not be a concern at all so you would be fine but once you make it public this is accessible pretty much to anybody who has the link for this URL and you have to think through what are some possible things that somebody gets access to this what they could probably enter in one of these fields to kind of mess up your back-end or get some information from your back-end that they should not be getting so these are the type of things you should be concerned about but application wise they work the same way and that should do it for this video thanks for watching please subscribe and I'll see the next one
Info
Channel: Get __it Done!
Views: 10,144
Rating: undefined out of 5
Keywords: Web App, Userform, Google, Google Sheets
Id: bwy1TS6If38
Channel Id: undefined
Length: 7min 6sec (426 seconds)
Published: Tue Jun 02 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.