AJAX, API with Pylot
To give you guys an update; I passed my Red Belt Exam! Today is a retake day as well and I took the exam again just to get really confident in creating a web app with Pylot. I think it's important to write as much code as you can, that's the only way to solidify your skills. Anyways that was after doing AJAX with Pylot.
Today, we are going to use AJAX with databases. Meaning that we're going to employ the .post() function on our HTML. The first couple of assignments were creating a Wall-esque type of web app. Instead this time, when you post a message, the page will not reload and you can see the message show on the browser immediately after submitting the button. This first assignment was pretty straight forward although it took a bit of time to get used to having a partial HTML that will render the messages without loading.
The structure of AJAX with Pylot is very similar to all Pylot assignment:
- Routes.py
- Controller,py, Views.html, Models.py
Here are the steps to creating an AJAX loaded webpage.
- Create the web app the same way you would without AJAX.
- Start incrementing features in script section (jQuery stuff)
- Create the partial html that will show AJAX loaded content.
- Remove update button
- Add AJAX feature with updates.
No comments:
Post a Comment