System migration - need advice choosing new platform - javascript

I am a spanish speaker I will try my best in English I hope I made myself clear enough.
During many years I have been working on a spreadsheet (google sheets) for a company, to be used as the main database and management system, where you can find customer info, you can see all the purchases made by that client, you can get a list of clients that need to be reached, you can find the prices list for the products, product information, you can use it to input the orders, print every order and track it until delivery and payment, and the order itself also feeds stock, create an order to refill stock,
It is also used to calculate the payment for the salesmen, create statistics and get sales trends, etc. It includes almost everything the client needs, it's pretty cool. Everything created in google sheets. No macros needed so far.
The thing is that now the client needs to make the same system but more friendly to be used for non experienced people (almost none IT knowdledge, I mean, at all!).
I am not sure what platform should I choose to create this system, it will be starting over, but I cannot wait to start working on this new chalenge.
The good thing is that I have now some knowdledge in JS and I am learning also HTML and the tools to develop web pages. Not sure if I can use any of these to work on this project. What do you recommend? Thanks in advance.

This question is fairly vague, but I'll try to recommend something despite that.
Since you said you'll be "starting over", it sounds like you wouldn't necessarily have to use a Google Sheet.
This is a fairly difficult undertaking for someone inexperienced, especially since it's being developed for a client, but I'd recommend:
Use a SQL DB like Postgres to store the data.
Use something like Express to handle requests, and render pages.
Use some basic HTML+CSS+JS to make nice-looking pages.
And just build a web-app.
You could go other routes, (i.e. keep the "DB" in Google Sheets and use the Google Sheets API, and just use HTML+JS+CSS on static pages), so don't take my opinion as the only route

Related

Angular Framework Auction page

