Recently I’ve been asked a few times how it is possible to release the book Professional C# 6 and .NET Core 1.0 while .NET Core is still not yet released. A statement I received is “we don’t know what features we have in .NET Core 1.0 RT”. I’ve several answers to this, and give you my answers here.
Code based on .NET Core RC2
My newest book is based on RC2 of .NET Core. Indeed, the book was released a few days before RC2 was available. It was not an easy task to do – I worked with new builds every day. At .NET Foundation and ASP.NET the source code for .NET Core and ASP.NET Core is available. It’s not just the source code of the current stable version, but the source code with changes that can happen every minute. You’ll also find feeds for NuGet packages that are not available on the main NuGet server. Using the daily or nightly builds I often looked for what’s not working today and might be fixed tomorrow. That’s why it was not an easy task to do.
Using the daily builds and to see what changed also helped a lot to understand why changes were done. At GitHub you can find discussions about changes, pros and cons.
Learning about changes with daily builds helped understanding the reason for changing, and thus helped creating a better explanation for some specific features in the book.
What’s the meaning of a Release Candidate?
Usually at Microsoft having a release candidate means that the code doesn’t change anymore for RTM – unless there’s a real critical issue. This time it was very different. After RC1 not only the tools changed (DNX to CLI), also the name (ASP.NET 5 to ASP.NET Core 1.0, and several other names), which resulted in different package names for the NuGet packages, different namespaces, and with these changes that already delayed the release by several months it was useful to make some more changes.
Now having RC2, it is not expected to have big code changes with RTM. API changes will only happen with critical issues. The project file will change, it will even change after RTM (more information about this later), but this shouldn’t influence the C# source code at all.
The API offered by .NET Core RC2 is not expected to change from RC2 to RTM (probably a few critical issues, but really don’t expect that big changes we had after RC1).
The changes after RC1 really have been useful. While the changes meant a lot work for early adopters, it gives a great advantage for easier use and more consistency in the long term.
When did I start working on the book?
To have the book ready when the product is released, work on it needed to start early. Indeed, I didn’t start working on the book with RC1, I started working on the book with very early beta versions. Of course there’s also a disadvantage with this. It not happened just once – a chapter was completed for the first review at the publisher – which I finally scrapped and never published (remember ObjectSpaces?) – or rewrote it from scratch because the technology changer that much.
I never count the amount of time I need working on the book. If I would do, I probably would never write again. As I’m using this book also in my workshops – teaching and coaching my customers .NET Core, C#, ASP.NET Core, WPF, UWP, Web API, and more, the book has a great purpose for my main business.
There’s also a bi-directional advantage both for my workshops and my books. Writing books, I know early information I need. Before my customers need to know new technologies, I already have a lot experience.
For the book, with workshops I learn what’s really needed, and what really helps to understand new technology. This information is included with my books.
I already did several workshops with .NET Core RC1.
While teaching I learn what helps to understand the technologies. This in turn helps make the book better.
How many iterations does it take to write the book?
After I’ve written chapter by chapter, the chapter is reviewed by technical reviewers, corrected and commented by editors, returned, and updated by me. The loop is repeated several times – so often that errors might be missed reading it after 10 times.
This book not only made it through these loops, big changes also happened because the first project structure was based on K-project files which changed to DNX and then to CLI. Remember, being early in the loop helps a lot understanding why things changed the way they did. In turn, this advantage is not only given to my course attendees, but also my book readers.
It takes some time to finish a 1500 pages book.
What if the source code changes?
The book was already available when RC2 was not supported by Visual Studio. To make it easy for my first readers using Visual Studio 2015, I converted the source code back to RC1 to have it available for the Wrox source code downloads. I’ve done this extra work although Microsoft’s date for RC2 was just a few days after the release of the book. Finally it turned out that RC2 was a few weeks later, so this work was useful for a few weeks.
With the final availability of .NET Core RC2, the project.json file had a few changes that have not been covered in the book. To help with this, all the source code of the book is available at GitHub. I also added a file with changes and extra explanations. This site will be updated continuously, and I also add additional samples to cover more scenarios and offer information on upcoming technologies. Just recheck GitHub for updated versions. With more stable versions, the Wrox site will be updated as well.
What’s covered in the book?
The book not only covers .NET Core – it has offers technologies needed by professional .NET developers. I’ve build many samples to compile both for .NET Core as well as the .NET Framework. You can use this book also to maintain your existing .NET Framework applications.
The first part of the book covers the C# language – including all the cool new features of C# 6 (including string interpolation and the null propagation operator). No matter if you’re working with .NET Core or .NET Framework, the language is the same. The new language syntax is also used with the code samples of all the chapters. Besides the core language features, the first part of the book also covers collections (including immutable and concurrent collections), asynchronous programming, reflection, and the dynamic keyword.
The second part of the book covers core features of the framework, such as Roslyn, unit testing, diagnostics, tasks and synchronization, files and streams, security, networking, composition, XML, JSON, and localization.
The third part of the book includes technologies for creating client applications – which includes the Universal Windows Platform (which makes use of .NET Core), as well as WPF. The WPF chapters make use of the desktop .NET Framework. To create WPF applications you could decide to chose the earlier edition of the book Professional C# 5 and .NET 4.5.1. However, also for WPF you might have an advantage with the newest edition of the book I added the chapter Patterns with XAML Apps which includes samples both for WPF and UWP showing how to reuse most code possible between these two technologies.
If not all your clients switched to Windows 10 yet, WPF can be your technology of choice. To make it easy for you to share most code between WPF and UWP check chapter 31 Patterns with XAML Apps.
The fourth part of the book demonstrates server-side technologies. Of course, ASP.NET Core 1.0 and ASP.NET MVC 6 is covered here. You also learn how to create Web API services using ASP.NET MVC 6. An important technology that is covered here as well is SignalR. SignalR will not be ready for .NET Core when .NET Core RTM is available. Instead, this technology will follow with a release a few weeks or months after .NET Core is ready. I decided to cover SignalR using the .NET Framework – the concepts will stay the same later on as well. And of course, you’ll find a .NET Core version of the SignalR samples with the additional samples on the GitHub site.
Professional C# 6 covers C# 6, creating UWP and WPF applications, using Entity Framework Core, using ASP.NET Core 1.0, ASP.NET MVC 6, and more
Would it be an advantage to release the book after the product is released?
Of course I was thinking about this question as well before releasing the book. However, when .NET Core is RTM, SignalR is not. Even more important, as it now turned out, the developer tools will be preview 2 when .NET Core is released. There’s a major change upcoming with the tools for RTM of the tools. The tools will be released with Visual Studio “15”. It would be possible to wait for Visual Studio “15” with the release of the book. This would also mean to update the C# syntax to C# 7 which will be available with the next version of Visual Studio.
The previous version of the book, “Professional C# 5.0 and .NET 4.5.1” was available when Visual Studio 2013 was completed. Just a few weeks after Visual Studio 2013 was completed, Update 1 for Visual Studio was ready. Update 1 included support for UWP projects on Windows 8.1 and Windows Phone 8.1. This technology wasn’t mentioned at all in the book – of course it was not available with the release date of the book but a few weeks after.
At these times it’s always possible to wait for the next version, but this way you can wait forever.
I think it’s a lot better to have a living supporting website with the book that is continuously updated as new technology is available.
Instead of waiting with a book release for the release of the product, it’s a lot better to have a supporting website that is continuously updated.
What does the tool change really mean?
Do you have to rewrite the .NET Core programs written with RC2 again when the new tools are released? No. Opening the project.json project files will automatically migrate the projects to the new MSBuild format. Of course, if this will be true I cannot guarantee now. There can be some glitches, but they can be resolved for sure. And you’ll find updated source code samples with the new project files on my GitHub website, as well with the Wrox source code downloads later on.
Changing to the upcoming tools with Visual Studio “15” shouldn’t be a big issue when working with .NET Core RC2 now.
Why do I maintain the supporting Website?
I can’t make a living out of the book sales – just for the book sales wouldn’t be enough motivation to update the source codes for every stable release version. However, as I already mentioned I’m teaching and coaching the same technologies as are covered in the book. I need to maintain the samples anyway – and this time I’m doing that public on GitHub.
I love teaching, developing, and writing with and about new technologies.
Are you ready for .NET Core?
You should be – there’s no real reason to not use at least some of the cool technologies covered in the book. I wouldn’t create a new Web application or API services with ASP.NET 4.x. You can go live now with .NET Core RC2.
Of course, updating an existing one to the new technologies requires more discussion and more reasons to switch. One example where I’m using .NET Core with WPF applications now: I like the new dependency injection framework that is available with .NET Core. It is really cool. Even with tool changes coming after RTM of .NET Core, in many scenarios it’s time to switch.
.NET Core RC2 is ready now!
.NET Core is ready to use. My book Professional C# 6 and .NET Core 1.0 helps you learning all the important .NET technologies that are important today.
As you read my thoughts about having the book already available with .NET Core RC2, I would like to read your comments.
I hope you enjoy my new book – and would be grateful for a review at Amazon 🙂
Have fun with programming and learning,