gulp overview

Post on 21-Jan-2018

339 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Gulp

Frontend Ecosystem overview

Frontend Ecosystem overview

Gulp basics

• Gulp is a tool for developers

• Write code, not configuration

• Concentrates on giving you little helpers called plugins supposed to do one and only one thing.

• There’s no “advanced” of gulp

• Gulp stays lean and provides very minimum to accomplish the task.

Gulpfile

• gulpfile.js is an entry point that will be reach when executing gulp commandName

streams

var fs = require("fs");

var readStream = fs.createReadStream("./file1.txt");

var writeStream = fs.createWriteStream("./output.txt")

readStream.pipe(writeStream);

readStream.pipe(process.stdout);

Visual Studio

• Task runner http://webtooling.visualstudio.com/task-runners/gulp/

• Web Essentials http://vswebessentials.com/

• Node JS tools https://www.visualstudio.com/en-us/features/node-js-vs.aspx

Node JS tools (extensions and updates)

NPM Scripts Task Runner

Npm/bower vs nugget

• Nuget is not designed for frontend packages.

• Npm and bower contains more packages.

ASP.NET trends

• The .NET ecosystem is migrating to the existing toolchains, instead of trying to roll their own.

• New versions of .NET are changing their task runners to use Gulp, and they are also switching to JSON-based configuration.

• .NET is aiming to become more portable. Using the tools provided by the frontend ecosystem (which is by nature platform-agnostic) makes sense in this regard.

• These tools are usable outside of the confines of .NET (as JS in the browser, again, has become its own system).

• You'll simply have more options in the long run (and, arguably, earlier).

Frontend in ASP.NET world

• ASP.NET bundles and minification is going to be deprecated

• Frontend development is no longer a subset of backend development

• Frontend is moving faster - much faster - than the equivalent tools in Visual Studio

Handling legacy

• Separate backend from frontend. Move to SPA app.

• Do not rely on platform features such as ASP.NET MVC bundles.

• Make your app backend agnostic.

Interesting info

• Introduction to ASP.NET 5 https://channel9.msdn.com/Events/Visual-Studio/Connect-event-2015/100

• https://github.com/aspnet/benchmarks

top related