Python for Entrepreneurs Transcripts
Chapter: Course Conclusion
Lecture: Lightning review: applied-pyramid

Login or purchase this course to watch this video and the rest of the course contents.
0:01 Next up, we said alright, we know enough css
0:04 we got our code in github and source control, and we know the basics of Pyramid,
0:07 let's actually build some really interesting things.
0:10 So we said here is our goal, how do we build this thing?
0:14 We built our blue yellow rockets, not quite this far, but we came close
0:19 so we said what are the elements of these real apps?
0:23 Sure we have the building blocks, but let's do some more.
0:26 First, we said let's switch from standard method based views
0:29 to class based views with something called Pyramid handlers,
0:32 which means it's much more convention driven,
0:35 basically you set up the routing for the classes
0:38 and you could have ten or fifteen methods on that class
0:40 that all automatically pick up this url convention.
0:44 We said with our templates, we want to have a shared layout
0:47 so the standard navigation and standard css and javascript is included
0:52 on all the pages and we just basically write what is different.
0:56 We said we want to have form that excepts user input
0:59 for things like log in, registration, a newsletter sign ups, all that kind of stuff.
1:04 So we spent a lot of time talking about that,
1:07 and that generated let's say much more complex or full featured view methods
1:11 in our classes, so we said alright, let's take some of that functionality
1:14 mostly the data exchange and validation,
1:18 and move it to these things called view models which are easy to test,
1:21 which are separate from the actual logic of the application.
1:24 So that was a real big addition that we made.
1:27 And finally, the validation on the client side was done
1:31 by adding some html 5 validation through
1:35 basically the required attribute or setting the type of the fields,
1:38 and then the server side validation was done with the view models.