I am making a website to showcase artwork. I want to add an auction functionality. I will use Angular framework and wondered if anyone had any experience doing this.
Functionality should be as follows:
Only admin users through an admin page with the specified password can add art for auction
Users can bid on auction
Auction can have a minimum price
Payment can be dealt with over email or on the website (not sure what is easiest)
Automated email response when bid has been placed
Every bid stored so if winner doesn't purchase next closes can try
Greatly appreciated,
I understand this may be a huge task - or may not be!
Yep, that's an entire project that people build entire businesses (and thus teams of developers) around.
Can it be done in a simpler fashion? Yes.
Can it be done well in a simple fashion? No.
I'll start throwing a range of things at you so that you can see how much is really involved in handling all of that. Just a glimpse.
You need hosting, there's always a fun start. Self hosting? Cloud hosting? AWS, Azure, other?
You need storage - some kind of database (though definition of such is fairly loose these days). For both user data and art/auction data.
You need to pick a back-end tech; Angular can't (or shouldn't) be the whole app. You should have something doing all of this coordinating, processing, saving, updating, deleting, etc. etc.
That's just the overview of the parts of the system as a whole, the two second version of your various points:
Admin users
Not just the ability for having users, but now you have different roles and thus different access rights and pages that are accessible depending. Though I note you use the phrase "with the specified password" which means you aren't really thinking of having an actual user-based system, just some brute-forceable basic hard-coded string put in there somewhere.
Note: especially if you're expecting to be dealing with money, this will not fly. Security is top of your list, so you need a full, proper, auth system in place.
Users can bid
Well I'd hope so, being the basis for this it seems. That's simple enough; requests through to the server to store relevant bids.
However, you need to worry about concurrency - how often will their page be updated so that they are aware of other bids? Does your page pole for changes every x seconds, or will you use websockets so that you can push updates to the clients in real time?
Min price
Yeah, sure, details details.
Payment
Over email? Outside of the odd £5 or something, people buying artworks are not likely to be happy randomly paying for things via email. Sure, maybe, depending on what you're doing and your audience, maybe that's fine. A proper website, however, will provide online payment options; that way buyers have confidence and some protection (against you, in this case).
Take payments? Two options, taking them yourself or via a third party. Doing it yourself is a pain in the backside and there's probably not much of a chance your project would pass the requisite security checks to be approved. So you'd need to work through a 3rd party - those are typically pretty easy to set up (they WANT you to use their services, after all), but it's still another chunk of work you need to do to integrate that.
Automated emails
Sure, emails, easy. Though you need to decide whom your provider is. Self hosted? SendGrid? AWS? etc.?
You'll need to keep an eye on your account every now and then as they tend to keep track of your 'reputation' and any bounces, etc. that you get, and if you drop too low, you get no service. E.g. prevent spammers.
Bids stored
Sure, everything should be stored. Bare minimum requirement.
That's just covering your points, let alone the effort of the unspoken requirements in creating an entire site that's acceptable for use and doesn't scare the users away two seconds after they look at it - it needs to look reputable.
You need registration pages, account management pages, galleries, search features (if you're that big?), admin pages (user management, auction management, etc), the lots themselves with the whole bidding mechanisms involved...
That said, you can probably put one together relatively quickly with various website builders - wordpress has a bajillion plugins and I'm sure probably runs half the websites out there at this point, and likely has everything needed to do that; but it wouldn't be Angular, and it wouldn't be your stuff; you're trusting whomever developed those things to have them work, maintain them, etc. etc. while you figure out how they all work and get it all running...
TL;DR: There's a reason devs are pretty well paid. It's always more complicated than you think.

Can I use Google sheets as a small database for my apps?

I have a personal finances spreadsheet on my Google Drive.
For some practice and ease of use, I wanted to make a desktop and mobile app to manipulate it:
add an expense
list my expenses
filter the expenses
etc...
Is there a way to do this?
Since it is something so small, I'm trying to avoid anything that needs a dedicated server that I would need to set up or needing to rent any services because it's just a ease of use project and not a "must-have".
I've been searching a lot but most of the time I get confused with responses from 2-3 years ago.
EDIT:
So I found a way, using this video:
https://youtu.be/3OakodfKjrU
Basically using Google App Script you can make some post and get requests, which for me is a step in the right direction. Just needed to think outside of the box a little and I got a simple way to send post requests to create or update, and get requests to read, for now I also use get to delete but this just seems wrong, might change later.
Also I've searched and started doing a PWA (progressive web app) to be the interface, just so I can make it with a single code base and work with almost any device, using pure js, html and css, the only "non-pure" thing is Onsen Ui for the GUI.
You can use an NPMJS package such as google-spreadsheet to work with the Google APIs and manipulate your spreadsheet; the issue for you with trying to build the app without your own server is the need to securely store your Google Account credentials (you don't want this being publicly accessible).
If you could compromise and use a read-only solution, a package such as tabletop might suffice as you don't need to bother with any back-end work; I doubt this would be ideal for you though. You will need to host the application regardless if you want to be able to access it through the world wide web.
Alternatively, you could run the application locally if you would be happy with only being able to use the app that way. Hope it helps and sorry for the rambling!

Back-end solution for pure-Javascript site with link sharing

I'm developer-beginner and I would like to do simple card-sorting site.
hundreds of cards with plain text
no log-ins, it must be as simple for user as possible
few dozens users per day
final state of sorting should be saved under unique link, like site.com/q56we1cfuz4 or site.com/link.php?unique=q56we1cfuz4
User sorts cards as he/she wishes and the result is saved into browser sessions storage (few kb of data in JSON or so). So far, so good.
Question:
As I know only Javascript:
If I need to share the state of the page (data in session storage) with some unique link, is something like Firebase.com good solution for such kind of back-end? Or some simple DB with help od Node.js?
In order to "catch" the link when someone click at unique URL (site.com/link.php?unique=q56we1cfuz4), I still need some server-side script which will ask the DB, like PHP header redirect, right?
Your questions are a little fuzzy, no problem tho. You are just getting into web dev, so there's a lot to wrap your head around and all of the options can be pretty confusing. Some people will complain about opinionated answers, and I'm not going to claim to be objective here, but here are a few tips that I think will get you pointed in a better direction...
Firstly, yes - firebase is a good solution for you to try working with. Aside from the fact that it will give you the db/storage features you need, it's a realtime db, which will give you a lot more than just storage in the long run, and will better equip you for the future web development trends. The firebase API is (mostly) designed to work asynchronously, so from a javascript perspective, it falls right in line with the kind of code you'll end up learning to write.
Re: the other aspect of your question - server-side - check out nodeJS. It's basically a server-side javascript platform that will allow you to use the same skills you're learning to write client-side code for the server. Also check out expressJS, a nodeJS package that provides you the http-server, and allows you to handle dynamic urls, etc. - the bits you were thinking about when you made a reference to PHP.
Hopefully this will help you focus on a few specific tools to familiarize yourself with as you learn web development, rather than having to struggle with everything from new languages, platforms, and way too many libraries, frameworks and techniques to wrap your head around. Good luck!

How to use JDBC to send Google From response to Cloud SQL?

I work for a non-profit that holds free sports and physical activity events. I'm am trying to set up a system to store and collect information about our membership and the events we hold, using Google Docs as the user interface and Google Cloud SQL for data storage.
Like most non-profits, we do not have a lot of resources available for advanced computer programming. I would like to use Google Forms as a simple UI that our research and evaluation staff can use to build data collection tools without coding. The ease of access to the responses in Google Sheets is great; however, we hold a lot of events and will quickly exceed the 2 million cell limit. So, I think we will need to store the responses in a SQL database.
What I would like to do is modify the action performed on submit, such that the form:
Does NOT submit to a sheet
Connects to a SQL table (I've set this up on Google Cloud SQL)
Dumps the responses into the correct columns
If the form was modified, add any new columns to the table (like Forms does with attached sheets).
I know that Google Apps Script can connect to external databases through the JDBC service (https://developers.google.com/apps-script/guides/jdbc) and I know that I will need to use the getItemResponse method (https://groups.google.com/d/msg/google-appengine-stackoverflow/laLkcneaqZo/PfPKKYlmva8J) to execute this.
I have very little experience with Google Apps Script or JavaScript in general....basically, the most I've done is finish the Codecademy JavaScript course. However, I am a quick learner and I'm looking for a little example code that might get me started (remembering that I have almost no experience).
I've searched through this forum, GitHub and everywhere else I can think of, but cannot find something that is quite right. I'm mostly pointed to the JBDC documentation, but do not know how to use it. Any help you can provide would be much appreciated.
Brett
I wrote some articles about this at my blog, Bit Vectors. This article might cover most of what you need. That specific article explains how to build a Google Apps Script solution tied to a Google Sheet file. The GAS solution front-ends Cloud SQL. The end-user sees a web page / form, and if you want, the Google Sheet itself. To answer your list items:
1) The web form does write to a sheet, but in the software, you can easily prevent this
2) The web form definitely connects to your Cloud SQL table / database
3) The solution writes to the table(s) / column(s) you want through stored procedures
4) The solution will not modify the data table structure if you change the form - you would have to handle this change yourself
See a demo here.
HTH!
Frank

