推介会是什么意思| 脱肛是什么| olay是什么档次| 低压高什么原因导致的| 赵国是现在的什么地方| 清考是什么意思| 火鸡面为什么那么辣| 得了肠息肉有什么症状| lpa是什么意思| 越描越黑是什么意思| 各自安好什么意思| 什么的夕阳| 牛反刍是什么意思| 三角巾是什么| 备孕需要注意些什么| 中度肠化是什么意思| 固本培元什么意思| 甜瓜什么时候成熟| 10月20日什么星座| 晨跑有什么好处| 宫颈粘连什么症状| 眼睛肿什么原因| 血压低挂什么科| 什么拉车连蹦带跳| 商纣王姓什么| 活碱是什么| 偷窥是什么意思| 蝉喜欢吃什么| 肚脐左侧按压疼是什么原因| 唐氏筛查高风险是什么意思| 什么人适合吃红参| 吃石斛有什么好处| 大蒜泡酒治什么病| 中联办是什么级别| 心脏属于什么组织| mio是什么意思| 喘不上气挂什么科| 鲨鱼用什么呼吸| eod是什么意思| 冻干粉是什么| 么么是什么意思| 排骨蒸什么好吃| 命悬一线的意思是什么| 尿液有隐血是什么情况| 县委办公室主任是什么级别| 刺猬的刺有什么作用| 飞机用什么油| 缺钾吃什么食物补得最快| pd是什么| 三乙醇胺是什么东西| 中药一般什么时候喝最好| 溺爱的意思是什么| chase是什么意思| 恩裳是什么档次的衣服| 宿命是什么意思| 治未病是什么意思| 吃什么药可以流产不用去医院| 成都机场叫什么名字| 喜大普奔什么意思| 知心朋友是什么意思| 红枣什么时候吃最好| 胃胀消化不好吃什么药| hpv感染是什么意思| 导语是什么意思| 软开是什么| 黄油是什么| 漏尿女性吃什么药最好| 螃蟹跟什么不能一起吃| 金项链断了有什么预兆| 乙基麦芽酚是什么| 检查头部挂什么科室| 晚上睡觉腿抽筋是什么原因| gy是什么意思| 什么魂什么魄| 头晕是什么病的前兆| 266什么意思| 角的大小与什么有关与什么无关| 绮字五行属什么| 老婆饼是什么馅| 为什么兔子的眼睛是红色的| 头顶疼是什么原因| 笑对人生是什么意思| 非户籍是什么意思| 孩子为什么长不高| 吃什么好| 中秋节适合吃什么菜| 经常喝茶叶有什么好处| 戴帽子是什么意思| 羊冲什么生肖| 惜字如金什么意思| 汽车五行属什么| 煤气罐在什么情况下会爆炸| 韧带拉伤有什么症状| 谷草谷丙是什么| 人这一生为了什么| 排卵期出血吃什么药| 五行什么生水| 乙肝表面抗原大于250是什么意思| 什么鸟一生只有一个伴侣| 大小周是什么意思| 容易流鼻血是什么原因| 为什么小腹总是胀痛| 什么门比较好| 什么东西补气血效果最好| 今年25岁属什么生肖| 猪跟什么生肖配对最好| b2b是什么意思| 518是什么星座| 夏天怕冷是什么原因| 颖五行属什么| 掉头发严重吃什么东西可以改善| 男狗配什么属相最好| 低血压平时要注意什么| 看见乌鸦有什么预兆| 0是偶数吗为什么| 胃镜取活检意味着什么| 下眼睑跳动是什么原因| 心里堵得慌是什么原因| 吃什么补钙最好| 男性乳头疼是什么原因| 羊悬筋是什么样子图片| 多核巨细胞是什么意思| 六月初三是什么日子| 胃穿孔有什么症状| 意向什么意思| 头晕目赤是什么意思| 敬谢不敏是什么意思| 诸神黄昏什么意思| 一什么葡萄| 浅卡其色裤子配什么颜色上衣| 脚趾头抽筋是什么原因引起的| 百废待兴是什么意思| 艾灸的原理是什么| 万宝龙皮带算什么档次| 坏血病的症状是什么| 女人吃什么补充胶原蛋白| jk制服是什么意思| 农历六月十一是什么星座| 1927年属什么生肖| 心肌缺血吃什么中成药| la什么牌子| 吃什么去肝火效果最好| 胸闷是什么病的前兆| 吃芒果过敏是什么症状| 什么孕妇容易怀脑瘫儿| 7o年属什么生肖| 劈腿什么意思| 表述是什么意思| 六允读什么| 阳暑吃什么药| pending是什么意思啊| 返聘是什么意思| 脾稍大什么意思| 什么地端详| 爸爸的爸爸叫什么| 美莎片是什么药| 对策是什么意思| 心电监护pr是什么意思| 刮痧有什么作用| 黑色素缺失吃什么补充最快| 小孩嘴臭是什么原因| 根茎叶属于什么器官| 传染病八项挂什么科| 感觉不到饿是什么原因| 所剩无几是什么意思| 脸痒痒是什么原因| 乔顿男装属于什么档次| 甘油三酯高吃什么药效果好| 狼吞虎咽什么意思| 梦见自己被抢劫了预示什么| 属猪的幸运颜色是什么| 树欲静而风不止是什么意思| 潜血弱阳性是什么意思| 什么蔬菜含铁高| 螺旋杆菌有什么症状| kappa是什么意思| 神经紊乱有什么症状| 敏感肌是什么意思| 女生肚脐眼下面疼是什么原因| 精液是什么| 胆囊息肉挂什么科| 梦见自己尿裤子了是什么意思| 软组织肿胀是什么意思| 脚膜炎用什么药最好| 金屋藏娇是什么意思| 白癜风有什么症状| 梦见手抓屎是什么意思| 女人肝火旺吃什么好| 生殖疱疹用什么药效果好| 牵引是什么意思| 院子里有蛇是什么征兆| 生蚝有什么功效| hpv16阳性是什么意思| smeg什么品牌| 肾衰竭是什么症状| 肋间神经炎吃什么药| 先下手为强是什么意思| 老人嗜睡是什么征兆| 姜子牙是什么神仙| 肝腹水是什么病| 开塞露是什么成分| 晟读什么| 心累是什么意思| 人体是由什么组成的| 己卯日五行属什么| 孕期脸上长痘痘是什么原因| 北京户口有什么好处| 今天属什么生肖日历| 义乌有什么大学| 甲亢吃什么食物最好| 鼻子不通气吃什么药| 生气对身体有什么危害| 钾高是什么原因造成的| 口加至念什么| 无菌敷贴是干什么用的| 客厅沙发后面墙上挂什么画好| 梦见买鞋子是什么意思| 狗为什么喜欢吃骨头| 2005年是什么命| 铁蛋白高是什么原因| 什么水花| 咒语是什么意思| 粉籍是什么意思| 宫颈管搔刮术是什么| 做胃镜之前需要做什么准备| 财评是什么意思| 喝蜂蜜水有什么好处和坏处| 虎什么熊什么| 完了是什么意思| 心电图电轴右偏是什么意思| 今年26岁属什么生肖| 乳腺囊性增生是什么意思| pro是什么的缩写| 牙齿松动是什么原因引起的| 做梦梦见掉牙齿是什么意思| 脊柱疼是什么原因| 低压高什么原因导致的| 用你的手解我的锁是什么歌| 吃榴莲对身体有什么好处| 牙龈疼吃什么药| 大树像什么| anti什么意思| 副区长什么级别| 梦见坐牢是什么预兆| 黑白蛇是什么蛇| 手镯断了有什么预兆| 嘴唇出血是什么原因| com什么意思| rfc是什么意思| 拔完牙能吃什么| 不全纵隔子宫是什么意思| 二甲苯是什么东西| 少校是什么级别| 一物降一物前面一句是什么| 什么什么的沙滩| paris什么意思| 10月28日什么星座| 出汗多吃什么| holly是什么意思| 什么的白桦| 血糖高吃什么饭| 外科医生是做什么的| 什么是头寸| 贫血是什么原因导致的| 百度
BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage Articles C# 9 and .NET 5: Book Review and Q&A

