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 trialPhilip Schultz
11,437 PointsFirst big project!
Hello Teamtreehouse, I've been assigned my first big project in college and I was hoping that I could pick your brains on the best way to approach it using teamtreehouse as a source. I have to build a dynamic website for a fictitious charity. This website needs to have a single portal that allows different levels of classifications (staff, student, donors, mentors, etc..). I also have to build a relational database to go with it. Furthermore, the site has to have chatting capabilities and a platform where mentors can talk with students.
I have been studying Python lately, so I think I can pick up Flask or Django the fastest (I am on a time constraint), but I don't know which one would be the better choice. Which one should I choose? Also, I've made a databases before on SQL server, but I've never attached it to a website. What should I study here at Treehouse to accomplish this project? What are the pros and cons of using python to do this?
Thanks everyone,
2 Answers
Eric M
11,546 PointsHi Philip,
The first full stack project can certainly seem daunting. I encourage you to break this down into chunks as small as possible and work on them one by one. I'm also going to suggest that if Python is the language you're most comfortable in, and you're on a time constraint, pontificating about its pros and cons is not valuable.
As you've never "attached" a database to a website you might want to do a breif read of the Model, View, Controller (MVC) pattern. In short think of part of your Python program as your website's backend, it's going to connect to your database to read and write data. Another part of your program will take this data from the backend (from the backend's classes or functions) and display it to the user somehow, it will be rendered as web page content.
For connecting to the database with Python you can check out this course on Treehouse or you can look at the documentation for SQL Alchemy if you want another option.
I use Python for data plumbing, I tend to favour JavaScript for web development, so I can't help much with Django vs. Flask. (That's not a value judgement on either language, just where my experience is). I have heard other programmers say that Flask is more "light weight" than Django, but that can mean a lot of different things. Treehouse has full on tracks for both Flask and Django. My only real advice here is (as you're under a time constraint) whichever you choose, stick with it.
Cheers and good luck with your project!
Zack Jackson
30,220 PointsI would recommend you jump in on the Django track.
Flask is great, but it's a micro framework so you'll be adding in a lot of bits and pieces here and there whereas Django comes with everything you need to start building. Django also has a nice admin panel built in that is pretty handy. The python courses here are tough and will kick your butt, however, you'll learn a lot.
If I remember correctly, both the Django and Flask tracks use SQLlite for dev which can be transferred to a full on production database later so you should be alright if you know the basics of SQL.
If you're not married to python, maybe consider Ruby on Rails for a quick MVP. Ruby's syntax is not too far off from python and it's not a difficult language to pickup.
Philip Schultz
11,437 PointsHey Zack, Thank you for the advice. I'll keep Ruby in mind to learn later, but I don't think I have the time to learn something completely new for the project. But I will jump into to Django like you suggest. Thanks
Philip Schultz
11,437 PointsPhilip Schultz
11,437 PointsHey Eric, Thank you so much for taking the time to write this post. I'm currently reading about MVC and will start the 'Using Databases in Python' Course here at Treehouse. I forgot to mention that I will need user admin panels, so from what l'm understanding I have to learn Django. Thanks again for help, I was feeling overwhelmed, but now I know where to start.
Philip Schultz
11,437 PointsPhilip Schultz
11,437 PointsAnyone else reading this and is interested learning what MVC is check out this video. https://www.youtube.com/watch?v=1IsL6g2ixak