A really basic web app question

So I have been thinking of an idea for a basic web app that would really speed up a process for a small community I am part of - but I need some advice. I’ll warn you all, this is going to seem super basic to some of you - but we all have to start somewhere right?

The basics are:

User uploads a spreadsheet in a specific format (it is exported from another system so will be consistent).

Web app checks each line against another list to get a price for each line item.

Web app then returns some basic stats:
Price per item
Overall price for all items
If an item has gone up or down significantly within a week (this is nice to have)

I would like the list to be sortable on item type and price high to low etc.

My question for the lovely people of HT would be, where would you all start with soemthing like this? If you were attempting to make this, what routes would you investigate?

I am really looking forward to this as a learning and development experience but I am a little lost as to where to even begin!

Thanks in advance.
Will

Might be a shot in the dark since I am not really much into coding with WordPress being my go-to solution for websitew, but couldn’t you assign fixed variables for each item that could possibly appear on the list then later make the script scan the list for these items and fill in the price. At the end sum it all up?

var apple = 2;
var banana = 1;
var total = var apple + banana;

What they alwayw recommend at CS50 Code course is first write pseudo code like:

define variables and prices
Scan submitted data for variables
Put price tags on submitted data sheet where applicable

Sum it all up and display a total

1 Like

Almost reads like Cobol :slight_smile:

Have a look here :

2 Likes

Thank you for the reply, I will have a read of that link and see what it’s all about.

I have the benefit of time with this project, so I can really take time to learn rather than having to smash together something for a deadline in a week!

1 Like

Might come handy too :

1 Like

Thank you, I’ll look at both.

2 Likes
  • use oldschool serverside php, create a form with the upload, parse the file into a mapping and run your calculations. output the result in rows. learn about sanitizing var and stuff on the way. no tools needed, just a running lamp stack.
  • use javascript to be able to sort the columns.
  • oh and maybe make it look nice later with tons of css.

:wink:

3 Likes

So this was sort of what I was thinking in my simple mind!

As it is for a small group and will be offline (in terms running locally) I am not too worried about security which I know is a big consideration with any app (and according to half the internet PHP is basically a virus anyway) lol.

Thank you :slight_smile:

1 Like

use some nice code editor, php I consider good and easy for beginners. I don’t care about people hating this or that. without php 90% of all web pages would be off. no wordpress, no magento, no other shit.
end of discussion.

3 Likes

Don’t get me wrong, I like both PHP and Python (and a bunch more), whatever gets the job done.

Old article… I know… PHP7 is way faster, Unicode works now etc…

This is a very good read, with fair comparisons :

https://wiki.theory.org/index.php/YourLanguageSucks

Hope I’m not derailing the thread, but what would you use for basic form handling (i.e. a contact form) on a regular shared host. Need basic submit, no fancy stuff. Would also need something effective to prevent spam, like reCaptcha …
(Would probably want to set it up to use SMTP to send the form …) Could also use something lile formspree.io I guess … :thinking:

free

or paid

So, PHP FTW … :wink:
I guess I would/should also involve a PHP SMTP library for sending (or add IP to SPF) … :slight_smile:

Personally, I prefer Bottle with Python :
https://bottlepy.org/docs/dev/tutorial.html

Haha, I’ve used Flask, but not Bottle, before :slight_smile: I guess it would be on a VPS, Python on shared hosts usually only offer really old versions, IIRC.

and the bigger picture :

https://github.com/the-benchmarker/web-frameworks

Personally, I prefer Go :wink:

Go is cool for some use cases, still got its own flaws of course :wink:

https://wiki.theory.org/index.php/YourLanguageSucks#Go_sucks_because

Of course, as do all languages.

Yo should feel bad if you charge for a contact form.