Learn More





DNN Community Blog

The Community Blog is a personal opinion of community members and by no means the official standpoint of DNN Corp or DNN Platform. This is a place to express personal thoughts about DNNPlatform, the community and its ecosystem. Do you have useful information that you would like to share with the DNN Community in a featured article or blog? If so, please contact .

The use of the Community Blog is covered by our Community Blog Guidelines - please read before commenting or posting.

3 Reasons why We're Moving from Grunt to Gulp

We've been working with JS-Automation for about a year now, specializing more and more on Grunt. But the more we relied on it, the more we had to go out of our way to get around problems inherent to Grunt. With Gulp, this changed. 

Just to be clear: we started out with Grunt because we believed that it's better to use a stable, proven system than to risk jumping onto the newest fad. And a year ago, where were also much more plugins in Grunt than in Gulp. And we can testify that everything we needed to do could be done in Grunt, and we were very grateful for that. I even wrote some blogs about grunting. But IRL (in real life) we kept on running into issues which hurt our productivity and introduced unnecessary chaos and risks. Because of this, we are now continuously moving all our automation to Gulp. Not in one big gulp, but sip-by-sip (yes, the word-play is also better with gulp :)).

Reason 1 - it's about 100x - 1'000x faster IRL

Now these are in-real-life numbers, and it surprised me as well. The reason is fairly complicated and certain factors make it worse. So a job that took Grunt 5-20 seconds was completed within milliseconds. This means a lot when you're trying and tweaking some values. With Gulp, we can now save the original file (like making a change in a CSS) and by the time we were able to Alt-Tab-Switch to the browser, everything in the background had already completed. With Grunt we were always forced to wait for the logger to show completion, which breaks the flow you're in. The core issues are:

Speed on each File Change: 100-1000 times faster

When using grunt/gulp, you will often have a watcher-task which monitors file changes. When using grunt, every file-change will trigger a new grunt-task, which will then load thousands of tiny JavaScript files into memory to start running the program. This happens on each file change and is already fairly slow when everything is on your PC. On a complex grunt-job with files on the network, this can easily take 10 seconds. Every time. Gulp is much better at this - it only loads the program once, and re-uses it on file-changes. In our case this gave us a factor of about 100 on local dev-projects, and factor of about 1'000 on local network projects.

Reason 2 - Grunt-Configuration becomes unmanageable IRL

Again an in-real-life experience which surprised us. Basically Grunt rules are configured in a JSON-style syntax, and then you define commands (called tasks) which run the automation on this configuration bit. This seems simple and straightforward but results in chaos in large systems. Here's why:

Take for example the configuration of a copy-job, something that you need a lot in Grunt, because each step in grunt starts with files lying in a folder. So you often have to copy some files to another temp-folder, to then do further processing. Now imagine that you have various automations, each needing a different copy-task. Here's the tree of configurations in Grunt just for various copy-actions (without the actual configuration):

  • copy (this is the root configuration node for copying
    • mainPart (a sub-configuration for some actions)
    • mainPartDist (another sub-configuration)
    • import-languages (another sub-config)
    • import-icons (another sub-config)
    • publish-dist (another sub-config)

This is all fairly clear. Now in a real grunt-job you will have to list which steps to perform, like

  1. Copy files from src to tmp
  2. Generate some more files from other file into the same tmp (from SCSS, Typescript, HTML-files, etc.)
  3. Do some checking
  4. Copy something again
  5. Merge / rename
  6. Compress
  7. Etc.

So you'll have many such processes, each of them should only use certain parts of the copy-job at the right time. And it's easy to accidentally use the whole copy-job (which causes loads of issues and takes long) or to confuse certain parts because the entire grunt-file gets so long, that you start making mistakes. There are also cases where one configuration can overwrite the other, causing really nasty surprises. In our EAV-UI project which is a foundation of 2sxc, we ended up with about 1'000 lines of grunt code and every change we had to make was scary.

Reason 3 - Low-CPU File-Watchers on the Network

As we noted in the speed-issue, these task-engines need to continuously monitor file-changes to then start a process once the file has changed. Gulp has a built-in watcher called…), which works very, very well over the network. It does exactly what you expect.

