r/web_programming • • Apr 21 '17

What language(s) should I use?

tldr; What language(s) would you use to create a website where a user would input information (using a drop-down menu) and receive a list of data based off the initial data input?

The closes thing I can think of that would make sense is the =SUMIF equation in Excel.

--

I have this idea for a website, but I'm not sure what programming language(s) would be the easiest to learn and use to make my idea come to life. I'd like to create a simple website where the person would input their date of birth and receive a list of events and specific data based on their birthday/age. I don't want to save any user data and and its super simple design-wise in my head.

My secondary questions are: How would I have to structure/organize the data so that it would generate in a list format. (example: 1. This 2. That 3. Them)

If I wanted specific data (based of the users birth date) to pop up in a sentence (example: By the time you were 21 years old, [Number] were here), how would I go about that?

Am I better off just saving myself the stress/anguish and just pay someone to code if for me?

3 Upvotes

4 comments sorted by

3

u/[deleted] Apr 22 '17
  1. You can create a simple website with HTML and JavaScript. HTML is for creating the general structure of the website (e.g. some descriptive text, dropdowns, "start" - button, etc).

JavaScript is for creating interactivity: Read out what date the user picked and create a simple request (ajax) which will ask a server for all events on this date. Then read the servers response and display it on the website.

You will also need to programm that server. You can use PHP or Python for this. The server is really simple because it only gets a date, search its database for all events with this date and returns them.

2. Use a database for storing the data (MySQL is easy to setup). The main advantage of a database is that you can search the data very fast and its easy to access. In the database you can create a simple table which has a date, text and description column or whatever you need. After the sever read the data from the database, it should put them in a json file because thats easy to read/parse with JavaScript.

For a newbie this might be overwhelming but I think the hardest part is to collect all the data for the database. You could pay someone for coding this for you, but this is a nice little project to learn some of the basics of web development. Just try it out!

1

u/tipppph Apr 22 '17

thank you for this! Just to break it down and some clarifying questions:

Website design: HTML/CSS/JavaScript Server: PHP or Python Database: MySQL

Are there sandboxes on the internet where I could try this all out? And once I'm done how would I go about getting the website up? I only have experience with HTML/CSS and MySpace/Squarespace/Tumblr for creating "websites", so I feel like this is more of a Programming 101 question. cause then I want to ask about workflow and framework/how things all get coded together.

brb google

3

u/[deleted] Apr 22 '17

You can develop everything on your pc. Your browser can open local HTML and JavaScript files. You can start the server on your pc as well.

When you want to publish your website you can rent a server or webspace with python or php support. Upload everything there. Your server/webspace will have public ip or already a domainname. You can buy a own domain and assign it to the ip/domain. When I started, I chose a server from Amazon Aws because it was one year free and you get a full linux server you can play with.

For the workflow: Do some tutorials or research about how JavaScript/PHP/Python works until you can at least understand code that another person wrote. Then just focus on one part of the website, break it down to small problems and google how you can solve your problem. For example you take a look at the javascript part:

  1. When the start button was clicked, read the date.

  2. Send a request with the date.

  3. Read the response.

  4. Display the result. So google how you can do something when the button is clicked. Program this little piece, then google how you can read out the date. Thats the fastest and most fun way I guess. Great source is Stackoverflow.com

3

u/maynard_james_quinoa Apr 22 '17

You could accomplish this quite easily with Javascript and a Json file.