中央党史和文献研究院领导班子公布 冷溶任院长

百度 在第一次国内革命战争时期为扫清封建军阀和推翻帝国主义的压迫,我们党与孙中山为代表的资产阶级民主派合作,以国民党作为统一战线的组织形式,建立了包括工人、农民、城市小资产阶级、民族资产阶级的反帝反封建革命统一战线,形成了全国范围的革命高潮,为北伐战争作了直接的准备。

This item in japanese

Key Takeaways

  • The book C# 9 and .NET 5, by Mark Price, is an implementation-oriented guide on developing .NET cross-platform applications. The author covers the main types of applications that can be built with C# 9 and .NET 5, providing a very comprehensive development guide to .NET beginner to intermediate programmers .
  • The author talks about the new features of C# 9 and the context in which .NET 5 is inserted. He also talks about the importance of knowing the .NET internals for developers that need to work with legacy .NET applications.
  • The book includes chapters on frameworks related to .NET 5, such as Entity Framework Core and ML.NET. These chapters were included according to what the author thinks as essential capabilities necessary for a developer nowadays - which includes Machine Learning.
  • The author emphasizes that Blazor Server and Blazor WebAssembly both use the same component model. This means that if a programmer is careful about how they design their Blazor components, they can be shared between either hosting model. The book has a dedicated chapter discussing the available Blazor hosting models.
  • .NET 6, the next Long Term Support release for .NET, will be available in November 2021. Any existing .NET Framework projects should start being migrated today to .NET 5. Considering the necessary refactoring and adjustment time, this will allow companies to take advantage of the full three years of .NET 6 support from Microsoft.

