ASP.NET Monsters #43: Hello Bundler Minifier with Mads Kristensen

Download this episode

Download Video

Description

In today's episode, Mads Kristensen sets us straight on the new Bundler Minifier and the direction the ASP.NET team has decided to take in the default project template. Mads takes us through the Bundler Minifer, what it is capable of, how it differs from System.WebOptimization and Gulp, and most importantly why it exists in the first place.

Looking for the repo we were talking about in the show? You can find it here on GitHub.

Tag:

ASP.NET

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image
      jerriep

      While I understand both sides of this argument, I personally think this is the right move. This is a much more simplistic way and I think it will serve the need of the majority of the developers out there.

      The developers who prefer Gulp / Grunt / Webpack are almost certain to have the knowledge to know how to integrate it into their projects.

    • User profile image
      KDev

      For all those who are CLI junkies, fans of Grunt, Gulp and all the NodeJS stuff they mostly have the know how and are able to set that up in Visual Studio and wont lose anything.

      There are however, another set of developers, myself included that just want to code and do not want to use any of the afore mentioned NodeJS stuff. The forced CLI path with the NodeJS path alienated a lot of Developers who just wanted to code using the goodness of VS. I / we have no care or love for the endless configuration required for theNodeJS path!

    • User profile image
      KDev

      By the way, I like most developers am confident using the CLI on Windows, Mac and Linux. I just don’t want to use it while I am coding, just like I hate JavaScript, one of the worst languages ever, hence the need for things like JSLint and the other stuff used to bandage/patch the language.

    • User profile image
      NinjaPowell

      @jerriep: Not sure if there is any argument to be had in this scenario.  Mads just had to keep explaining himself over and over to rhetorical questions/doubts.  If you want to use X then use X , but these guys just get whining unnecessarily.

    • User profile image
      EdCharbeneau

      So where does this leave the NuGet/Bower story then? As of RC2, front end dev packages were coming from Bower. There has been an effort to make NuGet .net only. Are we reversing this stance now and putting front end packages back in NuGet?

      This just leads to even more confusion, and dilutes the idea that Microsoft was finally supporting "common" web tooling in ASP.NET.

    • User profile image
      Mads Kristensen

      @EdCharbeneau​ Bower is still used for client-side dependencies in the project templates. NuGet is not being used for it and won't be in the future.

    • User profile image
      Canadian​James

      @NinjaPowell: Thanks for the watch!

      The move to grunt/gulp had been on the radar for well over a year and there are many developers who were following this. It was a great conversation with @Mads Kristensen and he helped to clarify why things were changing, and that they were doing so in a way that didn't box anyone into any particular stack.  

    • User profile image
      tarkus

      I think that having default ASP.NET templates free of all this noise (Gulp, node_modules, compiled client-side stuff) is for better! Here is an example how a simple run.js script with under 200 lines of code can handle basically all what would you normally do with Gulp including bundling and optimization via Webpack, deployment to Amazon S3, GitHub Pages with commands such as:

      > node run build
      > node run publish

      https://twitter.com/dotnetreact/status/746572694066438144

    • User profile image
      Vaso

      Also agree with @MadsKristensen. All the projects I was working on so far you just want to bundle & minify as easy & quickly as possible and go. The new approach is much faster. Tried to play with gulp and finished questioning myself: "well it is interesting what you can do with gulp but all I only need is right click on css file and minify, or select a few css files and bundle them". I simply don't need to carry hundreds of files and play configuration game in gulp.

      The way it is, just one json file is a clean approach and if you do need gulp/grunt you know what to do :)

    • User profile image
      Gonkers

      This was the correct decision by Microsoft and Mads. There is a new JavaScript package manager every couple months and a new *hot* JS framework every week. By the time anything JS matures there are 3 new options to replace it.

      Also the Monsters bloggers came off as a little unprofessional in sounding like Chicken Little.

    • User profile image
      Simon

      Thank God finally. It was very difficult to explain team how to use gulp grunt.

    • User profile image
      tugberkugur​lu
      All of the concerns explained in this video are addressing concerns for project template which is not being used on real world, production projects. I suggest you to do two of the followings:
       
       - Make it really clear that this thing is just there for people to get started with the templates. It doesn't give all the things that would make modern web applications work in the best way (e.g. code splitting, etc.).
       - Get rid of bundling and minification on templates as it's not really something that you care about on a template project. Just to sake of showing off on demos, it has no value.
       
      This does so little that it will not work for vast majority of JavaScript projects. So, people will always look for other alternatives and that will be Webpack today. Webpack has a great community around it. So, any efforts spent outside of nodejs tech on client side optimization are thrown away efforts that I would rather people at ASP.NET team to spend somewhere else.
       
      I am not saying Webpack is ultimate tool which will be something we will use for the rest of our lives. Web development is ruthless and it will probably be succeeded by something else tomorrow. However, that thing will come from nodejs stack. So, trying to make people move away from nodejs stack is not something that I have empathy for.
    • User profile image
      Os1r1s110

      Would be nice to add an option to autoprefix. It is not hard to do with Gulp/Grunt but it would be a nice addition to the bundler/minifier as it's a feature most people need when coding CSS.

    • User profile image
      David​Paquette

      @Os1r1s110: I think that would be an example of trying to do to many things with the Bundler Minifier tool.

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.