Use fiddler to find possible security flaws eg posting again
“It's a common idiom that re-writing your software is the biggest mistake you will ever make, however in this instance keeping this code would be a bigger mistake.”
- Average pages/s
- Average page response time
Change Access to SQL Express.
If no VS Ultimate, then WCAT, JMeter (Java)
Tools and Methodologies
C# as easier to find devs
MVC as don’t intend to use Webworm's controls.
API (as need a method to accept SMS messages over HTTP) – JSON using Web API
Designing for Tablet – if a custom app, then need API access. So eat own dogfood, an.. possibly Knockout or Backbone.
Continuous deployment – deploy early and often
Testing – MSTest
ADT – Abstract DataType – collection of data and operations htat work on that data
CC (Code Complete)- A key to being an effective programmer is maximising the portion of a program that you can safely ignore while working on any one section of code. Classes are the primary tool for accomplishing that objective.
SRP – Single Responsibility Principle - There should never be more than one reason for a class to change.
Begin with a test
Nouns for property names
Code Smell: Most times you see a switch statement you should consider polymorphism.
Code: https://github.com/bbraithwaite/SmsQuiz/tree/First-Business-Logic delete the 2 files which are not there in the sln.
Business Logic 2
Use Domain Model rather than BLL (Business Logic Layer)
Adding Domain Events to Business Logic
No use Events.. so testable (will use IoC later)
Every IF statement you write is a potential bug.
Open / Closed Principle - Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification
Reviewing Domain Model
- Do you have enough Unit Test Coverage?
- Are you suffering from Feature Envy?
- Is your Code Too Expensive?
- Remember: Tell, Don't Ask!
- Scrutinise your Class Dependencies: new = Glue
- Why it's a good idea to use an EntityBase
- Are your unit tests crossing boundaries?
- Use Extension Methods to contain Generic Functions
- Unit Tests to the Rescue
85% code coverage
Tell, Don’t Ask
Consuming the Domain Model
Manual Implementation..pro’s and con’s
ORM Implementation..pros and cons
Dapper and EF
Make all layers work – Replace Service Layer with HTTP API
Creating the Web API
ASP.NET Web API – shipped with MVC4
Unit testing ASP.NET Web API (http://www.peterprovost.org/blog/2012/06/16/unit-testing-asp-dot-net-web-api)
Designing an MVC UI Layer for use with Web API