My Essential .NET and Web Tools and Frameworks - 2016

This is routinely the post that brings the most traffic to this blog, so I thought I’d update it for 2016. All new items are bolded.

Here is my (mostly) comprehensive list of tools I use for development, either at home or work.  It’s like Scott Hanselman’s, but focused almost purely on development, with a couple of extras.  While you’re at it, go check his out.  All opinions are my own and are not bought or sold.

The Main Stuff

Visual Studio – king of IDEs and the essential tool for .NET devs everywhere. Not much else to say except that it has a great starting toolset for any developer and amazing plugin support.  The Community edition gives the masses the power of the Professional SKU, for free.  Simply amazing and getting better with every release.

Visual Studio Code – Microsoft's cross-platform IDE has taken the lightweight-yet-extensible text editor world by storm. I use this on my Mac for developing ASP.NET Core apps, writing Markdown files, and just editing plain text files. Has almost totally replaced my use of Notepad++. The plugin system and rapid development turnaround is going to threaten the paid alternatives in a big way (Sublime, I'm looking at you).

Node Package Manager - best tool for installing your command-line dev tools and front-end frameworks. I use it in conjunction with Visual Studio and Visual Studio Code to do development across several stacks, including WebForms apps that I support.

SQL Server Management Studio – it ranges from a useful IDE for SQL to a huge time saver for things like table creation and script generation.  The DROP and CREATE tools are awesome for generating scripts for tables, stored procs and more.

LINQPad – the best .NET code scratchpad on the market. It's not just for writing LINQ queries - it's   It’s not a complete replacement for SQL Management Studio, but for complex queries with lots of data, it’s my first choice.  The Premium edition is a steal and makes this essential tool 5 times more useful with C# autocomplete, NuGet, cross-database query support, and debugging.

NimbleText – thanks to Scott Hanselman, I have found this program – and my new favorite way to write repetitive code or handle small or large data transformation tasks.  I’ve used it from everything from writing HTML to generating SQL insert scripts.  Its time-saving power cannot be overstated.  And, it’s FREE!

Fiddler – the essential tool for viewing and diagnosing HTTP requests that are happening on your machine.  Turn on SSL decryption and see previously-unknown HTTPS requests decrypted before your eyes.  Use it to view incoming and outgoing HTTP requests in real time.  Turn it into a proxy and send a device’s HTTP requests through it to test devices within your network.  Replay captured HTTP requests with its Composer system.  Fiddler’s amazing abilities cannot be overstated.  It’s helped me diagnose and fix more problems with HTTP services than any other tool.

dotPeek – my favorite way to decompile .NET code, free from JetBrains.  It even has the ability to break a .NET DLL/EXE down into a fully-structured Visual Studio project!

Postman (Chrome extension) – my second-favorite way to test HTTP services is Postman.  Postman has an easy-to-use interface and provides a straightforward way to make HTTP requests.

Google Chrome – I used to use Firefox exclusively, but stopped after it started feeling bloated, buggy, and crash-happy.  Chrome’s dev tools are better than Firebug, which I also found to be frustrating and slow.  Plus, it has much better plugin and app support.

PowerShell - easily the best scripting language on the Windows platform. Great scripting plus the power of the .NET Framework at your disposal when you need those extra awesome features. Also, recently made cross-platform!

Visual Studio add-ins

ReSharper – perhaps the most essential tool for .NET devs around the world.  Amazing refactoring that puts Visual Studio’s default refactoring capabilities to shame.  Code generation that makes writing constructors, methods, or pretty much anything a snap.  Search tools that makes navigation through code effortless.  A built-in test runner that makes running and viewing tests a breeze.  A code analysis tool to help you find mistakes and potential pitfalls in your code.  Built-in added support and intellisense for common frameworks such as ASP.NET MVC.  It is truly the god of all Visual Studio plugins.  Go download it and tell your friends.

OzCode – if you’re a C# developer, you need OzCode.  It turns debugging from a necessary chore to a borderline delight.  Break down code expressions, highlight the most needed data in an object, compare data between two objects, find all objects of a given type in memory, and exceptional exception handling make OzCode a star – and that’s just the tip of the iceberg.