The book C# 9 and .NET 5, by Mark Price, is a practical guide on developing .NET cross-platform applications. The book is concise, implementation-oriented, and each subject is presented with a hands-on walkthrough. The author covers the main types of applications that can be built with C# 9 and .NET 5, providing a very comprehensive development guide to .NET programmers.

InfoQ reviewed the book and interviewed Mark Price on the goals and contents of C# 9 and .NET 5.

InfoQ: Why did you write this book?

Mark: I wrote this book because I felt that I could add something that was missing from the existing marketplace of C# books. When Packt approached me in the summer of 2015 to write a C# book, I was already familiar with many of the current C# books because I had bought them over the years for myself. At the time, even Microsoft wasn’t sure what their long term plans were for .NET which is why they named the new slimmed-down version, “.NET Core”. They didn’t know at the time that it would grow in popularity and eventually be the generational shift that .NET needed to become modern and cross-platform. 

InfoQ: What is your target audience?

Mark: The target audience for my book is beginner to intermediate programmers. By that I mean two primary audiences. 

First, someone new to C# and .NET. They will have the best experience if they already have familiarity with another language or at least have some Science, Technology, Engineering, and Mathematics (STEM) background. But anyone who is curious and eager to learn should be able to follow the book and gain skills and knowledge.

Second, someone who has worked with C# and .NET in the past, but has perhaps got rusty skills or is stuck on the .NET Framework and wants to make the jump to modern cross-platform .NET. 

InfoQ: How do you think .NET 5 changes the previous .NET ecosystem? If someone decided to start following the software development career today, would they have more reasons to choose the .NET path now?

Mark: .NET Core 3.1 was the first modern version of .NET that I confidently recommended that all programmers embrace because that version clearly surpassed .NET Framework 4.8. So it was the first step on a journey to replace .NET Framework. It is a Long Term Support release so Microsoft will support it until December 2022. .NET 5 improves performance in many areas and adds new platforms like Blazor WebAssembly but it will be .NET 6 that completes the journey to a single .NET for all platforms including mobile. 

InfoQ: Chapter 2 briefly explains the evolution of C#. Which do you think are the best features of C# 9?

Mark: The feature with the best potential is Records. I have a feeling that some programmers will use Records without actually needing to, just because they have heard that Records are the cool new feature. Records enable a functional programming style by providing immutable objects. I plan to explore the functional programming style in more depth and add some code examples in the next edition that show more of the “why” to use Records as well as the “how” to use Records that I included in the fifth edition. 

Other new C# 9 features like top-level programs might be useful in some specialized scenarios or for learning. I think my favorite new language feature and the one I will use frequently is target-typed new object instantiation because it simplifies code that programmers write many times every day.

