-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Improve NuGet Package Structure & Dependencies #2586
Comments
What's the problem with providing DotNetNuke.Bundle? It's not going to hurt anything to reference more components (they're already in DNN itself, it's not adding to the application). I do think it's a little confusing, but it would be good to have a package just named DotNetNuke that has depends on all packages someone would want to write a DNN extension, so they don't have to fund the right combination of packages. Similarly, can we combine any of these existing packages? Are they all useful (e.g. does anyone want DotNetNuke.Core without DotNetNuke.Instrumentation; does anyone depend just on DotNetNuke.Web without also depending on some other common package)? |
@bdukes I don't think there would be any real harm in Combining DotNetNuke.Core, DotNetNuke.Instrumentation and DotNetNuke.Web |
IMHO the DotNetNuke.Web.Mvc package suggests it is just a dll (because we have a dll under that name). The guiding principle should be that the name and description of bundles is clear and focuses on a common use case. I.e. developing an MVC module. "Bundle" is a misnomer IMO as it does not say what the bundle is for. I distinguish two types of packages:
My suggestions:
New Packages:
I'll also do a quick poll to see if the latter package is really complete for most MVC style modules. Finally: I began this because I felt the need for a DotNetNuke.Development.Everything package. A package that would include all dlls with their correct version numbers for a particular version of DNN. The reason being that if you need to target let's say DNN 8, you'd be left researching which version of a 3rd party dll was shipped with this. It is a reason for developers to shun NuGet in favor of referencing dlls directly on disk. In the latter case you're assured of good references. If we do still detect that need within the community I believe we should keep that option open. |
Leaving a DotNetNuke.Web.Mvc assembly without the extra dependencies leaves the same confusion that was the initial complaint, I don’t see a reason to differentiate between a “development” package than just adjusting the dependencies for the DotNetNuke.Web.Mvc package to include the extra items. I do not support a bundle with every dll used by dnn for a few reasons.
|
The bundle method is how I've always used the references, I've also created a As for the estimated 40-50mb size without the deprecated/telerik references, I don't see how that would be the case. At max, the DotNetNuke* assemblies without telerik is only around 5mb, if we're also including the personabar assemblies, it would be maybe 9mb. In addition, azure downloads things insanely quick, for example our devops package is downloading 1.2gb in source code and nuget packages in 43 seconds. We really need to make things easy and not require people to know every single interdependency when they're starting to develop in the platform. I'm agree with @bdukes, we should keep the ability to reference a bundle, which depends on all of the packages. This way if someone just wants to reference the entire product, they can. Or if they want the granularity to select just a small hand full of packages they actually require, they can do that too. |
Interesting, any idea why v9.3.0 also shrunk? |
@donker WHat is included in that package? Is that pre-post installation from the /bin directory? I'm fine keeping the Bundle if desired, but would still want it to be a meta and only publicized assemblies that we have the rights to distribute and that people should be referencing, which is NOT all of the files in the /bin directory |
Regarding size, an installed 9.2.1 installation of DNN with all references in 45.6Mb in the /bin directory with 32Mb of that being Telerik. Not horrible |
@mitchelsellers This is simply unpacking the install zip and adding all dlls in the bin folder to a package. So that excludes post installation dlls like those of included modules. I think this is fair as this is what is guaranteed to be in a default installation and nothing more. @ohine The difference for 9.3.0 is the lack of the pdbs. I automatically find them when I have the symbols zip of the same name and included them. So for 9.3.0 it was a prerelease so no symbols package. |
@mitchelsellers Can you point me to a resource where I can see how one can differentiate between distributing inside a zip from Github and inside a package from NuGet? I'm having a hard time wrapping my head around this. I can imagine excluding any commercial product but by now we're on open source and framework dlls from what I can see. |
@mitchelsellers As to "3. This could encourage direct dependencies on items that have DNN Api Wrappers to provide functions and could discourage best practice development on the platform by providing an easy way to bypass DNN’s API": We've had an on and off approach to "wrapping" 3rd party code for a long time now. Whether it's the wrappers around Telerik, or those around SharpZipLib. I understand the advantages:
These are my arguments against this practice:
So from the point of view of the advanced module developer I'd like to have the option to use the dlls myself and deal with the fallout once those 3rd party dlls are updated or removed. Following your logic this "KitchenSink" package would only ever be used by advanced module developers whereas we provide everything for basic module development in targeted packages like Development.Mvc. Hence my push for clear naming as well. |
@donker The concern regarding distribution is around the fact that any DLL that we distribute that is not a dependency resolved by NuGet needs to have the proper license information included as part of the download so that the consumer is aware of the license that they are being bound by. We acheive this with a DNN Installation by including the respective license text within the /Licenses folder fo the DNN installation. (Which as has been discussed in the TAG group already has problems of its own that I'd rather not discuss in public.) Regarding dependencies for other assemblies, I get your point, but we have fought for the past 9 months with backlash on breaking changes and dependencies that impacted module developers. We can distribute a package with a warning "Don't to this' but we have established that it doesn't do anything to actually stop people from doing it, and it doesn't stop the backlash on the community from breaking changes. If your desire from point 3 above is to not include these functions as part of the API's and require developers to find their own solutions I think that would be providing a disservice to the consumers and would introduce a huge breaking change if we removed all of those wrappers and encouraged outside references. Additionally, by DNN providing wrappers, and supporting the wrapper interface we have more control over upgrades to the dependent packages. If we encourage others to reference outside of DNN, we lose some control over best recommendations here Looking further into your thoughts of a As I look at developer experience, I believe strongly that we should be publishing safe, supported, routes for development with the platform. I believe if we do things to support a "what if" or a special edge case that could be misconstrued we will simply be adding to the negative view of "its hard" by getting someone started with the platform and then having everything fall apart in the end. A prime example of this would have been the larger impact of the change to the ZIp library if more people had been referencing it directly than those where with the last upgrade to that package. |
@ahoefling pointed out in yesterday's meeting that the word "development" may be confused to mean "not finished". In that case "bundle" would be a fine alternative. So DotNetNuke.Bundle.Mvc used for MVC style modules. |
"If your desire from point 3 above is to not include these functions as part of the API's and require developers to find their own solutions I think that would be providing a disservice to the consumers and would introduce a huge breaking change if we removed all of those wrappers and encouraged outside references." My point was to phase them out over time, not delete them. As we morph this platform I'm interested in pairing down the amount of code so we never get to the current situation any more. I just don't think we can afford to provide wrappers for everything any longer. |
Every time I use the Dotnetnuke packages from NuGet I am including the individual packages and always wondered why there isn't a bundle for API / MVC. I find that the current Bundle has more than I usually use for module development. I agree with @donker that we should have DotNetNuke.Bundle.MVC, DotNetNuke.Bundle.API, etc. packages. To aid in preventing users from using the old NuGet packages we can mark them as deprecated and add a note with a link to the new bundles. This way they are still available on NuGet, but NuGet will give a warning. I am still on the fence if there should be a bundle with all the DLLs. I suppose it would not hurt and Microsoft does allow you to get all of NET Core from NuGet or just the pieces you want. The |
Upon debugging more NuGet issues I discovered one source of errors for me. The DotNetNuke.WebApi.nuspec includes a straightforward framework ref for system.web.http:
This should be replaced with a specific ref as we roll out with this dll. So it should be:
This will add the correct version of System.Web.Http.dll to your project |
@donker Thank you for this additional information. Since the last update on this thread, a discussion with Microsoft has occured, about this, as well as other initiatives. Based on the information provided by them most of the above process was deemed effective, with an emphasis on ensuring that we use dependencies as noted by Peter Donker with specific versions, rather than framework directives. To this point, I will be submitting a Pull Request based on that feedback, this discussion and a review of the NuGet package recommendations to remove warnings associated with the generation of the package. All above elements will be included. |
Changes to modernize the NuGet packages published by the DNN Platform, fixes #2586. The below-submitted changes in structure have been validated by consultation with the DNN Platform Community, Microsoft Representatives, as well as validation of documentation per the published .nuspec file definition (https://docs.microsoft.com/en-us/nuget/reference/nuspec) In detail, the following items have been changed: * Migration of license information to the suggested <license> node rather than the deprecated <licenseurl> node. * Inclusion of target framework for all included .dll files, this prevents installation of the package to pre-4.5 projects protecting downstream users. * Improved package descriptions based on discussions held in the RFC regarding these improvements * Added Package-to-Package dependencies to ensure quick usage and inclusion * Updated the WebAPI and MVC packages to be holistic packages, including references to ALL needed items to develop using those patterns. All changes are current for DNN Platform version 9.3.0 or later. Packages have been built & tested locally with success. ## Suggested Usage With these improved packages, development & references should be easier. ### MVC Modules `Install-Package DotNetNuke.Web.Mvc` Should be the only needed package installation. It will install all needed dependencies, including the items necessary for WebAPI ### Modules Needing WebAPI (Not MVC) `Install-Package DotNetNuke.WebApi` Should be the only needed package for extensions not using MVC, however, needing to use WebApi for services. This will work well for WebForms or Library projects, etc. that don't need the extra references for MVC/Razor ### WebForms/Limited Modules `Install-Package DotNetNuke.Core` The most simple modules, still using the WebForms pattern can use this package for the smallest footprint For #2600
Changes to modernize the NuGet packages published by the DNN Platform, fixes dnnsoftware#2586. The below-submitted changes in structure have been validated by consultation with the DNN Platform Community, Microsoft Representatives, as well as validation of documentation per the published .nuspec file definition (https://docs.microsoft.com/en-us/nuget/reference/nuspec) In detail, the following items have been changed: * Migration of license information to the suggested <license> node rather than the deprecated <licenseurl> node. * Inclusion of target framework for all included .dll files, this prevents installation of the package to pre-4.5 projects protecting downstream users. * Improved package descriptions based on discussions held in the RFC regarding these improvements * Added Package-to-Package dependencies to ensure quick usage and inclusion * Updated the WebAPI and MVC packages to be holistic packages, including references to ALL needed items to develop using those patterns. All changes are current for DNN Platform version 9.3.0 or later. Packages have been built & tested locally with success. ## Suggested Usage With these improved packages, development & references should be easier. ### MVC Modules `Install-Package DotNetNuke.Web.Mvc` Should be the only needed package installation. It will install all needed dependencies, including the items necessary for WebAPI ### Modules Needing WebAPI (Not MVC) `Install-Package DotNetNuke.WebApi` Should be the only needed package for extensions not using MVC, however, needing to use WebApi for services. This will work well for WebForms or Library projects, etc. that don't need the extra references for MVC/Razor ### WebForms/Limited Modules `Install-Package DotNetNuke.Core` The most simple modules, still using the WebForms pattern can use this package for the smallest footprint For dnnsoftware#2600
* DNN-27517: force user logout after password changed in other place. * DNN-27517: update code by review. * DNN-27517: add host settings to control whether force logout after password changed. * NOJIRA: mark as stable. * Fixed bugs on add/remove user permissions for modules * Change algorithm to SHA1CryptoServiceProvider * Updated Issue Templates to include new RFC template and to support submissions for 9.3.0 release * Corrected structure to avoid issue linking * code review * User registration: end the response after redirect (#2511) * Initial New User Email Not Sending At Time of Creation (#2492) This is alternative way to fix above issue proposed in dnnsoftware/Dnn.AdminExperience#174 As per @sleupold , we need to move email notifications from UI to core part. Once this will be approved and merged, we can remove email notifications from UI and replace it with updated controller method to let notifications to be send to their recipients. fixes #2424 * Fix for missing SQL change (#2522) Fixes #2521 by rebuilding the PortalsDefaultLanguage view * Resolve UserProfile Loading Errors From Unsecure pages (#2494) * NOJIRA: mark as stable. * DNN-21637: add config key. * DNN-26576: prevent same-origin errors when loading popup and iframes from a secure page. * code review * Code review * (DNN-10795) - All pages except home page return 404 (#2032) * DNN-10795 - All pages except home page return 404 I have witnessed that occasionally on app pool recycle all,except the home page, will return 404 until the application pool is recycled a second time. I've reviewed the code & believe that the root cause of the issue is due to the fact that the code that builds the tab index, portalDepths dictionary & tabPaths dictionary is not thread safe. I can see code in the method TabIndexController.FetchTabDictionary is using SharedDictionary classes to store the tab dictionaries, however the code is not thread safe when adding the dictionaries to the cache. Therefore when multiple threads are executing the FetchTabDictionary method it's possible for an empty dictionary to be added to the cache. To resolve this issue the code has been updated so that only one thread can add the dictionaries to cache at a time. * Updated comment to trigger Code Licence workflow. * Added compiled DLLs that include the fix for bug DNN-10795 (All pages except home page return 404) for DNn versions 8.0.4 through 9.2.2 * Recursive read lock acquisitions not allowed (#2423) * DNN-23293 Recursive read lock acquisitions not allowed in this mode. * DNN-23293 Recursive read lock acquisitions not allowed in this mode. * Performance problems when huge number of portal aliases is in use (#2514) * DNN-27498 Performance Issues * DNN-27498 Performance Issues * minor formatting * Fixed case sensitivity issue * Added mixed cased alias support to unit tests * Fixed VanityUrl unit tests * Fixed broken LockStrategy unit tests (#2531) * Delete Fixed-DLLs folder that was added as part of PR for bug DNN-10795. (#2535) * Modules > ModuleCreator > fixed path error (#2527) * Fixed issue in ModuleCreator > Web > template.ascx * Update DNN Platform/Admin Modules/Dnn.Modules.ModuleCreator/Templates/Web/Module - HTML/template.ascx Co-Authored-By: mean2me <emanuele.colonnelli@gmail.com> * All languages are highlighted along with current - add css for languages * Log name of package when uninstalling extensions (#2557) * remove spaces * DNN-20856 After export with Content Localization site language flags disappears from pages (#2578) * Fixed parallel build (#2562) * Set active Nuget package source to All * Fixed parallel build * Inclusion of NDepend logo on the readme. (#2598) * Fix for missing SQL change Fixes #2521 by rebuilding the PortalsDefaultLanguage view * Added attribution to NDepend for the usage of their ADO tooling * Fix image/link markdown * Get language from transferred parameter (#2607) * switch encrypt method. (#2616) * DNN-29484: switch encrypt method. * NuGet Package Improvements Changes to modernize the NuGet packages published by the DNN Platform, fixes #2586. The below-submitted changes in structure have been validated by consultation with the DNN Platform Community, Microsoft Representatives, as well as validation of documentation per the published .nuspec file definition (https://docs.microsoft.com/en-us/nuget/reference/nuspec) In detail, the following items have been changed: * Migration of license information to the suggested <license> node rather than the deprecated <licenseurl> node. * Inclusion of target framework for all included .dll files, this prevents installation of the package to pre-4.5 projects protecting downstream users. * Improved package descriptions based on discussions held in the RFC regarding these improvements * Added Package-to-Package dependencies to ensure quick usage and inclusion * Updated the WebAPI and MVC packages to be holistic packages, including references to ALL needed items to develop using those patterns. All changes are current for DNN Platform version 9.3.0 or later. Packages have been built & tested locally with success. ## Suggested Usage With these improved packages, development & references should be easier. ### MVC Modules `Install-Package DotNetNuke.Web.Mvc` Should be the only needed package installation. It will install all needed dependencies, including the items necessary for WebAPI ### Modules Needing WebAPI (Not MVC) `Install-Package DotNetNuke.WebApi` Should be the only needed package for extensions not using MVC, however, needing to use WebApi for services. This will work well for WebForms or Library projects, etc. that don't need the extra references for MVC/Razor ### WebForms/Limited Modules `Install-Package DotNetNuke.Core` The most simple modules, still using the WebForms pattern can use this package for the smallest footprint For #2600 * Adjust the Source package to include changes from GitVersion (#2609) * remove old ckeditor packaging steps * Remove version to allow GitVersion to set it at build time (#2639) * Adding 09.03.01.SqlDataProvider file * Upgrade DNN to .NET Framework 4.7.2 (#2644) * Upgraded app projects to .NET Framework 4.7.2; Added missing dependency to DotNetNuke.Tests.Core as it was missing DotNetNuke.Web.Client * Removed targetframework web.config reference from Dnn.Modules.Console * Reverted unintended changes
Description of Problem
Currently, there are a number of NuGet packages that provide DotNetNuke dependencies for consumption by third-parties. These packages do work, and are used to a great extent, but don't always provide the best experience if users are not aware of what they do.
After reviewing with @donker we are proposing the following changes.
Proposed Change 1: Updating the Description of packages
Proposed Change 2: No longer publish non-recommended packages
To help prevent individuals from adding more references than are needed, the
DotNetNuke.Bundle
package should no longer be published.Proposed Change 3: Improve DNN Package to DNN Package references
To aid in development, dependencies should be set on packages to auto-install related packages.
Proposed Change 4: Improve Third-Party Dependency Management
Again to further improve
Decision Point & Question
Decision Point 1: Changes
Do all of these changes make sense? Any adjustments
Decition Point 2: Backward Compatibility
Is this something that should result in a change to existing packages? Or only for 9.3.1/9.4.0 and later?
Alternatives Researched
Items could be left as is, and manual references can be added
Affected version
All package versions
The text was updated successfully, but these errors were encountered: