1 / 128

A Modern Architecture Review

A Modern Architecture Review. Using Code Review Tools. @ AdamCogan | # vsalm #tee12 #dev324. Agenda. #1 The 1 st things to look out for Processes Does it work? Documentation #2 High Level tools Architecture Code Analysis Code Metrics #3 Manual Checking SOLID Design Principles

crwys
Download Presentation

A Modern Architecture Review

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Modern Architecture Review Using Code Review Tools @AdamCogan | #vsalm #tee12 #dev324 Delivering Awesome Web Applications

  2. Agenda #1 The 1st things to look out for • Processes • Does it work? • Documentation #2 High Level tools • Architecture • Code Analysis • Code Metrics #3 Manual Checking • SOLID Design Principles • Code Review tools

  3. About Adam • Chief Architect at SSW • Developing custom solutions for businesses across a range of industries such as Government, banking, insurance • Microsoft Gold Partner • Microsoft Regional Director • VSTS MVP • @AdamCogan

  4. I Believe

  5. The first things to look out for

  6. Do you evaluate the processes? • Often times this is the source of problems • Are devs getting bogged down in the UI? • Do you have a Scrum Master? • Do you have continuous integration? • Do you have continuous deployment? • Do you have a Schema Master? • Do you have a TFS Master? http://rules.ssw.com.au/SoftwareDevelopment/RulestobetterArchitectureandCodeReview/Pages/DoYouHaveTheDesignersFixingUpTheUI.aspx

  7. Are they on the latest version? • …of VS • …of TFS • Alternatively for a ‘Gold Star’ … • Resharper, add-ins, extensions http://rules.ssw.com.au/SoftwareDevelopment/RulestobetterArchitectureandCodeReview/Pages/CanYouGetLatestAndCompile.aspx

  8. Can you ‘Get latest’ and compile? #L1 • It's amazing how often you can't simply do a "Get Latest" and compile • Add _Instructions_Compile.docx • Then run unit tests… http://rules.ssw.com.au/SoftwareDevelopment/RulestobetterArchitectureandCodeReview/Pages/CanYouGetLatestAndCompile.aspx

  9. Can you get latest and compile? #L1 • See the Integration.Test project fail • Add _Instructions_Compile.docx http://rules.ssw.com.au/SoftwareDevelopment/RulestobetterArchitectureandCodeReview/Pages/CanYouGetLatestAndCompile.aspx

  10. Can you get latest and compile? #L2 • Creation of the database via scripts (incremental)Tip: use OSQL, SQLCMD or SSW SQL Deploy • and re-run the tests. They will now pass.

  11. Do you want a ‘Gold Star’ ? #L3 • Streamline setup of a new development environment • Problems to check for: • Windows 8 not supported • Many things to build • Lots of dependencies • Recommendation: All manual work station setup steps should be scripted with PowerShell • Recommendation: A get + compile should work within 1 minute, and work without a dev being on the domain (to support external consultants)

  12. Figure: You see the problems in the devsenvironmentNote Prefix eg. _01Setup-Environment.ps1 PS C:\Code\Northwind> .\Setup-Environment.ps1 Problem: Azure environment variable run state directory is not configured (_CSRUN_STATE_DIRECTORY). Problem: Azure Storage Service is not running. Launch the development fabric by starting the solution. WARNING: Abandoning remainder of script due to critical failures. To try and automatically resolve the problems found, re-run the script with a -Fix flag.

  13. Figure: The script tries to automatically fix the problems PS C:\Code\Northwind> .\Setup-Environment.ps1 -fix Problem: Azure environment variable run state directory is not configured (_CSRUN_STATE_DIRECTORY). Fixed: _CSRUN_STATE_DIRECTORY user variable set Problem: Azure Storage Service is not running. Launch the development fabric by starting the solution. WARNING: No automated fix available for 'Azure Storage Service is running' WARNING: Abandoning remainder of script due to critical failures.

  14. Figure: Note on 2nd run only 1 script remains – see there is less to fix PS C:\Code\Northwind> .\Setup-Environment.ps1 -fix Problem: Azure Storage Service is not running. Launch the development fabric by starting the solution. WARNING: No automated fix available for 'Azure Storage Service is running' WARNING: Abandoning remainder of script due to critical failures.

  15. Can you ‘Check In’ and Deploy #L1 • Add _Instructions_Deploy.docx • Alternatively for a ‘Star’ … http://rules.ssw.com.au/SoftwareDevelopment/RulestobetterArchitectureandCodeReview/Pages/Default.aspx

  16. Can you ‘Check In’ and Deploy #L2 • Use PowerShell scripts as your documentation • build.ps1 • deploy_dev.ps1 • deploy_test.ps1 • deploy_prod.ps1 • Alternatively for a ‘Gold Star’ … TFSBuild + Portal http://rules.ssw.com.au/SoftwareDevelopment/RulestobetterArchitectureandCodeReview/Pages/Default.aspx

  17. Can you ‘Check In’ and Deploy #L2TFSBuild + Portal

  18. Do you review the Solution and Project names? • The name of your solution and the names of the project in your solution should be consistent http://rules.ssw.com.au/SoftwareDevelopment/RulestobetterArchitectureandCodeReview/Pages/DoYouReviewTheSolutionName.aspx

  19. Do you review the documentation? • Old School: • Heavy, long documents • Sequence Diagrams • UML http://rules.ssw.com.au/SoftwareDevelopment/RulestobetterArchitectureandCodeReview/Pages/DoYouReviewTheDocumentation.aspx

  20. Suggestions for doco eg. Enterprise Architect • Use Red for unimplemented stuff • Use the DateTime shape To see the last time the diagram was modified and by whom • Mark items as ‘TODO: Adam’. For items still pending

  21. Do you review the documentation • New School: • 4 docs • Business.docx • _Instructions_Compile.docx • _Instructions_Deploy.docx • Technologies.docx • Unit Tests (low level) • Code and Work Items (low level  PBI)

  22. Vote:

  23. High Level Tools

  24. Agenda #1 The 1st things to look out for • Processes • Does it work? • Documentation #2 High Level tools • Architecture • Code Analysis • Code Metrics #3 Manual Checking • SOLID Design Principles • Code Review tools

  25. Do you look at the architecture? • 2 Choices: • VS Dependency Graph or … ? • Ultimate Edition • nDepend? • 3rd Party Tool for a few hundred $ • Weak dependency graph • No need for VS Ultimate • Bonus: See problems in the ‘Queries + Rules Explorer’ http://rules.ssw.com.au/SoftwareDevelopment/RulestobetterArchitectureandCodeReview/Pages/DoYouLookAtTheArchitecture.aspx

  26. My Dream

  27. My Dream – instead of this

  28. My Dream – it automatically does this

  29. Great Overview tool and learning toolNot for day-to-day use as a code analysis tool.Note: Don’t be distracted by a colour problem 

  30. Do you use the best Code Analysis tools? http://rules.ssw.com.au/SoftwareDevelopment/RulestobetterArchitectureandCodeReview/Pages/DoYouDoCodeAnalysis.aspx

  31. Do you use the best Code Analysis tools? • Level 1 – ReSharper – All Rules • Level 2 - VS Code Analysis (FXCop) – Default Settings • Level 3 - VS Code Analysis (FXCop) – All Rules • Level 4 – StyleCop – All Rules • Level 5 – SSW Code Auditor – All Rules? http://rules.ssw.com.au/SoftwareDevelopment/RulestobetterArchitectureandCodeReview/Pages/DoYouDoCodeAnalysis.aspx

  32. Do you use the best Code Analysis tools? http://rules.ssw.com.au/SoftwareDevelopment/RulestobetterArchitectureandCodeReview/Pages/DoYouDoCodeAnalysis.aspx

More Related