• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Bigger Stronger Faster
 

Bigger Stronger Faster

on

  • 908 views

Things I have learned over the years through experience of having to deliver code rapidly, with few defects and maximum functionality. I cover basic coding techniques, automated testing and sometimes ...

Things I have learned over the years through experience of having to deliver code rapidly, with few defects and maximum functionality. I cover basic coding techniques, automated testing and sometimes I have enough time to review tools and code generation!

Statistics

Views

Total Views
908
Views on SlideShare
907
Embed Views
1

Actions

Likes
0
Downloads
2
Comments
0

1 Embed 1

http://blog.naver.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Bigger Stronger Faster Bigger Stronger Faster Presentation Transcript

    • Making Quality .NET Applications Fast and Bug Free Chris Love ProfessionalASPNET.com Twitter.com/ChrisLove FaceBook.com/ProfessionalASPNet
    •  
    • Code Complete * The Art of Unit Testing * Pragmatic Programmer
      • Built over 300 ASP.NET sites
        • Required Speed to Market
        • Reduced Number of Potential Bugs
        • Ease to Maintain and Extend
        • Ability to Adjust on a Dime
      • Bigger – Solid Application Architecture
      • Stronger Sites – Fewer Bugs
      • Faster – Confidently Create Code Faster
      • Build Orthogonal Applications
      • True Layers
      • Don’t Repeat Yourself (DRY)
      • Build a Knowledge Portfolio
      • Eliminate Effects between Unrelated
      • Reduce Risks
      • Testing
      • protected void btnCalc_Click(object sender, EventArgs e)
      • {
      • // Line after line of business logic
      • // ...
      • }
      • protected void btnCalc_Click(object sender, EventArgs e)
      • {
      • BusinessClass.DoWork(...);
      • }
      • Data – SQL
      • Business – C#/VB.NET
      • UI
        • HTML
        • JS/AJAX
        • CSS
      • Knowledge of Http
      • public CustomEntity GetCustomEntity(int CustomEntityID, bool IsActive)
      • {
      • SqlDatabase sqlDb = new SqlDatabase(siteConnectionString);
      • DbCommand dbCommand = sqlDb.GetStoredProcCommand("spGetCustomEntity");
      • CustomEntity custEntity = new CustomEntity();
      • sqlDb.AddInParameter(dbCommand, "@CustomEntityID", DbType.Int32, CustomEntityID);
      • sqlDb.AddInParameter(dbCommand, "@IsIncident", DbType.Boolean, IsIncident);
      • using (IDataReader dr = sqlDb.ExecuteReader(dbCommand))
      • {
      • while (dr.Read())
      • {
      • //...
      • }
      • }
      • return custEntity;
      • }
      • public ICustomEntity GetCustomEntity(int vCustomEntityId)
      • {
      • CustomEntity lCustomEntity = null;
      • using (SafeDataReader dr = new SafeDataReader(
      • ExecuteReader("spGetCustomEntity", CommandType.StoredProcedure, "@CustomEntityID", vCustomEntityId)))
      • {
      • lCustomEntity = CustomEntityRepositoryHelper.BindCustomEntity(dr, true, this);
      • }
      • return lCustomEntity;
      • }
      • ADO.NET - DAAB
        • ExecuteNonQuery
        • ExecuteReader
        • ExecuteScalar
        • ExecuteDataSet
      • public SqlDataReader ExecuteReader(string sProc, CommandType ct, SqlParameter[] arParam)
      • {
      • Database database = DatabaseFactory.CreateDatabase(ConnectionString);
      • DbCommand storedProcCommand = database.GetStoredProcCommand(sProc);
      • if (null != arParam)
      • {
      • foreach (SqlParameter parameter in arParam)
      • {
      • database.AddInParameter(storedProcCommand, parameter.ParameterName,
      • parameter.DbType, parameter.Value);
      • }
      • }
      • return (SqlDataReader)database.ExecuteReader(storedProcCommand);
      • }
      • Linq
        • FirstOrDefault(ObjectQuery<TEntity>)
        • ToList(ObjectQuery<TEntity>)
        • ToDictionary(ObjectQuery<TEntity>)
        • ToArray(ObjectQuery<TEntity>)
      • TEntity ExecuteFirstOrDefault(ObjectQuery<TEntity> objQuery){
      • //Custom Work…
      • return objQuery.FirstOrDefault();
      • }
      • Automated Testing
        • Unit Testing
        • Integration
        • Web/Acceptance Testing
      • No Excuses Anymore
      • It’s not that hard
      • Requires a slight Paradigm Shift
      • Requires More Time Up Front, but Reduces Ultimate Time to Market
      • Refactor Coding Methodologies
      • Small Units of Work that can be independently Tested
      • Mocking, IoC
      • Testing a Complete Unit of Work
      • Typically including Dependencies like Databases and the File System
      • A Common Way To Ease into Automated Testing
      • Automated Tools to Automatically Test Application
      • CodeRush, Refactor, R#
      • Code Generators
        • Code Smith
        • Code Breeze