官术网_书友最值得收藏!

  • SignalR Blueprints
  • Einar Ingebrigtsen
  • 276字
  • 2021-07-23 20:36:19

Personal style

Throughout the book, you'll run into things you might disagree with. It could be things in naming the classes or methods in C#, for instance, at times, I like to drop camel casing, both upper and lower and just separate the words with an underscore yielding "some_type_with_spaces". In addition, I don't use modifiers, without them adding any value. You'll see that I completely avoid private as that is the default modifier for fields or properties on types. I'll also avoid things such as read-only, especially, if it's a private member. Most annoyingly, you might see that I drop scoping for single line statements following an IF or FOR. Don't worry, this is my personal style; you can do as you please. All I'm asking is that you don't judge me by how my code looks. I'm not a huge fan of measuring code quality with tools such as R# and its default setting for squiggles. In fact, a colleague and I have been toying with the idea of using the underscore trick for all our code, as it really makes it a lot easier to read.

You'll notice throughout that I'm using built-in functions in the browser in JavaScript, where you might expect jQuery. The reason for this is basically that I try to limit the usage of jQuery, in fact, it's a dependency I'd prefer not to have in my solutions as it is not adding anything to the way I do things. There is a bit of an educational, quite intentional reason for me not using jQuery as well; we now have most of the things we need in the browser already.

主站蜘蛛池模板: 德州市| 敦煌市| 黄陵县| 富蕴县| 阿图什市| 阿鲁科尔沁旗| 大安市| 卢龙县| 扶绥县| 醴陵市| 文安县| 夹江县| 高平市| 汉寿县| 广南县| 墨江| 旌德县| 武定县| 比如县| 杂多县| 阜城县| 宁乡县| 自贡市| 西盟| 同仁县| 贺兰县| 兴海县| 会泽县| 班戈县| 弥渡县| 墨竹工卡县| 澄城县| 家居| 鄂尔多斯市| 玉环县| 奈曼旗| 宜宾市| 武陟县| 鄂伦春自治旗| 永春县| 碌曲县|