Web Essentials – a great tool by Mads Kristensen of Microsoft – it’s his personal testbed for new web-based Visual Studio features.  Features things like quick HTML typing using ZenCoding, a link between the browser and Visual Studio for seeing immediate changes to your changed HTML/CSS, better Intellisense for CSS/HTML/JavaScript/Angular, and so much more.  Install it and watch your productivity in web development go to 10.

GhostDoc - best way to quickly write your XML code comments. Makes it so easy to annotate your code with comments about the code you're writing.

Source control

Git - the favorite source control solution for tons of developers. So prevalent that all recent Microsoft open source code is published to GitHub instead of their own internal SCM, Team Foundation Server. Most powerful learned with the command line or using tools such as...

SourceTree – a great visual tool for Git users.  Not perfect, but very helpful.

Languages

C# - my preferred backend language since the start of my career. So much power and ease in the language and in the .NET Framework. Made even more relevant with the recent introduction of .NET Core.

JavaScript - famously called the machine language of the web, it's the most critical language for any software engineer of all disciples and skill levels to master.

TypeScript - my preferred language for all JavaScript development I do. Embraces the weirdness of JavaScript while adding awesome features like a better type system, interfaces, and all of the features of any flavor of ECMAScript.

F# - simply the best .NET language in existence, F# is one of the best functional languages for any programmer to learn. Learning this will make you a better programmer no matter if you stick with object-oriented for the rest of your career.

Elm - Elm is both a functional language and a web framework. More functionally pure than F#, Elm boasts a lack of null, total immutability, and a promise of NO RUNTIME ERRORS, EVER. What other web/desktop/mobile framework/anything have you heard promise something like that?

Hosting

Microsoft Azure - the no-brainer hosting solution for .NET developers and, well, any developers for that matter. Runs Windows as well as it runs Linux, Unix, you name it. Amazing interface and tons of power - even has a RESTful API that you can use to spin up and maintain servers.

Frameworks

Web

ASP.NET Web API – built on top of MVC, Web API makes spinning up an RESTful API a breeze.  Host it in IIS or self-host on top of OWIN (this works great with Topshelf.)  Use it to power everything from your mobile app to your single-page application, powered by your favorite JavaScript frontend framework.  Versatile and fun to use.

Angular 2 – my SPA framework of choice. Simpler and faster than Angular 1. Very batteries included compared to React. Get started quickly and create awesome web apps around components using an easy-to-learn templating system. Combine with TypeScript for an awesome development experience.

React - amazing view library which has gotten a ton of love in the last couple of years. Combine it with your tooling of choice to create awesome web apps that scale well from a codebase perspective. Write your views in JavaScript using JSX and put the power of your HTML into your JS, as opposed to the other way around with Angular.

Redux - the Redux state container has emerged as the pattern/framework of choice for creating web apps using React. Extremely simple to understand and with a low API surface area, which means you can get started really quickly. Combine with Angular 2 using ngrx, a framework designed around the Redux pattern.

SignalR – the easiest and most powerful way to create an excellent realtime experience for the web or anything that can connect over HTTP.  I personally used it to power realtime text message communications between a Xamarin-powered mobile app as well as a desktop app.

Elm - Elm is both a functional language and a web framework. More functionally pure than F#, Elm boasts a lack of null, total immutability, and a promise of NO RUNTIME ERRORS, EVER. What other web/desktop/mobile framework/anything have you heard promise something like that?

Mobile

Xamarin – I don't do mobile anymore, but this was my personal favorite way to create an awesome mobile experience using the C# dev stack.  Completely free from Microsoft.  Use Xamarin.Forms to create mobile views for all major mobile platforms and share a 90% common codebase.

Data access

Entity Framework – my favorite way to access a database, period.  Use LINQ to communicate with your database, create your data views using attributed POCOs and easily update your model with Migrations.  It’s not for everyone, but it’s fast enough for most use cases and getting better every day.

Dapper – when I want a way to quickly access a database using SQL, Dapper has my back.  Deceptively simple API for what turns out to be a very fast way to access data.  Powers the data access layer behind StackExchange, one of the highest traffic websites on the planet.

General

Newtonsoft.JSON – the standard for JSON serializing and deserializing in .NET.  Used everywhere.  Go and buy him a beer – James Newton-King has made all of our lives easier.

