Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Desmond Dallas
Desmond Dallas
6,985 Points

Collecting data from JavaScript

Hi, can anyone answer this for me please.

I've been learning JavaScript for a couple months. It has only just occurred to me.

Lets says I have built a Kids educational website for my (client). The users are kids/adults where the will answer quizs, math tests etc.

Now my client wants to capture that information for every profile (account) and store it on the backend in a spreadsheet or the website itself.

Would I use Javascript for this. Can this be done combining HTML and Javascript or do I need to use a different language to accomplish this?

3 Answers

stjarnan
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
stjarnan
Front End Web Development Techdegree Graduate 56,488 Points

Hi Desmond,

There are multiple techniques that can help you accomplish this. But in general you will need a backend consisting of a backend-language and a database, if you like JavaScript you could use node.js, which works great with a db called MongoDB.

What you could do:

* The user press "Submit" at the end of a quiz
* A request will be sent to your backend to store the data
* Node.js handles this request and sends the data to your database where it will be stored
* Some kind of message will be sent in a response from Node, letting the user know if the action succeeded

I hope this gives you a hint of how it could be done

Jonas

Desmond Dallas
Desmond Dallas
6,985 Points

Thanks and yes it does. So in other words I would need to learn three different platforms to be a full stack Javascript developer.

1) Javascript 2) Node.js 3) and a back-end language

My question to that is/statement I haven't noticed much jobs asking for a front and backend developer for javascript, unless I haven't noticed. Wouldn't it be standard practice for an employer to ask advertise for an employee to have knowledge all these languages or other languages that can accomplish this?

And in question to that, wouldn't it be in almost every case that a client would want these back end functionalities on their website, even if it is capturing log in information or bank details etc?

I'm obviously learning on team Treehouse but have not yet heard any mention of backend development for Javascript or on any other programming learning site (for Javascript). I presume surely it would be beneficial for the programmer to know these languages. Wouldn't these come hand in hand?

stjarnan
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
stjarnan
Front End Web Development Techdegree Graduate 56,488 Points

I might have described it poorly for you, but you can consider Node.js the backend-language, making your 3 steps into 2 :)

If you start out as a front-end developer you will most likely be part of a team where you get to focus on the front-end while someone else on your team work on the back-end.

There is also a huge demand for full-stack javascript developers.

Hope that clarifies things for you :)

Jonas

Desmond Dallas
Desmond Dallas
6,985 Points

Yes it's does thanks. Your first explanation was very clear. It's just something that popped into my mind and only just took notice I'm only learning front end programming. Anyhow one step at a time but now I have more clarity of what a full stack javascript developer is. Now it's just to figure out the languages to learn to accomplish this when ready.... THUMBS UP.