Webapp able to work offline !

I have to design an webapp that has the capability of working offline.
So there are many working points that in normal mode work online , connected to a central server.
Now there are moments when for different reasons , the central server might not be available.
(no internet ,server crash etc) so then is needed to enter in offline work mode.
Is not required to work fully just to do some work because clients should not wait , so invoicing should be possible (concrete case).
A custom solution I already have in mind but I am wondering if you know a framework or something that does such things already.
Thank you !
We wrote a desktop app for hundreds of employees to use on their laptops. It used database replication to merge the data from the laptop copy of the database to the server copy of the database. The amount of data contained in the database was significant -- product information, customer contact information, and so on. That was all needed for the rep to be able to create sales orders and invoices and the like. It was crucial that the rep be able to use the software all the time, not just once in a while when they had connectivity. However, this approach does have its challenges -- if the local databases don't get synched up frequently, data at both ends becomes stale, plus you have to deal with conflicing updates.
If the amount of database information needed locally for working disconnected isn't huge, you definitely can take advantage of the new HTML5 offline storage and use a website.
I think that the critical factors here are how much data the user needs when they are working offline, how fresh the data needs to be, and what percentage of time they will be working online vs. offline.
If your app is html/javascript, use the HTML5 application manifest. See the following resources
http://www.w3.org/TR/offline-webapps/
http://www.webreference.com/authoring/languages/html/HTML5-Application-Caching/
You can use Google Gears.
Here is another link: http://www.scriptol.com/ajax/google-gears.php

Categories