Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Three web frameworks       All .NET      One hour          Go                       Christian Horsdal                     ...
Thanks to the sponsors
Who Am I?•   Lead Software Architect @ Mjølner Informatics•   Denmark•   Husband and Father•   Some who enjoys    –   Clea...
Why?• There are alternatives to ASP.NET    – Even on .NET    – Know them!• Style matters• Tradeoffs, tradeoffs, tradeoffs ...
Why?• Run anywhere• IoC/DI to the bone• Embrace HTTP• OSS and community driven
What will you learn?A taste of some alternatives                    • FubuMVC                    • OpenRasta              ...
Sample
FubuMVC – At a glance• One Model In One Model Out   – Aka OMIOMO   – Aka Russian Doll• Convention over Configuration• Real...
FubuMVC – ShortUrl OverviewGET “/”   • No params          HomeController                            • Returns HomeViewMode...
FubuMVC – ShortUrl OverviewPOST “/”    • UrlShorteningModel           HomeController     • Takes UrlShorteningModel       ...
FubuMVC – ShortUrl OverviewGET “/42”            • ShortenedUrlModel                                     • Takes ShortenedU...
FubuMVCShow me the code!
OpenRasta– At a glance• Three things:  – Resources  – Handlers  – Codecs• Automatic conneg• Everything is POCOs
OpenRasta – Shorturl Overview• Resource:  – “/”                        GET “/”   POST “/”   GET “/42”  – “/{shortenedUrl}”...
OpenRasta – Shorturl Overview• Handler  – HomeHandler                      Home resource                      HomeHandler
OpenRasta – Shorturl Overview                          GET “/”     POST “/”      GET “/42”• “Codecs”                      ...
OpenRastaShow me the code!
Nancy– At a glance• Lightweight, low ceremony   – Just works   – But easily swappable   – DSLs• Built in diagnostics• Auto...
Nancy – Shorturl Overview• Modules – ShortUrlModule                     HTTP              Handler                         ...
Nancy – Shorturl Overview• Routes  – Get[“/”]  – Post[“/”]               HTTP              Handler                        ...
Nancy – Shorturl Overview                       HTTP              Handler                                Routes           ...
NancyShow me the code!
Why, again? There are alternatives to ASP.NET    Know them! Style matters Tradeoffs, tradeoffs, tradeoffs
What might you have learned?  A taste of some altenatives                • FubuMVC                    – OMIOMU            ...
FubuMVC, OpenRasta, NancyWHEN, WHAT, WHERE?
Please rate this sessionScan the code, go online, rate this session                                                  Chris...
Upcoming SlideShare
Loading in …5
×

Three Other Web Frameworks. All .NET. All OSS. One Hour. Go

2,348 views

Published on

In the .NET space the overwhelming majority of web projects are built with ASP.NET in one form or another. But there are alternatives. Alternatives that offer other approaches, and supports other ways of thinking.Alternatives that are open source. Altenratives that run on Mono. Maybe one of those alternatives is the better fit for your next project - except if you don't know about them you will never know. In this code heavy talk I'll show the same sample application in the three Open Source .NET web frameworks FubuMVC, OpenRasta, and Nancy. You will not become an expert at anything by attending this talk - but you may discover just the right web framework for your next project.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Three Other Web Frameworks. All .NET. All OSS. One Hour. Go

  1. 1. Three web frameworks All .NET One hour Go Christian Horsdal @chr_horsdal horsdal.blogspot.com
  2. 2. Thanks to the sponsors
  3. 3. Who Am I?• Lead Software Architect @ Mjølner Informatics• Denmark• Husband and Father• Some who enjoys – Clean code – TDD’ing – When Denmarks wins at football – Simplicity – Whisky
  4. 4. Why?• There are alternatives to ASP.NET – Even on .NET – Know them!• Style matters• Tradeoffs, tradeoffs, tradeoffs – Conventions <-----> explicitness – DRY <-----> separation of concerns – Abstract <-----> concrete
  5. 5. Why?• Run anywhere• IoC/DI to the bone• Embrace HTTP• OSS and community driven
  6. 6. What will you learn?A taste of some alternatives • FubuMVC • OpenRasta • Nancy
  7. 7. Sample
  8. 8. FubuMVC – At a glance• One Model In One Model Out – Aka OMIOMO – Aka Russian Doll• Convention over Configuration• Really cool built-in diagnostics• Everything is POCOs
  9. 9. FubuMVC – ShortUrl OverviewGET “/” • No params HomeController • Returns HomeViewModel .get_Home HomeView.cshtml • Takes HomeViewModel
  10. 10. FubuMVC – ShortUrl OverviewPOST “/” • UrlShorteningModel HomeController • Takes UrlShorteningModel .post_Home • Returns UrlShorteningViewModel post_url_result.cshtml • Takes UrlShorteningVM
  11. 11. FubuMVC – ShortUrl OverviewGET “/42” • ShortenedUrlModel • Takes ShortenedUrlMode HomeController.get_Url • Returns FubuContinuation
  12. 12. FubuMVCShow me the code!
  13. 13. OpenRasta– At a glance• Three things: – Resources – Handlers – Codecs• Automatic conneg• Everything is POCOs
  14. 14. OpenRasta – Shorturl Overview• Resource: – “/” GET “/” POST “/” GET “/42” – “/{shortenedUrl}” – Home
  15. 15. OpenRasta – Shorturl Overview• Handler – HomeHandler Home resource HomeHandler
  16. 16. OpenRasta – Shorturl Overview GET “/” POST “/” GET “/42”• “Codecs” Home resource – WebForms viewengine HomeHandler – Form data
  17. 17. OpenRastaShow me the code!
  18. 18. Nancy– At a glance• Lightweight, low ceremony – Just works – But easily swappable – DSLs• Built in diagnostics• Automatic conneg• Testability is first class
  19. 19. Nancy – Shorturl Overview• Modules – ShortUrlModule HTTP Handler Routes Response request function
  20. 20. Nancy – Shorturl Overview• Routes – Get[“/”] – Post[“/”] HTTP Handler Routes Response request function – Get[“/{shortenedUrl}”]
  21. 21. Nancy – Shorturl Overview HTTP Handler Routes Response request function• A lambda for each
  22. 22. NancyShow me the code!
  23. 23. Why, again? There are alternatives to ASP.NET  Know them! Style matters Tradeoffs, tradeoffs, tradeoffs
  24. 24. What might you have learned? A taste of some altenatives • FubuMVC – OMIOMU • OpenRasta – Resources, Handlers, Codecs • Nancy – DSL
  25. 25. FubuMVC, OpenRasta, NancyWHEN, WHAT, WHERE?
  26. 26. Please rate this sessionScan the code, go online, rate this session Christian Horsdal @chr_horsdal horsdal.blogspot.com

×