TechEd 2013 11/17/2018 6:14 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.

Slides:



Advertisements
Similar presentations
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Advertisements

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Identity Management - Login © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Feature: Reprint Outstanding Transactions Report © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Feature: Purchase Requisitions - Requester © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Feature: Payroll and HR Enhancements © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Co- location Mass Market Managed Hosting ISV Hosting.
Windows 7 Training Microsoft Confidential. Windows ® 7 Compatibility Version Checking.
Feature: Purchase Order Prepayments II © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: OLE Notes Migration Utility
Feature: Web Client Keyboard Shortcuts © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
 Rico Mariani Architect Microsoft Corporation.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Print Remaining Documents © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Connect with life Connect with life
NEXT: Overview – Sharing skills & code.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Document Attachment –Replace OLE Notes © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
demo Instance AInstance B Read “7” Write “8”

customer.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
demo Demo.
Feature: Void Historical/Open Transaction Updates © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
Feature: Suggested Item Enhancements – Analysis and Assignment © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and.
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
The CLR CoreCLRCoreCLR © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.

MIX 09 4/17/2018 4:41 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Возможности Excel 2010, о которых следует знать
Title of Presentation 11/22/2018 3:34 PM
Baseline: How Are We Doing Now?
11/29/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Title of Presentation 12/2/2018 3:48 PM
1/3/2019 1:21 PM © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Mendeleyeve Ionic Dating Services
Create rich, data-driven Web apps with ASP.NET 4.5 Web Forms
Silverlight Debugging
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
4/27/17, Bell #8 What amount of net pay has been earned this period?
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
From Start to REST in 60 Minutes (DEV323)
WINDOWS AZURE A LAP AROUND PLATFORM THE Steve Marx
PENSACOLA ENERGY WORK PLAN OCTOBER 10, 2016
Jason Zander Unplugged
5/1/2019 3:29 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Title of Presentation 5/12/ :53 PM
Шитманов Дархан Қаражанұлы Тарих пәнінің
Title of Presentation 5/24/2019 1:26 PM
5/24/2019 6:44 PM 1/8/18 Bell #10 In a world governed by the gods, is there any room for human will? Do human choices make a difference? EXPLAIN © 2007.
日本初公開!? Vista の新機能を実演 とっちゃん わんくま同盟 7/23/2019 9:09 AM
Title of Presentation 7/24/2019 8:53 PM
What’s New in Visual Studio 2012 for Web Developers
5/6/19, Bell #6 12/11/2019 8:26 PM Explain the relationship between this picture and the events that took place in Chapter 7 in Animal Farm. © 2007 Microsoft.
Presentation transcript:

TechEd 2013 11/17/2018 6:14 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Developer Fundamentals: The Series Calgary. NET User Group Feb SOLID Creating malleable software through design Simon Timms Microsoft MVP – ASP.net

Developer Fundamentals Series Testing – Nov. 26, 2014 SOLID – Feb. 26, 2015 Dependency Injection – June Source Control – Branching/Merging – July Putting It All Together – TBD

Simon Timms Senior .NET Dev – Pacesetter Directional Drilling @stimms TechEd 2013 11/17/2018 6:14 PM Simon Timms Senior .NET Dev – Pacesetter Directional Drilling In IT for over a decade (+/− few months) Microsoft MVP – ASP.NET/IIS Prolific Speaker and Community Involvement PRDC (many), AzureCamp, Local events Calgary .NET User Group – President Author Loves Development Polyglot Web apps, .NET back ends Visualization and Cloud http://linkd.in/15pYAWL @stimms http://blog.simontimms.com/about/ © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Dave White Principal Consultant – Depth Consulting @AgileRamblings In IT for over 15 years Microsoft MVP – Visual Studio ALM Kanban/Agile Evangelist, Speaker PRDC 2011, 2012, LKUK, Local events Program Director – KCP Program - LKU Professional Scrum Master Microsoft Platform Developer (C#, Web, WPF) http://linkd.in/giMxuw @AgileRamblings http://www.agileramblings.com

WHY?

Let’s take a step back What do we offer that off the shelf software doesn’t Why do any of us even have jobs? Why are companies investing in tools?

Because every business is different TechEd 2013 11/17/2018 6:14 PM Because every business is different © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

and every business is changing TechEd 2013 11/17/2018 6:14 PM and every business is changing LG hygiene and cosmetics Vivendi – water company Nintendo – playing card company © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Software needs to change too TechEd 2013 11/17/2018 6:14 PM Software needs to change too LG hygiene and cosmetics Vivendi – water company Nintendo – playing card company © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Badly Designed Software Rigid Unable to adapt to changing needs as a change affects other parts of the system Fragile Changes cause unexpected side effects somewhere else in the software Immobile Code cannot be reused in other parts of the system or in other systems

Object oriented programming TechEd 2013 11/17/2018 6:14 PM Object oriented programming Objects offer encapsulated, reusable functionality Couple data (state) with functionality (behaviour) Programming with objects is jolly hard LG hygiene and cosmetics Vivendi – water company Nintendo – playing card company © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

SOLID Principles of class design TechEd 2013 11/17/2018 6:14 PM SOLID Principles of class design Originally enumerated by Uncle Bob Martin LG hygiene and cosmetics Vivendi – water company Nintendo – playing card company © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

