edit: I could see this being just a good general approach to development. Like a concrete how-to on doing continuous delivery from day one. I've even started using grunt with a C++ project I'm working on, and if I make sure that from day one I can start up from a new machine: % grunt init ... my life is better. It's interesting, grunt is a nice "automation layer", as opposed to a build tool. I'm now using it to autom…
What makes grunt better than the alternatives?
I'm writing a book: "JavaScript Application Design: A Build First Approach"
11–20 of 20 posts
Re: I'm writing a book: "JavaScript Application Design: A Build First Approach"
#12I miss the structured approach provided by Maven+Java+JUnit+Mockito+Selenium/Sauce-lab/any-functional-test combo and am looking for good resources to replicate this on the JS side (preferably the front-end side as I don't care much of NodeJS at the moment).
I'd like to learn:
1. Better build process for all of the front-end (HTML/CSS/JS) components
2. Better UNIT-testing approach (not half-unit-testing-but-with-browser-dom-faked-out-approach) maybe a'la MVP pattern like the one in GWT.
Basically I'm not going to entertain anything that requires a browser to be launched (because it requires a lab/dedicated machine) because I'm looking for Unit-Testing not "Integration/Functional-testing"
3. Better automation (in general) of the UI/front-end component
For example:
- replace build version => main.css?{some_build_num} (or main_{build_num}.css)
- LINT-ing
- Compilation/obfuscation (could be merged with LINT-ing to some degree)
- Auto-generate JS documentation (provided the code has proper comments) and auto-publish JS documentation [Maven supports this for Java]
4. MUST have xUnit output (crucial for my next point)
5. EASY to run/configure on CI servers (Jenkins, Bamboo, etc)
- continuation from #4, code coverage + unit-tests result should be available on the CI build report
6. Packaging? Dependency management?
So far front-end development has been.... less desirable because of the tools are far less superior than doing back-end development (regardless how beautiful/ugly JavaScript is, I'm 100% or even 1000% way more productive on doing back-end development).
I'm very much interested in learning the best practice and to increase my productivity developing front-end and this book seems to cover some of the points I mentioned above but not sure how meticulous/detailed the coverage is.
There's TDD.js book but I'm not sure if it has done a good job covering pure unit-testing and strategies to refactor/perform unit-testing correctly.
Re: I'm writing a book: "JavaScript Application Design: A Build First Approach"
#13I've been dabbling with JS more and more lately at work or at home. I miss the structured approach provided by Maven+Java+JUnit+Mockito+Selenium/Sauce-lab/any-functional-test combo and am looking for good resources to replicate this on the JS side (preferably the front-end side as I don't care much of NodeJS at the moment). I'd like to learn: 1. Better build process for all of the front-end (HTML/CSS/JS) components 2…
Re: I'm writing a book: "JavaScript Application Design: A Build First Approach"
#14I've been dabbling with JS more and more lately at work or at home. I miss the structured approach provided by Maven+Java+JUnit+Mockito+Selenium/Sauce-lab/any-functional-test combo and am looking for good resources to replicate this on the JS side (preferably the front-end side as I don't care much of NodeJS at the moment). I'd like to learn: 1. Better build process for all of the front-end (HTML/CSS/JS) components 2…
Re: I'm writing a book: "JavaScript Application Design: A Build First Approach"
#15edit: I could see this being just a good general approach to development. Like a concrete how-to on doing continuous delivery from day one. I've even started using grunt with a C++ project I'm working on, and if I make sure that from day one I can start up from a new machine: % grunt init ... my life is better. It's interesting, grunt is a nice "automation layer", as opposed to a build tool. I'm now using it to autom…
What makes grunt better than the alternatives?
But Grunt has a huge library of plugins that cover all your build automation needs, and that's made it the de-facto standard for build automation in the JavaScript world.
I'm working on a universal build format that would allow you bring the convenience of Grunt plugins to other tools as well. (I'm fond of Jake, myself.) PM me or follow my Github [1] for more. The first version's going up next week.
Re: I'm writing a book: "JavaScript Application Design: A Build First Approach"
#16I've been dabbling with JS more and more lately at work or at home. I miss the structured approach provided by Maven+Java+JUnit+Mockito+Selenium/Sauce-lab/any-functional-test combo and am looking for good resources to replicate this on the JS side (preferably the front-end side as I don't care much of NodeJS at the moment). I'd like to learn: 1. Better build process for all of the front-end (HTML/CSS/JS) components 2…
Regarding your bullet list, the book covers all of your concerns. Grunt just depends on node/npm, and I describe how to get CI working properly with Grunt.
The first part of the book is entirely dedicated to automation and the build process, and it definitely covers things such as asset revving, linting, bundling, and minification.
When it comes to modularity (commonjs, amd, etc), dependency resolution (circular or otherwise), and package management, that's detailed in Chapter 5, at the beginning of Part II.
Unit Testing is covered in Chapter 8. I won't talk about TDD other than briefly mentioning it, but what I _will_ be talking about is automating unit tests, abstracting browser interaction, using PhantomJS to avoid firing up a browser, and using karma to run tests using Chrome automatically.
The testing chapter will go over real-life case scenarios, as well. To be honest, I'll cram as much high quality content as I can in the book/samples, but if you're looking for testing-heavy (or TDD) content, I'd suggest you look elsewhere
Most of the content covered in the book is further expanded in the code samples, which are open source: https://github.com/bevacqua/buildfirst
Re: I'm writing a book: "JavaScript Application Design: A Build First Approach"
#17I've been dabbling with JS more and more lately at work or at home. I miss the structured approach provided by Maven+Java+JUnit+Mockito+Selenium/Sauce-lab/any-functional-test combo and am looking for good resources to replicate this on the JS side (preferably the front-end side as I don't care much of NodeJS at the moment). I'd like to learn: 1. Better build process for all of the front-end (HTML/CSS/JS) components 2…
Hi there, Regarding your bullet list, the book covers all of your concerns. Grunt just depends on node/npm, and I describe how to get CI working properly with Grunt. The first part of the book is entirely dedicated to automation and the build process, and it definitely covers things such as asset revving, linting, bundling, and minification. When it comes to modularity (commonjs, amd, etc), dependency resolution (cir…
I here you and I understand the approach you take for this book and I agree with your approach because I don't think a single book can have everything on my bullet points.
I really really hope that there's a de-facto stack for front-end development and let that stack stabilize for a while so that people can build on top of it (as opposed to keep on solving individual problem with a single specific brand-new-hip-tool-which-will-get-outdated-soon).
I hope Yeoman (Grunt and Bower) can be a part of the solution for the long-run and hopefully your book can be a foundation where people based-off future books (i.e.: JavaScript test automation should be based-off something).
Re: I'm writing a book: "JavaScript Application Design: A Build First Approach"
#18I've been dabbling with JS more and more lately at work or at home. I miss the structured approach provided by Maven+Java+JUnit+Mockito+Selenium/Sauce-lab/any-functional-test combo and am looking for good resources to replicate this on the JS side (preferably the front-end side as I don't care much of NodeJS at the moment). I'd like to learn: 1. Better build process for all of the front-end (HTML/CSS/JS) components 2…
You might like my screencast, Let's Code: Test-Driven JavaScript . It covers everything you're talking about. http://www.letscodejavascript.com
Re: I'm writing a book: "JavaScript Application Design: A Build First Approach"
#19Earlier quoted context omitted.
You might like my screencast, Let's Code: Test-Driven JavaScript . It covers everything you're talking about. http://www.letscodejavascript.com
Bookmarked and will definitely start watching today. As you can see, I'm in serious P.A.I.N on front-end (especially when I'm comparing with my process on the back-end).
* Large-Scale JavaScript Fundamentals. Summary of front-end workflow fundamentals. Check out the build script included in the example source code, too. http://www.letscodejavascript.com/v3/episodes/lessons_learne...
* Front-End Unit Testing in a Nutshell. A summary of several strategies for testing browser DOM code. http://www.letscodejavascript.com/v3/episodes/lessons_learne...