Not so with grunt. Watching is a plugin, and the ones we were able to use somehow were not able to really hook into the windows-file-change-API. This meant that the grunt-watchers we used, ended up performing the watch manually by continuously checking each file. This just burned the CPU of the dev-machine, causing a normal load of 30-80% just because it was watching the files. In addition, the change-recognition time was of course much worse than with gulp.


These are just three reasons why we're making the move. In general I can say that if you've figured out the concept of JavaScript task runners, you'll feel fairly comfortable with either one; and as your needs get more advanced, you'll feel more comfortable with Gulp. Since Gulp has been so popular for a while now, there are enough plugins now for every need. And if you do run into a need for which there is no gulp-plugin, there is always gulp-grunt, a bridge component which lets you run grunt-tasks from inside gulp. Or you can use both Gulp and Grunt side-by-side. So have fun :)


Love from Switzerland,

Daniel Mettler grew up in the jungles of Indonesia and is founder and CEO of 2sic internet solutions in Switzerland and Liechtenstein, an 20-head web specialist with over 800 DNN projects since 1999. He is also chief architect of 2sxc (see forge), an open source module for creating attractive content and DNN Apps.

Read more posts by Daniel Mettler


There are currently no comments, be the first to post one.

Comment Form

Only registered users may post comments.


2sic Daniel Mettler (125)
Aderson Oliveira (15)
Alec Whittington (11)
Alex Shirley (10)
Andrew Nurse (30)
Anthony Glenwright (5)
Antonio Chagoury (28)
Ash Prasad (22)
Ben Schmidt (1)
Benjamin Hermann (25)
Benoit Sarton (9)
Beth Firebaugh (12)
Bill Walker (36)
Bob Kruger (5)
Brian Dukes (2)
Brice Snow (1)
Bruce Chapman (20)
Bryan Andrews (1)
cathal connolly (55)
Charles Nurse (163)
Chris Hammond (203)
Chris Paterra (55)
Clinton Patterson (28)
Cuong Dang (21)
Daniel Bartholomew (2)
Dave Buckner (2)
David Poindexter (3)
David Rodriguez (2)
Doug Howell (11)
Erik van Ballegoij (30)
Ernst Peter Tamminga (74)
Geoff Barlow (6)
Gifford Watkins (3)
Gilles Le Pigocher (3)
Ian Robinson (7)
Israel Martinez (17)
Jan Blomquist (2)
Jan Jonas (3)
Jaspreet Bhatia (1)
Jenni Merrifield (6)
Joe Brinkman (270)
John Mitchell (1)
Jon Henning (14)
Jonathan Sheely (4)
Jordan Coopersmith (1)
Joseph Craig (2)
Kan Ma (1)
Keivan Beigi (3)
Ken Grierson (10)
Kevin Schreiner (6)
Leigh Pointer (31)
Lorraine Young (60)
Malik Khan (1)
Matthias Schlomann (15)
Mauricio Márquez (5)
Michael Doxsey (7)
Michael Tobisch (3)
Michael Washington (202)
Mike Horton (19)
Mitchel Sellers (28)
Nathan Rover (3)
Navin V Nagiah (14)
Néstor Sánchez (31)
Nik Kalyani (14)
Peter Donker (52)
Philip Beadle (135)
Philipp Becker (4)
Richard Dumas (22)
Robert J Collins (5)
Roger Selwyn (8)
Ruben Lopez (1)
Ryan Martinez (1)
Salar Golestanian (4)
Sanjay Mehrotra (9)
Scott McCulloch (1)
Scott S (11)
Scott Wilkinson (3)
Scott Willhite (97)
Sebastian Leupold (80)
Shaun Walker (237)
Shawn Mehaffie (17)
Stefan Cullmann (12)
Stefan Kamphuis (12)
Steve Fabian (31)
Timo Breumelhof (24)
Tony Henrich (3)
Torsten Weggen (2)
Vicenç Masanas (27)
Vincent Nguyen (3)
Vitaly Kozadayev (6)
Will Morgenweck (37)
Will Strohl (163)
William Severance (5)
Try Evoq
For Free
Start Free Trial
a Demo
See Evoq Live
Need More Information?