Front-end Build tools. Broccoli: An alternative to seriously consider.

Broccoli is a relatively new front-end build tool. Given that there’s already Grunt, Gulp, Brunch and others, why do we need another one?

I’ve asked the same question, but like to investigate and evaluate the potential of things, so I took a look at this post: (http://www.solitr.com/blog/2014/02/broccoli-first-release/)

First, I must say it’s one of the best and thorough Motivation pieces I’ve seen. A strong attempt to remain unbiased and a strong use case exists.

Also doesn’t dismiss other tools, just defines their use case and potential downsides.

For example, Grunt is a task runner, and not really a build tool. The plan with Broccoli is to integrate with Grunt as Grunt is good for running general purpose scripts and tasks. I really like that.

The Motivation also doesn’t recommend using it just yet, but to check it out, experiment, provide feedback and keep an eye out.

So, I’d also suggest you at least read this post and become aware of some potential issues with Grunt, Gulp and Brunch. After reading this, I’ll stick with Grunt, and be experimenting with Broccoli.

Java8: A good video showing major features

There are many great (and long overdue) features coming in Java8. Amongst those are the new Date/Time API, interface enhancements, additions to both concurrency and NIO and miscellaneous helper methods on String and Collections.

The ‘List of Java8 features’ link provides a very good overview of the changes. The video does a great job of demonstrating the functional additions to Java8, and their benefits. Lambdas (syntactic sugar for functional interfaces), interface improvements, Streams and Collection enhancements, as well as the introduction of Optional.

This brings Java8 closer to the other common JVM languages. It still isn’t as powerful functionally as Groovy or Scala, but at least it’s a really good step in the right direction.

One limitation of Java8 is one can only define a Lambda that takes at most 2 parameters. There are other weaknesses, but overall, some powerful additions.

Live Coding Java8: http://parleys.com/play/52a4b5cfe4b0e619540cc470/chapter0/about
List of Java8 features: http://www.techempower.com/blog/2013/03/26/everything-about-java-8/

Eclipse User: Getting started with JetBrains Intellij IDEA

Rebellabs has posted a good ‘getting started’ guide. If you’re interested in Intellij IDEA, well worth skimming through.

I’ve used Eclipse for many years, and started using Intellij almost 2 years ago. Given a choice, I will always choose Intellij. It’s knowledge of the code base, and interrelationships allows it to provide a lot of assistance. I even use it when working on front-end development work.

http://zeroturnaround.com/rebellabs/getting-started-with-intellij-idea-as-an-eclipse-user/

Grunt: Reducing duplication in output html

I’ve been using Grunt a lot lately for a POC. It’s great for building static pages from less, javascript and html snippets.

To reduce the duplication of my original html snippets, I’ve been using the grunt-bake https://www.npmjs.org/package/grunt-bake plugin. It allows you to define includes as comments in your file, and it will then include the file identified.

It also supports rudimentary templating so that you can pass attributes that will be replaced in the included snippet, as well as if and foreach type functionality.