freeCodeCamp / CurriculumExpansion

Creative Commons Attribution Share Alike 4.0 International
309 stars 104 forks source link

Learn MongoDB by Building a Movie Review Database #103

Closed QuincyLarson closed 1 year ago

pikonha commented 5 years ago

I'd like to help with this project

QuincyLarson commented 5 years ago

@picolloo OK - great! Do you have any ideas for the initial project you'd like to build, and how you'd teach MongoDB concepts / commands by building it?

pikonha commented 5 years ago

I think a CRUD API made with Node would be cool for this one, I can use the MongoDB Atlas free trial to be possible for the user to follow.

QuincyLarson commented 5 years ago

@picolloo Yes - though we don't actually want to have to use MongoDB here - we want to mock out the commands and the output and the state of the database, and use regular expressions to test their input. That way people won't have to host their own database.

Em-Ant commented 5 years ago

this ca be useful https://github.com/louischatriot/nedb is a js database with an api which is a subset of mongo db's one. it works in the browser (in memory) and is available also via cdn. I always use it for my test projects (and some of the apis on glitch)

QuincyLarson commented 5 years ago

@Em-Ant That's a good resource.

@picolloo Are you interested in tackling this project? Can I assign it to you?

pikonha commented 5 years ago

I think it might be too much for me, I'm currently working on WebSocket's project so I'll have to pass it, at least for now.

QuincyLarson commented 5 years ago

@picolloo OK - thanks for confirming. Best of luck with the Web Socket project!

Em-Ant commented 5 years ago

@QuincyLarson I'll take this, if it's ok for you

scissorsneedfoodtoo commented 5 years ago

@Em-Ant, it's all yours. Looking forward to seeing your project :+1: :+1:

scissorsneedfoodtoo commented 5 years ago

@Em-Ant, just wanted to check in and see how everything's going with the project. Were you able to make any progress on a prototype?

Em-Ant commented 5 years ago

I will do it during the easter holidays. Do you want me to build something like the mongo console (like command interface ? ) . I found that it's not so simple to simulate a console step by step, because of the asyncronicity of js (you need to do things inside a callback). Worst case, i'll do a text file with the steps, and then we'll figure out how to implement it.

Il lun 15 apr 2019, 08:15 Kristofer Koishigawa notifications@github.com ha scritto:

@Em-Ant https://github.com/Em-Ant, just wanted to check in and see how everything's going with the project. Were you able to make any progress on a prototype?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/freeCodeCamp/CurriculumExpansion/issues/103#issuecomment-483121037, or mute the thread https://github.com/notifications/unsubscribe-auth/AMWwVs0GkQVPjLPbCMpb8tIcP3gkNJ2vks5vhBkdgaJpZM4bkcNi .

scissorsneedfoodtoo commented 5 years ago

@Em-Ant, great! Looking forward to seeing it after the holidays.

Please correct me if I'm wrong, @QuincyLarson, but I imagine this project using a mock Mongo console rather than being a CRUD app. Don't feel like you have to implement the whole interface yourself -- we can work out all of those details later. Like you mentioned, it would probably be best to have a series of .js files, each with the short test description/instructions, the command the user should enter, and the mock output. And it would be great to have one file showing the state of the "database" by the end of all the challenges.

This video tutorial could serve as a jumping off point for the concepts to teach.

QuincyLarson commented 5 years ago

@Em-Ant OK - I am excited to see what you come up with.

@scissorsneedfoodtoo Yes - we just want to make sure that we don't actually need a server running. All the files necessary should be static and/or in the code itself. I know there are challenges with this, and we'll just have to make tradeoffs as necessary.

scissorsneedfoodtoo commented 5 years ago

@Em-Ant, how's everything going? Were you able to start on this project?

Em-Ant commented 5 years ago

I am quite busy at the moment, I don't think I can do it, sorry. If somebody else want to contribute I think it's better.

scissorsneedfoodtoo commented 5 years ago

@Em-Ant, no problem! Thank you for letting us know. I'll put the help wanted label back on, but please feel free to contribute to the discussion or pick the project back up later if it's still unclaimed.

