Ticket T677350
Visible to All Users

Get rid of Bower and move to Libman in ASP.NET Core project templates

created 7 years ago

Good morning DevExpress team,

Microsoft has left bower out of its templates officially now for a while.  Microsoft now goes with "libman.json", when clicking on the solution and selecting "Manage Client-side Libraries".  This uses "cdnjs".  My question is, do you intend to support this repository?  The only thing I use bower for anymore, is the "devextreme-aspnet-data" library.  The "devextreme" css and js libraries, I get from the installation.  for those, I basically do a temporary install using a standard DevExtreme template, and get the js and css libraries from that (along with some of the layout setup code), then scrap the template and continue on in the project I'm working in.  I would simply use the DevExtreme templates and that would be nice, but unfortunately those templates don't support individual user accounts, forcing me to use the Microsoft default netcore2.1 web template.  It would also be nice to see that ASP.Net Pages (which has replaced MVC here for so many reasons) was used in the templates.

A couple key things to note:

  1. This new "libman.json" approach is the most ideal I've seen in the ecosystem, for a very long time.  Bower was crazy-easy, but libman (using cdnjs) is every bit as easy, and much more solid.
  2. The only thing I use the bower file anymore for, is the "devextreme-aspnet-data" library.  I would very much like to be able to retire Bower.  I did go the route of using Yarn, but that is truly meant for scripted web development, and not functional UI (Visual Studio) development.  I really wanted to like Yarn; I really did.  However, as with evaluating ANY solution as a replacement to another, one must weigh it objectively.  Yarn adds just too many steps, and too many ways to miss things.  The ONLY thing it really has going for it, is speed, and the new solution is every bit as fast, if not faster.  In contrast, "libman.json" is every bit as fast,  thorough and efficient as bower, making it an ideal replacement.  Microsoft clearly went the right direction.  It is not meant as a full replacement of everything out there, but is meant to supply the core libraries just as bower did.  "devextreme-aspnet-data" is a CORE library.

Question recap:
Will you support cdnjs with the core "devextreme-aspnet-data" client library, and if so, when?

Thank you,
Jason

Comments (1)

    I'll post my standard "libman.json" file contents in case anyone may need this as an excellent starting point.  This is what I use in my projects, which is basically what Bower includes by default, plus the font-awesome library files. (I'll post and select 'C#' since 'JSON' is not a selection option)

    C#
    { "version": "1.0", "defaultProvider": "cdnjs", "libraries": [ { "library": "twitter-bootstrap@3.3.7", "destination": "wwwroot/lib/bootstrap", "files": [ "js/bootstrap.min.js", "css/bootstrap.min.css.map", "css/bootstrap.min.css", "fonts/glyphicons-halflings-regular.eot", "fonts/glyphicons-halflings-regular.svg", "fonts/glyphicons-halflings-regular.ttf", "fonts/glyphicons-halflings-regular.woff", "fonts/glyphicons-halflings-regular.woff2" ] }, { "library": "jquery@3.3.1", "destination": "wwwroot/lib/jquery", "files": [ "jquery.min.js", "jquery.min.map", "core.js" ] }, { "library": "jquery-validate@1.17.0", "destination": "wwwroot/lib/jquery-validation", "files": [ "jquery.validate.min.js" ] }, { "library": "jquery-validation-unobtrusive@3.2.10", "destination": "wwwroot/lib/jquery-validation-unobtrusive", "files": [ "jquery.validate.unobtrusive.min.js" ] }, { "library": "font-awesome@4.7.0", "destination": "wwwroot/lib/font-awesome", "files": [ "css/font-awesome.min.css", "css/font-awesome.css.map", "fonts/fontawesome-webfont.eot", "fonts/fontawesome-webfont.svg", "fonts/fontawesome-webfont.ttf", "fonts/fontawesome-webfont.woff", "fonts/fontawesome-webfont.woff2", "fonts/FontAwesome.otf" ] } ] }

    Answers approved by DevExpress Support

    created 7 years ago (modified 5 years ago)

    Hi Jason,

    Updated

    We described how to connect Libman to local scripts in our documenation. You can also use jsdelivr or our CDN as we demonstrated at How to add DevExtreme CDN services to the Libman package manager.

    Previous versions

    Yes, we are going to remove Bower from our templates. Currently, all our resources are concentrated on implementing features for the next major DevExtreme version18.2. That is why I cannot give the exact date when we will remove the Bower dependency.

    We keep an eye on Libman and will likely support it once MS officially releases it in their built-in project templates for ASP.NET Core and resolves all technical issues (e.g. like this one).

    Technically, you can manually reference our resources using "libman.json"  right now as well.
    From the file system:

    JavaScript
    { "version": "1.0", "defaultProvider": "unpkg", "libraries": [ ....., { "provider": "filesystem", "library": "C:\\Program Files (x86)\\DevExpress 18.2\\DevExtreme\\Sources\\Lib", "destination": "wwwroot/lib/devextreme", "files": [ "css/dx.common.css", "css/dx.light.css", "js/dx.all.js", "js/aspnet/dx.aspnet.mvc.js" ] } ] }

    From "unpkg":

    JavaScript
    { "version": "1.0", "defaultProvider": "unpkg", "libraries": [ ........ { "library": "devextreme-aspnet-data@1.4.8", "destination": "wwwroot/lib/devextreme-aspnet-data" }, { "library": "devextreme@18.1.6", "destination": "wwwroot/lib/devextreme" } ] }

    Note that we don't publish our libraries on "cndjs" so you cannot use this provider to load our scripts at the moment. This part is under consideration as well.

      Show previous comments (13)

        Is there any update on this? unpkg is not working with libman at all. My restores are now failing constantly. Every other client library used in my project is available from either cdnjs or jsdelivr, only DevExpress requires unpkg. This can't continue. It's causing disruptions now.

        Artem (DevExpress Support) 5 years ago

          Hi Tyler,

          Yes, we described how to connect Libman to local scripts in our documenation. You can also use jsdelivr or our CDN as we demonstrated at How to add DevExtreme CDN services to the Libman package manager.

          However, we still don't have our packages on cdnjs and cannot give you an estimate regarding it.

            Perfect! jsdelivr works great!

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.