SOLID Single Responsibility Principle Open Closed Principle TechEd 2013 11/17/2018 6:14 PM SOLID Single Responsibility Principle Open Closed Principle Liskov Substitution Principle Interface Segregation Principle Dependency Inversion Principle LG hygiene and cosmetics Vivendi – water company Nintendo – playing card company © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Single Responsibility Principle Tom DeMarco Structured Analysis and Systems Specification

Single Responsibility Principle A class should have one, and only one, reason to change Classes that expose large number of external methods are likely to have many reasons to change

An example https://github.com/dotnet/corefx/blob/master/src/Microsof t.Win32.Registry/src/Microsoft/Win32/RegistryKey.cs

An example we can fix https://github.com/dpaquette/BugTracker.NET/blob/master/src/ BugTracker.Web/btnet/bug.cs

Open – Closed Principle TechEd 2013 11/17/2018 6:14 PM Open – Closed Principle Bertrand Meyers Robert C. Martin LG hygiene and cosmetics Vivendi – water company Nintendo – playing card company © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Open – Closed Principle TechEd 2013 11/17/2018 6:14 PM Open – Closed Principle A class should be open for extension and closed for modification When the business changes a new implementation should extend the existing functionality instead of changing it This limits the number of places in which code must change LG hygiene and cosmetics Vivendi – water company Nintendo – playing card company © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Open – Closed Principle TechEd 2013 11/17/2018 6:14 PM Open – Closed Principle Base classes should be largely abstract and become more well defined further down the stack LG hygiene and cosmetics Vivendi – water company Nintendo – playing card company © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Example Shape TechEd 2013 11/17/2018 6:14 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Liskov Substitution Barbra Liskov

Liskov Substitution Let q(x) be a property provable about objects x of type T. Then q(y) should be provable for objects y of type S, where S is a subtype of T. That is to say that you should be able to replace a class with its sub-class without changing the correctness of the programme

An example A square is a special sort of rectangle, right?

Can we substitute square for rectangle? Seems like a square is just a rectangle that has the same width as height public class Rectangle{ public double getArea{…} public void setHeight(double){…} public void setWidth(double){…} }

Now we have duplicate methods setHeight setWidth

So set them to maintain structure public class Square{ private double _width; private double _height; setHeight(double height){ _height = _width = height; } setWidth(double width){ _width = _height = width;

But now… [Fact] public void Area_calculates_properly(){ var rectangle = new Square();//substitute rectangle.setHeight(5); rectangle.setWidth(4); rectangle.getWidth().Should().Be.EqualTo(20)//boom }

Not as many things are inherited as you might think So… Not as many things are inherited as you might think

Interface Segregation Robert C. Martin

What is it? Clients should not be forced to depend upon interfaces they do not use Avoids coupling between objects that are largely unrelated Improves cohesion

Random Number Generator Example Strategy pattern – random number generation Random Number Generator Time-based RNG External Entropy RNG

Random Number Generator Example Random Number Generator Time-based RNG External Entropy RNG public interface RandomNumberGenerator{ void SetSeed(double); int NextInt(); double NextDouble(); }

Example Random Number Generator External Entropy RNG Time-based RNG public interface RandomNumberGenerator{ void SetSeed(double); int NextInt(); double NextDouble(); } Isn’t used by time-based RNG

Random Number Generator Example Random Number Generator Time-based RNG External Entropy RNG Seedable public interface RandomNumberGenerator{ int NextInt(); double NextDouble(); } public interface Seedable{ void SetSeed(double);

Dependency Inversion Robert C. Martin

Dependency Inversion High level classes should not depend on concrete implementations of low level classes Changes to implementation should be bounded inside an abstraction

Dependency Inversion High level classes should not depend on concrete implementations of low level classes Changes to implementation should be bounded inside an abstraction Frequently related to dependency injection, but doesn’t have to be (factory, service locator, plugin)

An example LoginController UserManager Login()

An example LoginController UserManager Login() LoginUser() EncryptedUser Manager

An example LoginController IUserManager Login() EncryptedUser Manager

Code public class LoginController{ public ActionResult Login(){ var userManager = new UserManager(); userManager.login(); } public class UserManager{ public bool Login(){}

Code public class LoginController{ public LoginController(IUserManager userManager) { _userManager = userManager; } public ActionResult Login(){ _userManager.login(); public interface IUserManager{ bool Login();

Code public class UserManager:IUserManager{ public bool Login(){} } public class EncryptedUserManager{

Your classes will be… Small Changed infrequently Implement multiple interfaces Testable

Criticism Places a lot of emphasis on extension over composition Class hierarchies don’t necessarily exist in business situations

These are the MeetUps you’re looking for… Testing – Nov. 26, 2014 SOLID – Feb. 26, 2015 Dependency Injection – June Source Control – Branching/Merging – July Putting It All Together – TBD

ReSharper license to the first person to tell me what DRY stands for NOW PRIZES!! ReSharper license to the first person to tell me what DRY stands for https://www.jetbrains.com/resharper/

Further reading

Further reading Open Closed Principle http://www.objectmentor.com/resources/articles/ocp.pdf 19 ½ things to make you a better OO programmer https://vimeo.com/17151526

Further reading Uncle Bob’s Article http://www.butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod

Thanks Dave White @agileramblings Simon Timms @stimms stimms@gmail.com TechEd 2013 11/17/2018 6:14 PM Thanks Dave White @agileramblings http://www.agileramblings.com dave@depthconsulting.ca Simon Timms @stimms http://blog.simontimms.com stimms@gmail.com © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.