Open Side Menu Go to the Top
Register
Building my first ever web-app. Front-end going OK, now I need back-end. I'm lost. Building my first ever web-app. Front-end going OK, now I need back-end. I'm lost.

12-01-2016 , 03:49 AM
Hi guys,
I started coding 3 months ago. I set out with a goal to create a single page app. I did some HTML, CSS, Python, and then I jumped into Javascript lured in by the fact that I could use JS on front & back-end. I'm doing React & Node now. I was able to fire Webpack, deal with JSX, ES5 vs ES6 etc.,. It definitely is a v steep learning curve for me, but I enjoy it a lot.
As for my application, it's coming very slowly alive, piece by piece. Now I need to finally start integrating it with some back-end. I would like to
  • store user's input from a auto-complete dropdown
  • store user's input from two radio button selections
  • write a simple query algorithm that would generate results based on user's inputs, and return results


Simplest thing I would want to do first, is to create an autocomplete dropdown menu that imports the data from the database. How do I start ?

  • I don't have a database yet (but I got the data using a scraper I built in Python). MySQL ? Postgres ? GraphQL ?
  • I haven't played with HTTP methods
  • I would like to stick with Node since a) I haven't used python in 6 weeks b) I'd prefer to master one language first
  • I'm generally confused. I was told I should use Graphcool, Python Falcon framework, Meteor, PHP... what should I use, or where to start first ?

Help & guidance much appreciated
Building my first ever web-app. Front-end going OK, now I need back-end. I'm lost. Quote
12-01-2016 , 12:00 PM
how about ruby on rails?
Building my first ever web-app. Front-end going OK, now I need back-end. I'm lost. Quote
12-01-2016 , 01:11 PM
If you like node, use node. If you feel like you want a database, just pick one, it doesn't really matter for what you're doing. Don't let choice paralyze you, just don't get married to anything while you're in the beginning. Get some experience, figure out what you don't like about your first choices and either find a way to fix that or move on to something else.

