#100DaysOfWeb in Python Transcripts
Chapter: Days 37-40: Introduction to Pyramid framework
Lecture: A spectrum of frameworks
0:00 When I think of Python web frameworks
0:01 I think of them on the spectrum.
0:03 On one end, we have what are often
0:05 referred to as micro frameworks.
0:07 The poster boy for micro frameworks is probably Flask.
0:11 But there are actually ones that are even more simple
0:13 and, you know, less comes in the box.
0:15 Something, you know, something like Bottle.
0:16 And then we have for lack of a better term
0:19 building block frameworks.
0:21 You take these big pieces of your application
0:23 and you click them together.
0:24 You want an admin section?
0:25 You choose the admin thing and you drop it in
0:28 and now you have an admin section.
0:29 You want, you know, some other forum?
0:31 Okay, drop in the forum section and now you've got it.
0:34 Right, so there are very different philosophies
0:36 around building frameworks.
0:38 The micro frameworks are better suited for people
0:40 who carefully want to pick various libraries
0:42 and packages that they're using.
0:44 You want to decide between SQLAlchemy and MongoDB
0:48 or MongoEngine or ODM for talking to MongoDB.
0:52 Or something else, right?
0:53 You want to really carefully choose that?
0:54 Well something like a micro framework
0:56 will let you pick that, 'cause it has none provided
0:59 and has no guidance on one way or the other.
1:01 On the other hand, building block frameworks
1:03 like say Django, come with their own ORM.
1:06 It's kind of fighting against the system
1:08 if you're not going to use the stuff that it comes with.
1:10 So where you like to land on this spectrum
1:13 is really how much do you want to pick each individual thing
1:17 separately and bring it to your project
1:18 or do you want to just take what's provided
1:20 from the building block frameworks?
1:23 Here's my assessment where these frameworks live.
1:25 There's not really a science here, it's just a gut feel
1:28 but you know, I don't know
1:29 what the science around it would be so here we go.
1:31 Out on this building block end
1:33 I definitely have Django in mind.
1:35 Probably not the only one out there like this
1:37 but it certainly is the most popular one of this category.
1:41 So like I said, you could just flip a switch
1:43 and now you have an admin data table editing section.
1:46 That just comes with Django.
1:48 The micro frameworks don't have those kind of things.
1:51 In the micro framework land, we have Bottle.
1:53 We have Flask. Those are very very simple.
1:56 And Pyramid, it lives a little bit
1:57 in this Goldilocks range, I guess.
1:59 It's not quite as simple or unopinionated
2:02 as Flask or Bottle. But it's definitely closer
2:06 to say Flask than it is to Django.
2:09 Most of the stuff, you bring.
2:11 Most of the libraries and capabilities
2:12 you bring to the framework and you start using it.
2:15 Here's where Pyramid generally fits
2:18 in the spectrum of frameworks, according to Michael
2:20 and hopefully that will give you a little bit of a feeling
2:22 on which side of the spectrum that you live on
2:25 which will help you understand
2:26 maybe which framework you like best.