Search
Wednesday 21 August 2019
  • :
  • :

Microsoft Build Systems: Automation is the Way to Go!

Microsoft Build Systems:  Automation is the Way to Go!

Don’t you love when Developers talk about what helps them write better code?  We do!

When you are a .NET developer is it important to stay up on the latest. When you are a Software Development company you need to know that your teams are keeping up with the latest and greatest ways to ensure their code is top-notch!

Developer’s blogs are just the place to validate what Microsoft shares as their latest and greatest tools.

According to MSDN:

Microsoft Fakes help you isolate the code you are testing by replacing other parts of the application with stubs or shims. These are small pieces of code that are under the control of your tests. By isolating your code for testing, you know that if the test fails, the cause is there and not somewhere else. Stubs and shims also let you test your code even if other parts of your application are not working yet.

Fakes come in two flavors:

    • A stub replaces a class with a small substitute that implements the same interface. To use stubs, you have to design your application so that each component depends only on interfaces, and not on other components. (By “component” we mean a class or group of classes that are designed and updated together and typically contained in an assembly.)
    • A shim modifies the compiled code of your application at run time so that instead of making a specified method call, it runs the shim code that your test provides. Shims can be used to replace calls to assemblies that you cannot modify, such .NET assemblies.

According to Chris Missal of Los Techies.com :FAKE It Till You Make it

“I’ve been studying build systems in .NET recently. I believe that automation is one of the most important pieces to any successful software project. Previously I wrote about Cake and how I liked the ease of use as well as how nice it was to contribute to the project. I mentioned in the comments of that post that I would be blogging about FAKE as well.”

Questions about FAKE:

  1. Who Shouldn’t be using FAKE?  Well, According to Chris If you are a Pro at PowerShell, and you can whip up some PS code in record time, FAKE may not be helpful for you. PowerShell is such a powerful language and it can do a menagerie of amazing things, no need to change.  But, if you have problems with using PowerShell at it’s full benefits, then you may want to look at FAKE.
  2. You Don’t want to Write F: If you are not proficient in F# you can still benefit from FAKE.  It does not require a deep understanding of F# for FAKE. Yes, but, it’s a DSL built on F# and writing FAKE is much different.  Many would say it is easier than writing F#.
  3. JavaScript investors may not want to give FAKE a try.  JavaScript is loved by many, as the go-to build language, but these approaches require a bit more setup than your standard .NET build scipt.  FAKE can be downloaded via NuGet, and you are up and running.  Because, you and I know, that JavaScrip dependences aren’t always  ideal for a project because of it’s possible that the only JS is in the build.

Why Should you be using FAKE?

According to Chris… and many other .NET devs out there:

  1. It’s the best in breed in .NET. With many build tools out there, they believe FAKE is one of the winners.  There is a large community around it with the most built-in features.  It’s actively maintained (always a plus with language tools) and it runs on Linux.
  2. Need assistance with this?  Yes, there are plenty of options to get help with great documentation.  And if you are on GitHub, or Google or Stackoverflow, the responses are very helpful and detailed.  And of course the F# community, they are there to help as well.
  3. Efficiency is the key to writing FAKE scripts.  The .NET devs believe with the 100+ helpers scripts , it’s pretty much a situation where you can put together the building blocks in the order and direction you want them.

 

Basically, Developers need to use the latest tools to ensure their coding is efficient and high quality.  FAKE is one of those tools that people say “Why wasn’t I using this long ago?”.  If your devs are struggling with PowerShell, give FAKE a try.

 

Let’s look at this from the client-side of the equation:  What does using FAKE mean to them?

  1. Quicker more efficient coding means client projects get done faster and part of the way tested (using scripts that are already tried and true means they have already been tested in other situations) this may speed up the development of the project.
  2. Using the right tools to ensure your applications are high-quality is what you need to look for when evaluating a  partner for outsourcing Software Development.

 

 

 

 




Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.