Professional C# 6 and .NET Core 1.0. Christian Nagel
Чтение книги онлайн.
Читать онлайн книгу Professional C# 6 and .NET Core 1.0 - Christian Nagel страница 16
With preinstalled operating systems you can decide between Windows, Windows Server, Linux, and operating systems that come preinstalled with SQL Server, BizTalk Server, SharePoint, and Oracle.
I use virtual machines often for environments that I need only for several hours a week, as the virtual machines are paid on an hourly basis. In case you want to try compiling and running .NET Core programs on Linux but don’t have a Linux machine, installing such an environment on Microsoft Azure is an easy task.
Platform as a Service
For developers, the most relevant part of Microsoft Azure is PaaS. You can access services for storing and reading data, use computing and networking capabilities of app services, and integrate developer services within the application.
For storing data in the cloud, you can use a relational data store SQL Database. SQL Database is nearly the same as the on-premise version of SQL Server. There are also some NoSQL solutions such as DocumentDB that stores JSON data, and Storage that stores blobs (for example, for images or videos) and tabular data (which is really fast and offers huge amounts of data).
Web apps can be used to host your ASP.NET MVC solution, and API Apps can be used to host your ASP.NET Web API services.
Visual Studio Online is part of the Developer Services offerings. Here you also can find Visual Studio Application Insights. With faster release cycles, it’s becoming more and more important to get information about how the user uses the app. What menus are never used because the users probably don’t find them? What paths in the app is the user is taking to fulfill his or her tasks? With Visual Studio Application Insights, you can get good anonymous user information to find out the issues users have with the application, and with DevOps in place you can do quick fixes.
NOTE In Chapter 20, “Diagnostics and Application Insights,” you can read about tracing features and also how to use the Visual Studio Application Insights offering of Microsoft Azure. Chapter 45, “Deployment of Websites and Services,” not only shows deployment to the local Internet Information Server (IIS) but also describes deployment to Microsoft Azure Web Apps.
This final part of the chapter, before we switch to a lot of C# code in the next chapter, covers developer tools and editions of Visual Studio 2015.
Visual Studio Community
This edition of Visual Studio is a free edition with features that the Professional edition previously had. There’s a license restriction for when it can be used. It’s free for open-source projects and training, and also free to academic and small professional teams. Unlike the Express editions of Visual Studio that previously have been the free editions, this product allows using add-ins with Visual Studio.
Visual Studio Professional with MSDN
This edition includes more features than the Community edition, such as the CodeLens and Team Foundation Server for source code management and team collaboration. With this edition, you also get an MSDN subscription that includes several server products from Microsoft for development and testing.
Visual Studio Enterprise with MSDN
Visual Studio 2013 had Premium and Ultimate editions. Visual Studio 2015 instead has the Enterprise edition. This edition offers Ultimate features with a Premium price model. Like the Professional edition, this edition contains a lot of tools for testing, such as Web Load & Performance Testing, Unit Test Isolation with Microsoft Fakes, and Coded UI Testing. (Unit testing is part of all Visual Studio editions.) With Code Clone you can find code clones in your solution. Visual Studio Enterprise also contains architecture and modeling tools to analyze and validate the solution architecture.
NOTE Be aware that with an MSDN subscription you’re entitled to free use of Microsoft Azure up to a specific monthly amount that is contingent on the type of the MSDN subscription you have.
NOTE Chapter 17, “Visual Studio 2015,” includes details on using several features of Visual Studio 2015. Chapter 19, “Testing,” gets into details of unit testing, web testing, and creating Coded UI tests.
NOTE For some of the features in the book – for example, the Coded UI Tests – you need Visual Studio Enterprise. You can work through most parts of the book with the Visual Studio Community edition.
Visual Studio Code
Visual Studio Code is a completely different development tool compared to the other Visual Studio editions. While Visual Studio 2015 offers project-based features with a rich set of templates and tools, Visual Studio is a code editor with little project management support. However, Visual Studio Code runs not only on Windows, but also on Linux and OS X.
With many chapters of this book, you can use Visual Studio Code as your development editor. What you can’t do is create WPF, UWP, or WCF applications, and you also don’t have access to the features covered in Chapter 17, “Visual Studio 2015.” You can use Visual Studio Code for .NET Core console applications, and ASP.NET Core 1.0 web applications using .NET Core.
You can download Visual Studio Code from http://code.visualstudio.com.
This chapter covered a lot of ground to review important technologies and changes with technologies. Knowing about the history of some technologies helps you decide which technology should be used with new applications and what you should do with existing applications.
You read about the differences between .NET Framework 4.6 and .NET Core 1.0, and you saw how to create and run a Hello, World application with all these environments without using Visual Studio.
You’ve seen the functions of the Common Language Runtime (CLR) and looked at technologies for accessing the database and creating Windows apps. You also reviewed the advantages of ASP.NET Core 1.0.
Chapter 2 steps into using Visual Studio to create the Hello, World application and goes on to discuss the syntax of C#.
2
Core C#
What’s In This Chapter?
• Creating Hello, World! with Visual Studio
• Declaring variables
• Initialization and scope of variables
• Predefined C# data types
• Dictating execution flow within a C# program
• Enumerations
• Namespaces
• The Main method
• Using internal comments and documentation features
• Preprocessor directives
• Guidelines and conventions for good programming in C#
Wrox.com Code Downloads for This Chapter
The wrox.com code downloads for this chapter are found at www.wrox.com/go/professionalcsharp6