InfoQ: Your book covers not only C# 9 but also several aspects of .NET 5 - including packaging and standards. Why is it essential for someone that just started learning C# 9 to understand .NET Standard?

Mark: .NET programmers do not have the luxury of only working on greenfield applications i.e. completely new applications that can use .NET 5 for all components. .NET programmers must be ready to work on projects that use older versions. There are many more projects written for .NET Framework that need maintaining than fresh new projects using .NET 5. Understanding how to create new class libraries that can work with older platforms is very important. .NET Standard 2.0 enables code to work between old and new versions of .NET, as well as between Windows-only .NET Framework, mobile apps using Xamarin, and modern cross-platform .NET Core 2.0 and later. 

InfoQ: In Chapter 11, you explain how to work with databases using Entity Framework Core. In your opinion, what are the advantages of using it instead of an object-relational mapper such as NHibernate (or any other similar)?

Mark: The big one is, of course, support from Microsoft. Entity Framework Core (EF Core) is Microsoft’s official Object-Relational Mapper (ORM). As the default ORM, it is used in more projects and therefore gets more real world testing and any issues are fixed faster. More programmers are familiar with it so they are easier to recruit onto projects. As with most technology, the benefits are less about the features of the technology, and more about human factors. 

InfoQ: There's been a lot of excitement around Blazor - especially after the release of Blazor WebAssembly 3.2 earlier this year. In your book, you talk about Blazor a lot, both server and client-side. Could you explain the difference between them and when a programmer should choose to use one or the other?

Mark: The first thing to emphasize is that Blazor Server and Blazor WebAssembly both use the same component model. This means that if a programmer is careful about how they design their Blazor components, they can be shared between either hosting model, as I show in the chapter about Blazor in my book. Now let’s talk about the two hosting models. 

For a programmer already familiar with ASP.NET Core, Blazor Server is easier to work with because the code runs on the server where all the data resources are and so the programmer doesn’t have to handle as much complexity. But Blazor Server requires a permanent connection between each browser client and the server. This uses resources on the server and limits the maximum number of clients and therefore the scalability of your solution. 

Blazor WebAssembly is harder to work with because the code runs in the browser and is limited to resources within the browser. Any data needed, for example to update the user interface, must be fetched from the server. This typically requires authentication and deserialization and so on. Due to the disconnected nature of the client and server, the solution can scale much better. And since the programmer will have to create a web service anyway, it also enables other types of client, for example, mobile, desktop, or smart speaker. 

InfoQ: .NET 5 brings a lot of improvements related to gRPC, which is effectively replacing Windows Communication Foundation (WCF) for developing service applications on .NET. Can you tell us how exactly gRPC is different from WCF and what it brings to the .NET ecosystem in terms of advantages over WCF?

Mark: Microsoft’s Windows Communication Foundation (WCF) is a simple yet powerful and extendable technology so I was sad to see it did not make the jump to modern .NET. It had the concept of endpoints defined by ABC: address, binding, and contract. Contracts were defined using C# interfaces and they specified the functionality and was therefore separated from the implementation. Set up was primarily done in a configuration file so changes could be made without recompiling your apps. It had strong support for multiple common communication technologies like MSMQ, SOAP, and REST. It was designed to handle future technologies so it is a shame that Microsoft didn’t implement WCF in modern .NET and then just add support for gRPC to it. As its name suggests, WCF is limited to Windows because it is only implemented in .NET Framework.

gRPC is a Google-defined technology and supports any programming language. It is more limited than WCF because it only supports Remote Procedure Call (RPC) style interactions. It uses Protocol Buffers (protobuf) binary format to send messages. My book does not include any code examples of gRPC but if there is enough interest then I might include some in the sixth edition. 

InfoQ: In Chapter 21, you talk about developing cross-platform mobile apps. How is the .NET 5 framework prepared to support this development?

Mark: .NET 5 does not support mobile apps. That will have to wait for .NET 6. Chapter 21 has to use Xamarin, the mobile version of .NET, instead.

InfoQ: Despite not being a part of .NET 5, in your book, you talk about ML.NET, a machine learning framework for the .NET ecosystem. Why did you choose to include this framework in your book? Isn't it a very specialized framework, or is it something accessible even to someone that just started learning .NET development?

