Upload
vincent-mckenzie
View
33
Download
1
Embed Size (px)
DESCRIPTION
KEA September 22 2011. Real Life ASP.MVC. Christian Dalager, Eksponent ApS. Me. .NET developer, Eksponent ApS Lead on Arena365.com C#, Ruby, Java, PHP, Perl Background in Nordic Language and Literature + IT University. ASP.NET MVC. MVC a what??. Model View Controller design pattern - PowerPoint PPT Presentation
Citation preview
Me.NET developer, Eksponent ApS
Lead on Arena365.com
C#, Ruby, Java, PHP, Perl
Background in Nordic Language and Literature + IT University
MVC partsView• Webforms view engine <%= ”yay” %>• Alternatives: Razor (MVC3), Spark,Nhaml
Controller• Core framework• public class MyController: BaseController{}
Model• ... nothing...
The Missing MNo builtin database/persistence features
Lots of options• Entity Framework / linq2sql• NHibernate / Castle ActiveRecord• Subsonic• External services (WCF i.e)• Home made DataAccessLayer with SQL
statements (sooo 2003)
Arena365.comSocial tool for active lifestyle, for groups and individuals
Track your training, manage your teams
Google maps / Routes
Facebook Integration
Campaigns
7.500 users
Arena365
NHibernateDatabase
Repository
Service
Controllers
Console App
Windows service
Repository
Repository Repository
Service
Views
iCal
XML CSVJSON
Service
Facebook, RSS, Maps, Twitter, GetSatisfaction,
MailChimp.
CMS
Cache
ViewModels
Building blocksDI Containers
Logging
Caching
Error reporting
Mail sending
Facebook integration
iCal feeds
Import routes
Import RSS
CMS functionality
Security/ACL
Build scripts
UnitTests
Source Control
Show me the code!# lines of C# code (LOC) 17 157
# lines of comment 4 010
Percentage Comment 18%
# Assemblies 11
# Namespaces 112
# Types 1 185
# Methods 7 658
# Fields 3 284
Complex Systems are.. complex
Requirements change over time
Build for change
YAGNI (you aint gonna need it)
Pragmatism vs Idealism
http://www.iwaysoftware.com/solutions/by_integration/DataIntegrationSolutions.html
http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=linux&db=bks&fname=/SGI_EndUser/GC_Hdwr_UG/ch01.html
http://www.elbet.rs/sport_betting_software/
Skinny ControllersKeep your methods small
Keep your dependency count down
Keep your controllers skinny
Benefits• Reusability• Testability• The essentials may always fit your screen
Ask QuestionsHow big is this beast gonna get?!
How many entities do you have?
How many controllers will you need?
How long do you expect your app to live?
Are there many stakeholders that together define the project scope?
Will the project change directions before it’s done? (Funding will do this to you)
Is the project an exploratory journey or do you know exactly where you will end?
How many integrationpoints do you have?
Thank you. I love you <3
Blogdalager.com
Tweetstwitter.com/dalager
Source Code / Presentationbitbucket.org/dalager/
Job?job.eksponent.com/