beaucarnes commented 5 years ago

@QuincyLarson I notice there is no project that specifically teaches mongoose. In the current curriculum, MongoDB and mongoose are taught together. Are you ok with mongoose and MongoDB being taught together in this project.

I am thinking this project could be a simple node / express web server with CRUD API endpoints that all connect to MongoDB using mongoose. That will be more real-world than a project that just uses the MongoDB console.

Here is a library that can be used to mock MongoDB: https://github.com/williamkapke/mongo-mock

Em-Ant commented 5 years ago

I agree. I tried, but it's quite hard to mock/simulate a mongo console in the browser. A CRUD app would be much easier.

scissorsneedfoodtoo commented 5 years ago

@beaucarnes, that's a very good point! I could definitely see it going that way where students build out the different DB operations for each endpoint, and it would be a more realistic application. Sorry @Em-Ant, I was under the impression that this would be more like the NPM module project that requires a mock CLI. But an actual CRUD app would allow for more possibilities like teaching Mongoose.

QuincyLarson commented 5 years ago

Yes - I agree with @Em-Ant - until we design a browser-based mock command line interface type environment (which we will eventually need for teaching Bash and Git) we will just want to focus on building a CRUD app and explaining what the endpoints would do (or perhaps yet having mock responses for endpoints when they run the tests).

HansUXdev commented 3 years ago

I just learned about this a few days ago when I posted about how stuff is being built on FCC. https://forum.freecodecamp.org/t/how-is-new-content-created-at-fcc/416191/2

The repo I built so far is: https://github.com/HansUXdev/LearnMongoGitPod

It's still very much a work in progress but I built it as a proof of concept. The idea is to leverage GItPod's remote developer environment for educational purposes and provide the barebones most simple demonstration and explanation of CRUD as possible without any prior knowledge.

Anyone who opens it can learn how to use mongo through the shell commands and I relate the shell commands back to CRUD by using insert and a CREATE method, find() as a READ method, Update for itself and remove for DELETE.

There is also the original lesson that goes over using docker-compose but that doesn't run in GitPod.

I'd like to team up with some people over zoom, twitch or youtube and discuss it more.

Also I should note the readme files look weird because they use a vscode extension that turns them into slideshows. On the plus side of things, I just made a presentation branch and converted that to a github page so that I could export the slides as webpages. 😈

scissorsneedfoodtoo commented 3 years ago

Hi @HansUXdev, thanks for all of the hard work and thought you put into this proof of concept. I ran through what you have and I like the direction this is heading.

As Quincy mentioned in the forum post you linked to, we're working on a way to run MongoDB in VS code and test it. GitPod works fine for a prototype, though.

The idea of building this project as a CRUD app with Node and Mongoose was brought up in earlier comments, and I agree that it makes sense for Movie Review Database project which will probably be the last in the APIs and Microservices certificate.

But I think it's worth considering teaching the very basics of MongoDB in the command line like you've done in a separate project. @moT01 is currently working on teaching Bash and SQL via the command line, and I could see a smaller "crash course" command line based MongoDB project.

In prototype I see stateBar.js and resume.js. What do you see learners building in your project?

HansUXdev commented 3 years ago

As Quincy mentioned in the forum post you linked to, we're working on a way to run MongoDB in VS code and test it.

I recently found this. https://marketplace.visualstudio.com/items?itemName=hansvn.instant-mongo

In prototype I see stateBar.js and resume.js. What do you see learners building in your project?

It was originally a classroom but I changed it to statebar for fun. I want to eventually do a resume version based off resume.json, the idea being it can eventually can used for a profile or other projects throughout their career.

This also builds off the CTE approach I try to take.

scissorsneedfoodtoo commented 3 years ago

Hi @HansUXdev, that extension is a great find. Will be good to keep it in mind as we discuss how this and other Mongo projects will be taught.

Also, feel free to pitch a basic outline or simple prototype of what you have in mind. We can discuss the ideas you have and perhaps open another issue for a new project if we decide to go that route.