TopShelf – when spinning up a Windows service using .NET, nothing is faster and easier than TopShelf.  Utilize its Fluent API to quickly and painlessly create a Window service, fast, in a manner that’s self-documenting.

RabbitMQ – when you need a reliable messaging queue for your suite of applications, RabbitMQ is a strong choice.  If using .NET,EasyNetQ makes the experience that much easier – it abstracts the most difficult parts away into message passing via POCOs.

Underscore.JS – my favorite JavaScript framework for object manipulation and collection traversing/ transformation.  It’s not as nice as LINQ, but it has a decent chaining syntax and is very feature-complete.  Lodash is another alternative that is drop-in compatible with some extra functions.

Moment.js – Dates in JavaScript are harder than they need to be.  Moment.js makes it that much less difficult by providing a simple and powerful date API.  Usually my second web project add-in (first being Underscore, of course.)

Little stuff

F.lux – changes the color temperature of your monitors at night.  A small thing but makes night programming much easier on the eyes.

Paint.NET – a fast, free paint tool written using .NET.

WinRAR – my choice for compression.  Yeah, I know Scott Hanselman recommends 7Zip, but 7Zip’s context menu requires two clicks – WinRAR’s only requires one I'm codger-y and like WinRAR. (Thanks for all those who pointed out that, in fact, you can configure 7Zip's context menu to require one click.)

Treesize Free – a great cleanup tool for those who have constrained hard drive space.

LastPass – a wonderful password manager that makes managing logins a much easier endeavor.  When you’re in IT, you know how crucial it is to keep track of passwords and LastPass makes that much much easier. 

Reddit– I subscribe to r/programming, r/dotnet and a handful of other useful programming-related subreddits.  Useful for a quick mid-day browse when you need to look away from Visual Studio for 5 minutes.

Hacker News – not necessarily programming focused, but it has some interesting tech-related topics.  I just started reading this recently.  Clearly, I’ve missed the party for a long time.

StackExchange– if StackExchange doesn’t have an answer to your programming question or problem, then you’re probably on your own.  Learn from the wisdom of others’ mistakes and find quick, elegant solutions to your programming problems.  Chase down those obscure exceptions.  If you haven’t used it, then you’ve never used Google to solve a problem.

Scott Hanselman’s Blog – Scott Hanselman is my main man.  His blog posts are always interesting and valuable and his contributions to the Microsoft dev world cannot be overstated.

Dew Drop – my favorite link aggregation site.  It’s my daily morning check.  (Morning Brew isn’t as comprehensive, but is still a decent resource.)

Communication/speaking/branding tools

Twitter - the best way to communicate with other professionals in your industry in a meaningful way.

Ghost (blogging platform) - recently replaced WordPress in my life. Ghost focuses on one thing and one thing well - creating a great blogging experience. I love the use of Markdown over a WYSIWIG editor. I love its pure speed over Wordpress.

Keynote/PowerPoint - two great tools for creating presentations. Avoid going overboard on the text though - I find that slides with a single thought/image/code snippet works best.

Trello - helps me keep track of all of my speaker submissions, my current talks, and any conferences I want to submit to. Useful for so much more.

Camtasia Studio - my favorite tool for recording screencasts and demonstrations. Expensive, but worth it if you do this kind of thing a lot. Open Broadcaster Software (OBS) is a free alternative.

Heartland Developer Conference 2016 Wrap Up

Another day, another conference - the fifth for me this year! I can't tell you how excited I am to continue my speaking career, and my latest stop was Heartland Developer Conference in Omaha, NE.

I was asked to submit to this one last-minute and was thrilled to have my Angular 2 and TypeScript talk accepted, along with a brand new talk on the Elm programming language, which is by far my new favorite frontend web framework (gasp!)

My talks

I did my Angular 2 and TypeScript talk to an audience of about 150. One challenge I faced was cutting it down from an hour to 45 minutes, but I ended up having a bit of time to spare. I spent some time beforehand improving my slide deck to cut out the excess words and rely on visuals or a key phrase.

One thing that I learned that I did early in my speaking career was using my slides as a crutch, e.g. I'd use the bullets to know what to talk about next. A friend told me that this is normal for new speakers, but I knew I wanted to do better. I really worked to eliminate this, because wordy slides aren't the ideal. After doing my Angular 2 talk for so long, I was pretty comfortable with the content and so it didn't take me much practice to deliver it without the wordy slides. Success!

