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
Chelsea Casareale
18,545 PointsPutting it all together
Note: I'm possibly overthinking this. I've been known to do that lol
I just finished the JavaScript track and I know I definitely need to go through it again to really solidify everything, but I'm confused in a more general sense. There was a lot introduced towards the end of the track that I don't think got as good of an explanation as they could have.
My big question is really how do I put these things all together and know when to use them? (Let's pretend I live in a magical land and only do personal projects fullstack and would never have a client specify anything for the sake of simplicity)
When would I prefer to build a SPA via the MEAN stack (or some other client-side/server-side framework) using templating like pug/jade to generate HTML vs. the "traditional" serving up static HTML pages with some JS/jQuery functionalities built in?
For that matter, how do you go about starting a MEAN stack web app project? Do you write an HTML "mock" with CSS and then convert things when the JS is introduced? I feel like a lot of the process details for web dev were glossed over (with the exception of unit testing).
I'm sure the answer it "it's up to you," but honestly I'd even find that OK! I come from a science research background so having something of a "methodology" is comforting for me.
Sorry this is so much I feel like I wrote an essay, but thanks in advance!
1 Answer
David Bath
25,940 PointsYou're definitely NOT overthinking it, those are all good questions. These courses often focus on a particular technology and don't give a clear explanation of how to put it all together.
I honestly don't know too much about the MEAN stack specifically (although I've used or at least played around with each of the technologies separately), but the question of whether to use such a stack at all probably has to do with the content of the site you intend to build. Is it a content-heavy site with lots of data stored in a database? Or is it a site with just a handful of different pages that you would update by hand? You can build a great website using just HTML, CSS, and Javascript/jQuery, but if a site is likely to be large and/or more like an app, to hand-code all that yourself becomes a waste of effort - there is most likely a lot of repetition that can be avoided by using some sort of templating framework and keeping the content in a db, only updating parts of a page that need to change when the user performs an action instead of a full-page refresh. This is where stacks like MEAN become useful.
You can build a site or app lots of different ways, but one way to get it started quickly is to use Yeoman or something similar that will help you scaffold out a site using the technologies that you choose. http://yeoman.io/generators/ Search for MEAN and you will find many options, though you'd probably want to stick with one of the most popular ones that were installed, used, and tested more.