HTML5, CSS3, jQuery, JSON, Responsive Design...

Kendo UI with ES6 modules, via Webpack, SystemJS & Babel

Michael Brown   March 27 2016 07:14:36 PM
From my Github account.  I've set up a boilerplate repository that shows how to use the KendoUI Pro widget system with Webpack module loader and ES6 modules.

I discovered that Kendo is AMD compliant.  So my aim was to try and reduce the page load times by avoiding a full load of Kendo, which is 2.5 meg (900kb gzipped) for the file kendo.all.min.js!  By using Webpack to load up only the Kendo modules that I needed for my demo, I was able to reduce that to a single file of 900kb minified (300kb gzipped).

All this requires NodeJS/npm and a (shock, horror) build step!  Actually, it's not too bad when you get used to it, but I appreciate that for some web developers, requiring a build step for JavaScript is a step too far.  So, I've also included a SystemJS version in the repository too.  SystemJS loads all the individual kendo JS files on-the-fly for you; i.e. no build step.  It's slower, because it's loading the files individually, instead of as one combined file, and there can be quite a few files pulled in by Kendo.  For that reason, I'm not sure if SystemJS is viable for larger production projects, but see for yourself.  It should at least give you a feel for what module loaders are and what they can do for you, i.e:
  1. Break your code into manageable chunks, but without...
  2. ... having to manage a boat load of script tags on your HTML pages.  This includes avoiding any mutual dependency, infinite loop type problems.  
  3. Banish global variables and having all your functions in global scope.

Honestly, once you've coded using JavaScript modules, and see their benefits, then there's really no going back.  You can now have multiple developers working on an app, without running into save conflicts because they're all editing the same, massive JavaScript file!!  No more loading huge, third party function libraries when you only need one or two functions out of them anyway.

This is the future.  Modules are part of ES6, which is the next, official version of JavaScript.  It's not some third party, jury-rigged system, that may or may not become a de facto "standard" one day, if only enough developers come on board.  This is going to happen.  Well, it will as soon as the browser makers get off their backsides!   Many of them have native support for numerous other ES6 features, but so far, only Chrome has tentative native support for modules (the import statement), and even that's stuck behind a compatibility flag.  Until the, we have to rely on loaders like Webpac, SystemJS and Browserify.

https://github.com/brownieboy/kendo-webpack-systemjs
Comments

1cghgjh  03/17/2017 1:34:09 AM  Kendo UI with ES6 modules, via Webpack, SystemJS & Babel

If you’re pretty much passionate towards playing racing games, you can find bounteous games on the Google Play Store app store marketplace.

{ Link }

2cghgjh  04/15/2017 11:47:59 PM  Kendo UI with ES6 modules, via Webpack, SystemJS & Babel

Bleutrade is a startup focused on cryptocurrency exchange based in Brazil, Porto Digital (Recife/Pernambuco), a leading technology hubs in Latin America known as the Brazilian Silicon Valley. Our goal is to be one of the most secure, fast and stable cryptocurrency exchange in the market, providing the best user experience.

{ Link }

About