The talk that I did on Elm was my proudest yet. I worked really hard to dial this one up to 11. The strategy/style for this talk was a mixture of some of my favorite speakers - Cory House (be entertaining, focus on selling the idea, and don't do live demos) and Jay Harris/Jeff Strauss (know your slides really well, transition naturally, and make your slide deck absolutely beautiful!)

Overall, I did a pretty good job, but I knew after I finished that I need a stronger closing. I also unintentionally rushed a bit, so I ended up with some extra time. One of the great benefits of being in the speaker community is the feedback you get from your peers. I was thrilled that Cory House was attending HDC, so I asked him to come to watch my Elm talk and critique it. He went so far as to take notes and was very thoughtful on things I could improve on. My friends Jon Mills and Ken Versaw also had some great suggestions. I can't wait to use their feedback to make my talks even better.

Session highlights

I wasn't able to attend any sessions this time, which really bummed me out, but hey - duty calls! However, I did catch the end of a couple of talks that were very popular. Namely:

Jon Mills' excellent talk on Habits of Highly Effective JavaScript Developers. It was the most popular session at the conference according to the conference software, which is awesome!

Heather Downing has cornered the market on unique talks in the mobile development space, including one on using beacons.

Finally, Cory did a great session on scalable JavaScript. I saw this one at KCDC and it's both entertaining and informative.

Events

The MESH party was a ton of fun and the food was great. Awesome venue, good friends, and even a HoloLens to play with!

Conclusion

This wasn't a stop I was planning on making in my speaking travels, but it was a totally worthwhile one. I had a ton of fun and the tech community in Nebraska is awesome. If I have the opportunity, I'll definitely be returning next year!

Switching from WordPress to Ghost on Microsoft Azure

A couple of weeks ago, I decided to transition my blog from WordPress to the Ghost blogging platform and I wanted to talk about that experience.

I recently went to my friend David Neal's website and found it to be simple, clean, and attractive. I found out that his blog was run on Ghost, a blogging platform that runs on top of Node. After doing some Googling, I decided that I would make a test website on Azure and see how I liked Ghost.

After setting up the website and tweaking the theme that I found, I had another couple people look at it and they thought that it was an improvement over my WordPress-based site. So I decided to go ahead and make the switch. Here are the steps that I took to do so.

  1. First thing's first: I had to find a hosting platform for Ghost. The official Ghost site offers one for $19 a month but I decided that was more than I wanted to spend, so I decided to reach into the Azure credits I get as an MSDN subscriber.
    I found a GitHub repo that allows you to set up your Ghost blog on Azure with just a few clicks. I cloned the repo so I could customize it and then set up my Azure site. I really like the Azure interface - there is a lot of power behind it - so that's what I'm going with for now. Scott Hanselman has a more detailed writeup on installing Ghost on Azure.

  2. I wanted to make sure that I exported all of the posts and pages that I had in my Wordpress site with all the links intact. This was not very difficult, but it was a bit time-consuming to tweak everything.
    First, I installed and ran a Wordpress plug-in which exported the contents of my blog to a JSON file which Ghost could use to import all of my old data.
    One thing that is different about Ghost is that it uses Markdown on top of HTML to render the posts, which I really like. The plugin exported my WordPress information and try to convert it to Markdown as best it could. It wasn't perfect and I had to go through post-by-post to tweak them and make sure that the HTML and the Markdown play nicely together.
    As anybody who's ever used a WYSIWYG editor knows, the HTML that is emitted is sometimes a little strange and this was no different. I just had to go through and edit and make sure that all of my HTML was correct.

  3. Another thing that I had to go back and redo were my posted code samples. They were originally contained inside of a WordPress plugin that would render them with proper syntax highlighting. I switched to using GitHub Gists a while ago but didn't bother going back and converting all of my old samples. So, I had to go through some of my older blog posts and create Gists from all the samples.
    It wasn't hard, but it was a little bit time consuming. I'm a firm believer that you shouldn't house what you don't have to, and Gists are just one of the many things that GitHub does really well.

  4. I tested each and every link, including all of the page links and short links that I created for my website. Thankfully, I didn't have to do much tweaking here because the Ghost to WordPress plug-in took care of that for me. It was very seamless and this didn't require a lot of effort - mostly just double checking.

  5. Finally, I had to select a theme for my site. I really liked David Neal's blog theme, so I look for a theme that was similar. I found one called Phantom and tweaked it. It was very easy to set up the Ghost software to run on my local machine. After I had done that, I was able to run and configure the Ghost blog as I went. A lot of this stuff that I tweaked was just personal preference. I ended up reducing the size of the font a bit and adding in navigation, which was not there originally.

Overall, I'm very happy with the blog. However, this does not come without some things lost. Firstly, I lost my Yoast SEO plug-in. It's kind of unfortunate because it does such a good job of analyzing your post and making sure that it's up to SEO standards. I'm still looking for alternatives here, but I'm not that worried about it.

Another thing I lose is the awesome WordPress app. I really liked the app because it would give me notifications when people left comments and when there was a spike in my traffic. It also had a decent editor that I could use to tweak blog posts on the fly, but I didn't do that that much so it wasn't that important. You could say that I miss being part of the WordPress ecosystem because there was so much to it.

However, I really like the fact that Ghost is first and foremost a blogging platform and that's all it will ever be. Plus, I find editing it to be way less intimidating than trying to make WordPress do exactly what I wanted to, which is why I rarely tweaked the look of my site before. I also really like the deployment model. When I used WordPress, I never set up a separate site to test and tweak things because it was so inconvenient to do so. It was a lot easier to set up Ghost to run on my local machine, make changes, push those to a GitHub repo, and have Azure install the new files from my Ghost repo automatically.

Some of the things I don't miss are the WYSIWYG editor, which is great until it does something that you don't intend for it to do. For example, table formatting was horrible. It would always add custom styles to the table body, rows, and cells, which meant that I had to constantly go back and either remove the styles or edit them in a separate editor. I find using Markdown to be a lot more natural, and I'm not locked into Markdown - I can just as easily add HTML to my page.

Overall, very happy with the results of this change. I ended up with a cleaner looking website up that I can be proud of. What would I recommend for you? If you want to make a change and desire a simpler blogging platform, then I would recommend giving Ghost a shot. However, you do lose a few thing, so overall if you're happy with your WordPress blog, I'd keep it.

Music City Code 2016 Wrap Up

Music City Code in Nashville, TN was amazing.  This was its second year – it started as a one-day code camp and is now four (!) days – an agile conference, a day of workshops, and two days of regular sessions.  This was my first time there and I can’t tell you how awesome it was. I originally didn’t think that I would send in a talk, but decided to try on the very last day.  Lo and behold – two sessions and a workshop were selected!  And let me tell you, I’m glad I submitted.  Gaines and Mary Kergosien are incredibly gracious hosts who put on an amazing conference.  It’s clear that those two care deeply about the community.

My talks

First day was a day of workshops.  I gave my Angular 2, TypeScript and ASP.NET Core talk to the biggest group yet – just over 100 people.  The workshop was for the latest version of Angular 2 at the time (RC5) and everything went off (mostly) without a hitch.  Overall, the feedback for the workshop was great and I was very happy with it. The next day, I gave the firehose version of my Angular 2 workshop that introduces Angular 2 and TypeScript at a very high level.  Not much to say here other than it seemed well-received. My RESTful APIs talk had about 30 people in it which I was happy with since it was in the last session slot of the day on the last day of the conference.  This talk is always very popular and I was happy to close the day out with it because it’s by far my favorite talk to give.

Session Highlights

I went and saw Jay Harris’ talk on Designers for Non-Designers and it was awesome.  I learned a lot of stuff that I did not previously know about color and typeface.  (Also, his slides are amazing.)

The functional panel was really fun and informative.  On the panel was Bryan Hunter, a well-known functional programming expert.  He probably had the quote of the day.  (Fun fact – any time I tweet about F# or functional programming, it seems to get a lot of likes and retweets – this one was no different.)

Another talk I went to was Jeff Strauss’ excellent talk on modern development workflows backed by .NET, including using tools like NPM, Gulp, Kudu, WebStorm, and others.

The opening keynote by David Neal and Jeremy Clark was awesome and emphasized the importance of building relationships during conferences.  Jeremy gave a good piece of advice – Meet Someone New – which was kind of funny because Jeremy was the first person I met at Music City Code.

And of course:

I spent some time working and prepping for my talks, so I wasn’t able to make it to any other sessions.  Overall, it was a high-quality speaker roster and I know attendees got a lot of value out of the sessions.

Events

The speaker dinner was very nice – drinks, appetizers, and good conversation.  I got to meet several awesome new people and the venue was great.  The conference ended with a very nice attendee party.  The drinks were flowing and the food was great!  Not much else to say here except that it was awesome.

Some nice things

I can’t talk enough about how great Gaines and Mary are.  They really care about the community, but they take care of their speakers too.  Things such as:

Are all nice touches that make you feel appreciated.

Conclusion

Overall, I had an awesome time.  I consider it to be a must-see Midwest conference.  I got to meet a lot of great people and get to know some I’ve met throughout the year.  It’s truly been an amazing and humbling experience to get to go to so many of these conferences!  As always, thank you to my employer Ryvit for sponsoring me.

I'll just leave this here

Jeremy told me I should put this here. I guess I have quite an entourage.

RESTful API design - how to best represent child entities? - Ask Schneids

I recently got an email from a friend of a friend asking me to advise them on a REST API they were designing.  I’ll happily give you advice, I reply.  Would you mind if I posted it for others to benefit?  He replied, yes, go ahead!

I think I’m going to make this a regular thing and call it Ask Schneids.  Feel free to email me your questions (or contact me any way you like – just make sure to include Ask Schneids somewhere in the body or subject so I know it’s okay to post) and I’ll respond to them and post the answers to this blog.  I’ll make sure to remove any identifying information from the question before I post it.

Anyways, without further ado, here’s my very first Ask Schneids question regarding RESTful API design.  Comments and follow up questions are always welcome – if you disagree, leave a comment below so we can all learn together! 🙂


How do you best return related entities?

I’m starting on a major refactoring, you could call it a rewrite, and one of my goals is to create an “API first” application using ASP.NET Web API and Entity Framework.

Our data is highly relational and I’m curious how to best return those complex objects/relations in JSON.  For example “inventory” is made from entities: “items”, “locations” and “unit of measure”, along with other properties like quantity, last change date, user, and other attributes to identify that specific instance of inventory.  “items” and ‘locations”  both have additional properties and related entities, the usual: name, description, etc, but can also include a list of images, a list of item aliases, among other things.

Basically my question is: how much of the related entity should be included when “inventory” is requested?  Just an Id, include the “core” info from the entity, or include the complete entity?  Of course it depends. 🙂

Of course it depends!  It always depends. 🙂  Typically it’s going to depend on your consumer.  Sounds like the API is going to consumed by both internal and external users.  Consider returning only a subset (or the “core”) of the most important data in a call with a related entity and expose an API that allows them to get more data if they request it.  For example, your inventory object might return the Item name and description, but allow you to get the additional data from the Item API if they need it.

I always recommend passing data from domain objects (e.g. objects specifically tied to a database, such as Entity Framework entities) to dumb DTOs (like view models, but for API’s) that are simple property bags.  You can use AutoMapper to do this quite easily.  Check out the Model Factory pattern here for an example (but don’t create the ModelFactory class and write all that repetitive, boring code – just use AutoMapper!)


Should you get individual records with the database ID or some other kind of unique identifier?

This is a multi-tenant app, and with that I’m struggling with whether or not to expose and use the system Id to the end user (PK of the entity in the database).  A user creates an item: Widget101, of course it gets and Id from the database, say 2345. Do you get the item like:

api/v1/items/2345
or
api/v1/items/Widget101

Best practice is to allow them to get the object via the database ID – it’s meaningful to your system and simpler for API construction.  If you need to expose a way to get the Item using another identifier (e.g. Widget101), consider using OData practices ($filter parameter would be a good place to start.)  You can find more information on implementing OData in ASP.NET Web API here.


For more REST implementation best practices, I really like Microsoft’s REST API guidelines found here.  They’re very comprehensive and are a good starting point for any REST API developer (ASP.NET or otherwise.)

Follow schneidenbach