Python for the .NET Developer Transcripts
Chapter: Web frameworks
Lecture: The ASP.NET and Python web ecosystems compared
0:00 When you think about building web applications in .NET there's basically one, single option. Yeah, I know there's some open source frameworks
0:09 that you could technically bring in, but if you go out and survey .NET developers What kind of web app are you building?
0:15 You can bet that this is an ASP.NET application. It might be traditional ASP.NET or it could be ASP.NET Core if those groups have moved over
0:24 to the newer version of .NET to be cross platform and all that, but you can bet it's ASP.NET. So here's, Okay, I'm going to go create a new
0:31 web project, in Visual Studio, what do you get? Well, I could have a ASP.NET Core Web Application or I could have a Blazor app.
0:38 And by the way, Blazor is incredibly impressive. But it's backed by an ASP.NET Core app. Or I could create another one based on ASP.NET
0:47 the .NET Framework, and it's also Web Forms, MVC or Web API, but you can tell it's basically ASP.NET without very small runtime change.
0:56 GRPC service, yeah, also in .NET. There's basically one clear way for building web applications, ASP.NET. This is both good and bad, right?
1:07 Like, on one hand variety is the spice of life, that's really cool. But on the other, you kind of know what to do, the dueling
1:14 is all focused around this one thing, so that's great. Python is actually quite the opposite it's a little bit dizzying and if you come from
1:22 the .NET world and the ASP.NET world, you go from this clear choice where there's like minor variations. Oh, is it a Web API or is it
1:30 just like a MVC app, I don't know? That just blows up into a thousand options. So Python is quite the opposite.
1:36 We have Django, you've probably heard of Django it's one of the more popular ways to build web apps. My mind is a lot like web forms, a little bit.
1:44 Not in practice, but in that there's a lot of big pieces you can kind of clunk in there and just get going
1:50 and that's got a certain appeal, it's pretty nice. We also have Flask, Flask is more like ASP.NET MVC very lightweight, it doesn't put a lot
1:59 of structure in place for you. We also have Pyramid, I built my sites with Pyramid. I absolutely love Pyramid, I adore this web framework.
2:07 It's not quite as popular as the other two but it is really, really nice. It has probably the best templating language out of all
2:13 the frameworks that we'll see, Pyramid is really nice. We also have Masonite, Masonite is inspired by Laraval and it's a pretty cool framework
2:22 with a lot of command line utilities to generate new elements of your web app. Starlette is one of the new fancy Asyncio
2:29 very concurrent, friendly type of framework. A lot of other frameworks are actually based on Starlette, as well.
2:37 We have FastAPI, this is a cool way to build APIs and it has it's own API, it's own programming model. You have Sanic, which is another one of these
2:45 Async friendly, high speed, high concurrent frameworks. You also have Tornado, this is the original
2:52 concurrent framework, it's been around for a long time. It's used in a lot of interesting ways, as well. This is actually a small sampling
3:00 of the choices you get to pick from. Again, spice and variety and life and all those amazing things, and yet
3:07 as a newcomer to this ecosystem, I don't think this generally comes across as amazing. I think it comes across as confusing.
3:14 Alright, well what is the tooling? Like if I pick Flask versus FastAPI what do I, is there a better IDE to use?
3:21 Is there like a project that I can create what libraries are available for? All this stuff is, it's quite overwhelming.
3:26 When you compare the two ecosystems, it really comes down to with the .NET world you have ASP.NET. In the Python ecosystem, you have a ton
3:34 of different open sources options, none of which has the major backer of Python itself. Like Microsoft or ASP.NET, behind it, right?
3:43 So it's much more of a pick and choose and wild west that we're going to talk a little bit about how to make some choices here.
3:49 But once you kind of find your way, whatever you pick really, there's a lot of good options out there. I think you'll be comfortable.