Mark: Entity Framework Core is not part of .NET 5 either but I include a whole chapter on that because working with databases is an essential capability of any developer platform. Machine learning is rapidly becoming just as essential as working with databases. So since the fourth edition, I include a chapter showing how to use Microsoft’s ML.NET machine learning library. But, as I show in the book, adding intelligence to your apps is not easy. I suspect that lots of programmers buy books that are 100% about machine learning and give up after chapter 1. So I wrote the machine learning chapter in my book partly to save them from getting disappointed after buying a whole book as well as trying to show one complete practical example of adding intelligence to a commerce website by adding product recommendations. 

If a programmer has just started learning .NET development then the chapter on machine learning is arguably the most challenging. But including allows programmers to decide for themselves if machine learning is an area they want to dive into now, or wait until they are more experienced or the platforms are easier for non-specialists to use. 

InfoQ: What do you think we can expect for the .NET ecosystem in 2021?

Mark: Microsoft will release .NET 6.0 on Tuesday, November 9, 2021. As well as all project types supported by .NET 5, .NET 6 will support mobile app development using .NET MAUI (Multi-platform Application User Interface). .NET MAUI is effectively Xamarin.Forms 6 so mobile developers can start building projects today using Xamarin.Forms 5 and it should be a small amount of work to upgrade to .NET MAUI when it is released with .NET 6.

Microsoft will release .NET 6 Previews monthly throughout 2021, including Release Candidates in September and October with Go Live licenses. .NET MAUI will have less frequent previews and will be packaged separately like EF Core is today. 

EF Core 6 will include some useful new features. Microsoft has publicly asked for feedback to plan what those features are.

C# 10 will include some rarely used features and some refinements that enable more functional programming style.

.NET 6 will be a Long Term Support release. Enterprises will want to target it for important projects. It will be easy to upgrade most projects from .NET 5 to .NET 6 simply by changing the project file so programmers can start work on those projects today using .NET 5 and then “flip a switch” to target .NET 6 and then get three full years of support from Microsoft. Any existing .NET Framework projects should start being migrated today using .NET 5 for similar reasons. It might take a year to refactor and rewrite the parts that need to be changed. 

About the Author

Mark J. Price is a Microsoft Specialist: Programming in C# and architecting Microsoft Azure Solutions, with more than 20 years of educational and programming experience.

 

Rate this Article

Adoption
Style

BT
夏至什么意思 发五行属什么 人这一生为了什么 喝水有什么好处 衍心念什么
爱的意义是什么 女生有喉结是什么原因 红绿色盲是什么遗传 智能手环是干什么用的 手指盖空了是什么原因
风湿类风湿有什么症状表现 hrd阳性是什么意思 胰腺ca是什么意思 为什么来月经 匈奴人是现在的什么人
腰椎间盘突出挂什么科 吃什么促进伤口愈合 猪沙肝是什么部位 fl是什么 机场地勤是干什么的
虫见读什么cj623037.com 孕晚期为什么会脚肿hcv7jop9ns5r.cn 沉香是什么东西hcv8jop3ns5r.cn 地级市市长是什么级别hcv9jop4ns0r.cn 风疹是什么样子图片hcv8jop8ns2r.cn
2021什么年gangsutong.com 沉香是什么hcv9jop1ns1r.cn 梦见蛇是什么意思hcv8jop9ns3r.cn 世界上最大的沙漠是什么沙漠hcv7jop5ns2r.cn 外阴瘙痒吃什么药hcv8jop2ns4r.cn
四维是什么意思hcv9jop4ns9r.cn 晚上吃什么不发胖jasonfriends.com 小孩咳嗽吃什么药hcv8jop7ns8r.cn 什么猫bfb118.com 中国最高军衔是什么hkuteam.com
放疗有什么危害hcv8jop7ns5r.cn 易经的易是什么意思huizhijixie.com 糖化血糖是什么意思hcv9jop2ns1r.cn 小孩上户口需要什么材料hcv8jop2ns3r.cn 眉飞色舞是什么意思hcv9jop2ns0r.cn
百度