The Framework Features Anti-Pattern
examples in ASP.NET / Core
@seangwright
Hello!
About me:
Tweet at / follow me here
Who am I? I’m Sean G. Wright.
What do I do? I make marketing, business tools and ecommerce stuff with ASP.NET and Angular, consulting and devops/hosting duties.
Where do I work? I’m a dev lead at WiredViews, a web development/marketing agency in Akron.
What’s new in my life? I just installed a new storm-door in the front of my house. It has a retractable screen. It’s like being outside.
How to find me? https://github.com/sgwatgit and https://medium.com/@seangwright
@seangwright
Please interrupt me :)
Comments, questions and digressions are welcomed!
@seangwright
What is a Pattern?
@seangwright
Pattern: some definitions
@seangwright
What is an Anti-Pattern?
@seangwright
Anti-Pattern: some definitions
@seangwright
You’re a sensible person, but you probably thought this was a good idea at one point
@seangwright
What is a framework?
@seangwright
Framework: some definitions
@seangwright
A framework calls you! Your application is features and business logic, not the framework.
@seangwright
What is a Feature?
@seangwright
Feature: some definitions
@seangwright
Comments or questions?
@seangwright
Framework:��ASP.NET MVC 5
Features:
@seangwright
Focusing on the Framework’s features was an Anti-Pattern
@seangwright
Some project layout examples
@seangwright
MVC was the feature when it came out: https://www.codeguru.com/csharp/article.php/c18167/Top-7-Features-of-the-ASPNET-MVC-Framework.htm�
@seangwright
Some other examples of building by framework (or architectural) features
Building by Framework features
Building by Architectural features
@seangwright
File -> New Project -> ASP.NET Core -> MVC (with User Accounts)
Did they fix it in ASP.NET Core?
Nope!
… well kinda
@seangwright
New Razor Pages project (ASP.NET Core 2.1+)
File -> �New Project -> �ASP.NET Core ->�Web Application (Razor Pages)
Much better!
Want a Resuable/Composable UI?
Razor Class Library!
https://docs.microsoft.com/en-us/aspnet/core/mvc/razor-pages/ui-class?view=aspnetcore-2.1&tabs=visual-studio
@seangwright
Comments or questions?
@seangwright
Why focus on your business’s features?
@seangwright
Why focus on your business’s features?
@seangwright
Why focus on your business’s features?
@seangwright
Comments or questions?
@seangwright
Now for some code ...
@seangwright
Some thoughts
@seangwright
Some thoughts
@seangwright
Links and references (.NET)
@seangwright
Links and references (.NET)
@seangwright
Links and references (.NET Core)
@seangwright
Links and references (Other)
@seangwright
In Summary
@seangwright
Comments or questions?
… you thought there’d be a funny gif here, didn’t you?
@seangwright
No more slides.
Thanks!
@seangwright