I started out writing some web frameworks (back in the day when they basically didn't already exist) and I basically ported the same framework to 3 or 4 different webservers, learning a ton along the way, until I settled on a webserver I really liked. In the last 20 years I've programmed in at least 8 or 9 different webservers and frameworks, many databases (oracle, postgres, mysql, mongo, redis, mssql, sqlite, berkley db, etc, etc)
Building my first ever web-app. Front-end going OK, now I need back-end. I'm lost. Quote
12-02-2016 , 12:51 AM
Here's a few sites I used when i was learning node a while back. I've used postgres the last two places but mysql is fine too.

https://blog.ragingflame.co.za/2014/...nd-bookshelfjs

https://www.sitepoint.com/getting-started-bookshelf-js/

https://joepettit.com/bookshelf-js/
Building my first ever web-app. Front-end going OK, now I need back-end. I'm lost. Quote
12-02-2016 , 01:22 AM
Thanks for the feedback !

Indeed there are so many choices it's hard to pick anything as a beginner. At times I kind of lose focus slightly because I feel overwhelmed. I think I should be just picking things that are easy first, since I don't see any differences between technologies yet.

I'll try to stick with Node, and try Express. I found some easy to follow tutorial on YouTube. That's how I learn most of times.

Should I jump into NoSQL not knowing SQL ?

Lots of tutorials seem to have Express + NoSQL, but I heard that it's better to start with SQL first.
Building my first ever web-app. Front-end going OK, now I need back-end. I'm lost. Quote
12-02-2016 , 12:00 PM
I'd stick to relational databases if I were you.
Building my first ever web-app. Front-end going OK, now I need back-end. I'm lost. Quote
12-02-2016 , 12:05 PM
I would do it without a framework, personally. I have seen a lot of people hobbled by frameworks because they don't actually know what the framework is doing for them. It's very easy to make a few rest API endpoints without a framework.

I think it's even instructional to write yourself a very simple webserver, although not strictly required.
Building my first ever web-app. Front-end going OK, now I need back-end. I'm lost. Quote
12-02-2016 , 02:12 PM
Build your own webserver? That escalated quickly!
Building my first ever web-app. Front-end going OK, now I need back-end. I'm lost. Quote
12-02-2016 , 03:08 PM
Quote:
Originally Posted by Gullanian
Build your own webserver? That escalated quickly!
I don't really mean a full featured webserver. But it's very easy to make a simple script that will respond to an HTTP request and return something. I've done it in languages as humble as plain bash scripting. In the process you figure out what an HTTP request really is, and what the range of responses is like.
Building my first ever web-app. Front-end going OK, now I need back-end. I'm lost. Quote
12-02-2016 , 03:10 PM
Here's an example: 280 lines, half of it is comments, more functionality than I really even had in mind as an exercise.

https://github.com/avleen/bashttpd/blob/master/bashttpd
Building my first ever web-app. Front-end going OK, now I need back-end. I'm lost. Quote
12-04-2016 , 04:09 AM
If you're actually saving user input, you'll probably need user auth. That's a better reason for picking a database. I'd probably start there and use whatever your favorite tutorial recommends.

If you only need to know the values that the user selected, and you're not saving user input, you can just use static data for your autocomplete instead of using a database. Here's an example:

https://reactcommunity.org/react-aut...e/static-data/
https://github.com/reactjs/react-aut...ic-data/app.js
https://github.com/reactjs/react-aut...b/utils.js#L45

There is a pretty cool react autocomplete example here too that fetches usernames from github.

https://jedwatson.github.io/react-select/
https://github.com/JedWatson/react-s...GithubUsers.js

If you really want to use a database, you'd create a route in node that accepts a query param, queries the db and returns json that populates your autocomplete.

https://api.github.com/search/users?q=blabla2
Building my first ever web-app. Front-end going OK, now I need back-end. I'm lost. Quote
12-06-2016 , 11:08 PM
I was in a similar situation and after using Node/Express for one of my sites, i turned to Firebase. If you are not familiar with Firebase you need to check it out. For many projects you won't need a server at all. It can handle Auth as well, which imo is a pain to implement on your own. Especially if you hope the site gets big, better to have Google handling your authentication then yourself.

It is just an option of many, but one you should definitely consider. And if you are using a JS frontend, you can host your static site there as well. They have a great CLI that makes it pretty easy.
Building my first ever web-app. Front-end going OK, now I need back-end. I'm lost. Quote
12-08-2016 , 12:49 AM
yeah, dont do your own user auth.
Building my first ever web-app. Front-end going OK, now I need back-end. I'm lost. Quote
12-08-2016 , 11:32 AM
Quote:
Originally Posted by Your Mom
yeah, dont do your own user auth.
Usually a good idea. Not everything needs auth though.
Building my first ever web-app. Front-end going OK, now I need back-end. I'm lost. Quote
12-11-2016 , 08:38 AM
If you know some Python, then the Flask framework is very good for the back-end. It is a micro framework that allows you to pick which components you want.

Usually I find it easier to design the back-end part first. What will you be doing with the data that you are getting from the forms?
Building my first ever web-app. Front-end going OK, now I need back-end. I'm lost. Quote
12-12-2016 , 02:17 PM
If you are using Node, I would look into Sails. You can get going with it very quickly.
Building my first ever web-app. Front-end going OK, now I need back-end. I'm lost. Quote
10-15-2022 , 01:59 AM
*bump*

Hows the project going OP?


What backend framework are you using to translate nash equil preflop solves/scripts from pio/monker into a visual representation for real time application use??
Building my first ever web-app. Front-end going OK, now I need back-end. I'm lost. Quote
10-19-2022 , 03:04 AM
Quote:
Originally Posted by BlaBla2
Hi guys,
I started coding 3 months ago. I set out with a goal to create a single page app. I did some HTML, CSS, Python, and then I jumped into Javascript lured in by the fact that I could use JS on front & back-end. I'm doing React & Node now. I was able to fire Webpack, deal with JSX, ES5 vs ES6 etc.,. It definitely is a v steep learning curve for me, but I enjoy it a lot.
As for my application, it's coming very slowly alive, piece by piece. Now I need to finally start integrating it with some back-end. I would like to
  • store user's input from a auto-complete dropdown
  • store user's input from two radio button selections
  • write a simple query algorithm that would generate results based on user's inputs, and return results


Simplest thing I would want to do first, is to create an autocomplete dropdown menu that imports the data from the database. How do I start ?

  • I don't have a database yet (but I got the data using a scraper I built in Python). MySQL ? Postgres ? GraphQL ?
  • I haven't played with HTTP methods
  • I would like to stick with Node since a) I haven't used python in 6 weeks b) I'd prefer to master one language first
  • I'm generally confused. I was told I should use Graphcool, Python Falcon framework, Meteor, PHP... what should I use, or where to start first ?

Help & guidance much appreciated
Hey man,

Congrats on beginning your programmer journey!

I'm a game developer turned web developer myself for about 10 years now (wow time flies fast!). Nowadays mainly backend PHP, MySQL although I do my own frontend work as well. My main area is my backend work. If I were you I'd keep things as simple as possible first. Get your MVP working, and then add new features.

Break down your project into it's features, then extrapolate those features down into bite sized tasks. Put those on a todo list.

Backend work is it's own endeavour. You want to plan things well, and build things with a good foundation, so it's best to choose 1 thing, plan out the code, implement then on the next thing making sure you're thinking about the future so you don't end up with a code mess and heck of a time doing updates.

To sum up I'd use MySQL, it's pretty straight forward to be able to get things going and very very popular so there's a lot of resources. If you haven't started working with writing queries, CRUD (Creating, Retrieving / Reading, Updating, and Deleting) user data in a database, and working on proper code construction for good maintainability down the line, protecting your user accessible areas from attacks, Object Oriented Programming you really want to make sure you take it at a good pace, and don't put too many things onto your project todo list at first.

(I actually have a personal web dev project I should be working on right now to be honest, but I figured poker could earn me some money for it while it is in development.)

Anyways, good luck and have a good one!
Building my first ever web-app. Front-end going OK, now I need back-end. I'm lost. Quote

      
m