Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Modern web developer tools. Good servant, bad master.

Modern web developer tools. Good servant, bad master.

Pali Ondras

October 18, 2016
Tweet

Other Decks in Programming

Transcript

  1. Me. Web developer since 2006 Working with SilverStripe from 2008

    Founder of webmax.sk, responsible for everything ;) Proud father of 2 kids (6 and 9 years old) Working only in business hours
  2. Pali Ondráš, webmax.sk This presentation is about. Git Composer Sass

    Docker Vagrant Gulp All with SilverStripe in mind.
  3. Pali Ondráš, webmax.sk How to use them? Theory. You should:

    Know basics of technology (setup, how it works) Test it before you use it in live project Know technology dependencies (OS, other technologies) Think now about future: How other people (collegues) can work with used technologies How to use same technology later (years)
  4. Pali Ondráš, webmax.sk Rules Keep versions So you can use

    it later without headaches Keep it simple Installation Usage Less is more Use as few technologies as possible All-in-one, All-4-everybody Every team member uses same technology
  5. Pali Ondráš, webmax.sk GIT .gitignore Do not use „vendor“, use

    „/vendor“ Add all modules installed by composer, e.g. „/cms“ Add all local system files or folders (.idea, .sass-cache, *.css.map, ~, .vagrant) .gitattributes Running on linux server? All files should have unix line endings for everybody Example: „* text eol=lf“ Use repo servers like Repositoryhosting.com
  6. Pali Ondráš, webmax.sk Composer Versions Example problem: event_calendar ics parser

    bug (* vs. 1.0.3) Be as much specific as possible Composer keeps versions for you in composer.lock file We commit composer.lock → possible problem (updating on php 5.4 machine and installing on 5.3 machine!) Composer is stable One problem: secure-http config value All other problems fixed by composer update or magically disappeared :D
  7. Pali Ondráš, webmax.sk SASS Compass (with Ruby) Installing and using

    ruby and compass globally = troubles in future Use rvm.io for installing desired ruby version Use bundler.io for managing versions of used gems (Gemfile) Foundation 6 Nice peace of work Works on NPM (previous versions were tied to ruby / compass) You can use only parts you need easily
  8. Pali Ondráš, webmax.sk GULP Task runner using Node.js Similar to

    composer.json - we have package.json But there is NO lock file! If you install after few weeks, you probably get different versions of modules installed. No LOCK file – you can go crazy easily ;)
  9. Pali Ondráš, webmax.sk NPM Shrinkwrap Shrinkwrape is an rescue: Run

    npm install in the package root to install the current versions of all dependencies. Validate that the package works as expected with these versions. Run npm shrinkwrap, add npm- shrinkwrap.json to git, and commit.
  10. Pali Ondráš, webmax.sk Vagrant or Docker? We started with Vagrant,

    but Vagrant was really slow and boxes were big. Switched to docker – but Docker was not our cup of tea. Installation and setup issues. We didnt succeed with all-in-one solution. Switched back to vagrant and focused on speed.
  11. Pali Ondráš, webmax.sk Boosting Vagrant LXC (on ubuntu) NFS DEV/BUILD

    times Vagrant – virtualbox – without NFS: 18s Vagrant – virtualbox – with NFS: 4,5s Vagrant – lxc – without NFS: 4,2s Vagrant – lxc – with NFS: 3,7s
  12. Pali Ondráš, webmax.sk All-in-one Vagrant solution https://github.com/Webmaxsk/silverstripe-vagrant maria db apache

    composer sspak sake gulp https://github.com/arillo/silverstripe-gulp-plate http://arillo.github.io/gulp-plate-docs/ https://github.com/vigetlabs/gulp-starter