Week 12 of the experience blew by faster than I would have liked! The Python stack courses have officially been completed now and I'll be moving on to the final component of the Coding Dojo, building projects. This week, I did my best to run through the optional content plugged in at the end of Python, while working on several different projects, as well as keeping up with all the non-technical stuff (articles, crypto canon, and non-tech components of the hackathon).
<usual_enterance> If you're new here I'm creating this blog series as I go from coding newbie to working in web3. I'm creating this to reflect on the technical and non-technical growth and to leave it behind for others who might be interested in how they can follow a similar path. </usual_enterance>
In this week's technical recap:
- Flask Deployment learnings
- Django learnings
- Project developments
- Chainlink Spring Hackathon status
- What's Next?
As always, feel free to correct my understanding. This section appears short because I am leaving out the content around deploying to AWS.
On the server-side, when it receives a request from a user; the web server asks to retrieve some content, the logic unit receives the request and runs the appropriate code for the application, and the database stores the files and provides them when needed.
The process manager; restarts the app if it crashes, gains insights into runtime performance and resources consumption, and modifies settings to improve performance and load balances.
Ran through the code and components of using a free version of AWS to deploy a Flask app. Content covered: setup, EC2, server instance, access, and configuration, as well as VUM, Gunicorn, and Nginx.
Same as before, feel free to correct me in the comments; after all that's a feature of public learning, not a bug!
This list was getting rather extensive so I condensed it down into some of the major components and listed the excluded pieces at the end.
Creating a Django Project
This section reviewed the process of using command line in setting up a Django project, and how this framework splits up the files like apps, URLs, etc.
Our URL file in our app holds the list of URLs the project will recognize, and we have to set a variable to establish the route
There are a number of ways to handle returning responses with Djang; redirecting allows for navigating to a different view method before the final response is sent to the client.
GET vs POST Requests
Data is accessed using either request.POST or request.GET. For security purposes, POST requests must include a CSRF token to help the server in recognizing genuine requests.
These make referencing routes easy; you pass a keyword to the URL method in the URL file.
The Object Relational Mapper allows us to write Python code without the SQL query strings in the logic which helps make it clear and easy to read.
In the MTV structure; the models hold the heavy logic and the controllers use the model method to perform any logic.
One to Many Relationships
Django uses a ForeignKey field for these relationships, the CRUD operations and pretty much the same as they were for MySQL
Many to Many Relationships
Django will build the third table that m2m has in MySQL if a “ManyToManyField” is included; it doesn’t matter which model has this field.
Further learnings included; routing with parameters, templates, static files, adding validations, and pattern validations.
Personal Portfolio Website
Tagline: The personal portfolio website hosts all relevant information about my project and professional history as well as some additional information for people looking to learn more about me.
I finished up fixing the last of the styling needed to complete version1 of my portfolio and I rearranged a couple of the sections, so this thing is ready to go live. I'm thinking of working with HostGator on this, I know I should try to use IPFS or Filecoin but I want to make sure I've at least seen how it's done in web2. I'm hoping to have the site live within a few days, but this component was not covered by the Dojo so I'm on my own to figure out how to do this and I'm not finding many helpful videos.
Doors vs Wheels
Tagline: A TA from the Coding Dojo and I are building a website that is requesting data from users about how many doors and wheels they have in their homes as part of a TikTok trend.
We met to talk over Doors vs Wheels, we've both been pretty busy with other projects and the TA had to work on grading those Python exams but we did decide on next steps and some changes so this next week should see some of those start to be implemented.
Tagline: A collection of code snippets created by me while practicing prompts provided by websites like codewars.com.
Lots of practice here, nearly managed to keep up with daily exercises for JS, Python, and Solidity. I wish I had been doing this for the last 12 weeks on top of learning everything else because this has been very helpful. Last week I was doubting myself a little and was struggling but the more I kept at it, the more I clarity I had in how to construct and read the algorithms.
Chainlinks Spring Hackathon
Our team had a rough go this week with having two people dropped, with only one replaced so far. The actual coding hasn't started just yet, I expect that to start tomorrow as we begin the clickable prototype. There are very slim details for the technical recap this week but now that the bulk of the introductory webinars are out of the way, we can begin more confidently.
With Python finished and moving into the project's portion of the boot camp, I'll have to manage some new learning materials, but most of the focus will be on developing a solo project first. The first two weeks (starting tomorrow) are all about the development of a full stack project by myself. Aside from the dojo, I've got progress to make on each of the project mentioned before; keeping up with algorithm practice, deploying the portfolio, touching up on Doors vs Wheels, and most importantly, getting the project for the hackathon off the ground.
If you'd like to join the learning community I'm building on Discord for web3, you can find the link for that here. It's a space that I am trying to build for myself and others to share their growing knowledge of all things web3.
You can also find me here: