Tuesday, 18 April 2017

Why use package managers, grunt and other build tools

Erratums:

  • I'm not an experienced-old-school-god-of-codes web developer, so take it easy;
  • I know there is a lot of similar questions, but I have my own arguments;
  • I just started to use those tools, so I guess it's normal to have doubts.

Ok, lets begin.

Introduction:

I used to build websites in the normal way. Set up a server, do everything I want and upload everything with FTP. For small changes (like logo, grammar and things not important), I even used to edit directly into the websites, with a FTP file manager for Atom editor.

But lately I noticed that the far I went into plugins, the far I heard about package managers. Some plugins doesn't even count with another way to install but with NPM, Composer and stuff.

Arguments:

I really do find a <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> in my html files (or download it and upload) easier than install Node.js, NPM and run a command into CMD to download such files and after that have to include everything through a long path until get into the files. Or, if I want to make this processes easier, I'll have to install another packages and thing.

If I want to distribute my things, everyone will have to download Node.js, NPM, Ruby and a thousand of other things that, in my vision, wouldn't be neccessary if I just build the website in the normal way.

Ok, Grunt can concatenate, minify and automate tasks. I know that PHP is not a front-end thing, but probably the host will run with Apache, so I can use some commands and, for example, create a file that concatenate every CSS files and minify them before send to the client, for example. I can include files and create in a really easier way than downloading, installing, running commands and a lot of another stuff.

I read that it could help with big projects by helping with versions, update and thing, but since I'm not working at Microsoft or working with a Google server, is them useless?

Conclusion:

Why use these tools?



via Igor

No comments:

Post a Comment