1. 程式人生 > 實用技巧 >開源協議 比較說明_開源.NET庫作者的新說明性指南

開源協議 比較說明_開源.NET庫作者的新說明性指南

開源協議 比較說明

開源協議 比較說明

Open-source library guidance

Perhaps you've got an open source (OSS) .NET Library on your GitHub, GitLab, or Bitbucket. Go check out the open-source library guidance.

也許您在GitHub,GitLab或Bitbucket上有一個開源(OSS).NET庫。 去檢視開源庫指南

These are the identified aspects of high-quality open-source .NET libraries:

這些是高質量的開源.NET庫的已識別方面:

  • Inclusive - Good .NET libraries strive to support many platforms and applications.

    包容性-好的.NET庫努力支援許多平臺和應用程式。

  • Stable - Good .NET libraries coexist in the .NET ecosystem, running in applications built with many libraries.

    穩定-好的.NET庫共存於.NET生態系統中,並在由許多庫構建的應用程式中執行。

  • Designed to evolve - .NET libraries should improve and evolve over time, while supporting existing users.

    專為發展而設計-.NET庫應隨著時間的推移而改進和發展,同時支援現有使用者。

  • Debuggable - .NET libraries should use the latest tools to create a great debugging experience for users.

    可除錯-.NET庫應使用最新工具為使用者創建出色的除錯體驗。

  • Trusted - .NET libraries have developers' trust by publishing to NuGet using security best practices.

    可信-.NET庫通過使用安全性最佳實踐釋出到NuGet來獲得開發人員的信任。

The guidance is deep but also preliminary. As with all Microsoft Documentation these days it's open source in Markdown and on GitHub. If you've got suggestions or thoughts, share them! Be sure to sound off in the Feedback Section at the bottom of the guidance. James and the Team will be actively incorporating your thoughts.

指導既深入又初步。 與所有的Microsoft文件一樣,這是Markdown和GitHub上的開原始碼。 如果您有建議或想法,請與他人分享! 確保在指南底部的“反饋”部分關閉聲音。 詹姆斯和團隊將積極吸收您的想法。

跨平臺定位 (Cross-platform targeting)

Since the whole point of .NET Core and the .NET Standard is reuse, this section covers how and why to make reusable code but also how to access platform-specific APIs when needed with multi-targeting.

由於.NET Core和.NET Standard的重點是重用,因此本節介紹如何以及為何製作可重用的程式碼,以及如何在需要多目標時訪問特定於平臺的API。

強大的命名 (Strong naming)

Strong naming seemed like a good idea but you should know WHY and WHEN to strong name. It all depends on your use case! Are you publishing internally or publically? What are your dependencies and who depends on you?

強命名似乎是個好主意,但您應該知道強名稱的原因和時間。 這完全取決於您的用例! 您是內部發布還是公開發布? 您的依賴項是什麼?誰依賴您?

NuGet (NuGet)

When publishing on the NuGet public repository (or your own private/internal one) what do you need to know about SemVer 2.0.0? What about pre-release packages? Should you embed PDBs for easier debugging? Consider things like Dependencies, SourceLink, how and where to Publish and how Versioning applies to you and when (or if) you cause Breaking changes.

在NuGet公共儲存庫(或您自己的私有/內部儲存庫)上釋出時,您需要了解有關SemVer 2.0.0的哪些資訊? 那預發行包呢? 您應該嵌入PDB以便於除錯嗎? 考慮諸如DependenciesSourceLink釋出方式釋出地點以及版本控制如何應用到您以及何時(或是否)導致重大變更之類的事情。

Also be sure to check out Immo's video on "Building Great Libraries with .NET Standard" on YouTube!

另外,請務必在YouTube上觀看Immo的視訊“使用.NET Standard構建出色的圖書館”!



Sponsor: Check out the latest JetBrains Rider with built-in spell checking, enhanced debugger, Docker support, full C# 7.3 support, publishing to IIS and more advanced Unity support.

贊助商:使用內建的拼寫檢查,增強的偵錯程式,Docker支援,完整的C#7.3支援,釋出到IIS和更高階的Unity支援,檢視最新的JetBrains Rider

關於斯科特 (About Scott)

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

斯科特·漢塞爾曼(Scott Hanselman)是前教授,前金融首席架構師,現在是演講者,顧問,父親,糖尿病患者和Microsoft員工。 他是一位失敗的單口相聲漫畫家,一個玉米種植者和一本書的作者。

facebook twitter subscribe About 關於 Newsletter 時事通訊 Hosting By 主持人 Hosted in an Azure App Service

翻譯自: https://www.hanselman.com/blog/new-prescriptive-guidance-for-open-source-net-library-authors

開源協議 比較說明