On Our Radar: Closures, Copyright and the Best Apps of 2014

By Paul Wilkins

Hello and welcome to On Our Radar This Week, where we keep you up to date with the most interesting conversations that are taking place on the SitePoint forums.

It’s been a busy week, and we’ve had plenty of great threads covering demystifying closures, details on using photos from other sites, a renewed discussion about whether dependency injection breaks encapsulation, and your best apps of 2014.

Demystifying closures

In JavaScript, closure is a very handy technique that allows a function to retain a reference to variables from its parent scope. It can be confusing though as to how this is achieved, and how to make the best use of it.

The discussion on demystifying JavaScript Closures, Callbacks, and IIFE’s had a lot of valuable comments, and demonstrated that the manner in which we talk about closures can be confusing.

Click through to join the discussion.

Using photos from other sites

Web development can be an image-heavy process, so the discussion around using photos from other sites has really taken off and helped people to understand issues around copyright.

There are lots of stock photo sites that allow you to buy the rights to use certain images, and a Google Image Search even has a usage-rights selection so that you can search for images that you’re allowed to use.

One of the fundamental ideas that came up in the thread is that you’re free to use photos that you’ve taken yourself, but when it comes to photos that other people have taken, you need to discover the license that’s on the photo. Once you’ve done that and the license allows you to use it, or you’ve paid for the right to use the photo, it’s all on from there.

Click through to join the discussion.

Click here to check out the discussion and join in yourself.

Dependency injection breaks encapsulation

A long-running and at times controversial discussion on dependency injection has renewed, with the aim of having a civilized discussion about whether dependency injection breaks encapsulation, and if there are times that dependency injection (DI) may not be useful.

From the discussion it seems that if you’re intent on staying away from DI you then end up with having spooky action at a distance, where a class has secret unknown hooks into other areas that you weren’t aware of.

It’s difficult to find good examples against DI, as using that technique results in portable code that can benefit multiple people in different situations. It seems that there really are few options when you want to increase the reuse of code and reduce maintenance costs.

Some of the more useful article links that came up in this discussion have been:

Click through to join the discussion.

Best apps of 2014

Lastly for this week, there’s a renewed interest in the best apps of 2014. Some thought that Google Inbox was slightly overhyped, but on the flipside Google Now was generally seen to be quite impressive.

Sunrise was noted as an impressive, visual weather app, and Jelly was brought up as an interesting way to ask questions about visual topics.

Your thoughts

That’s all for this week, we hope you’ve found the time to join in on some of the vibrant conversations taking place in the SitePoint forums.

Have you come across other interesting discussions that are worth featuring? Come along and share your thoughts.



Learn Coding Online
Learn Web Development

Start learning web development and design for free with SitePoint Premium!

Instant Website Review

Use Woorank to analyze and optimize your website to improve your website to improve your ranking!

Run a review to see how your site can improve across 70+ metrics!

Get the latest in Front-end, once a week, for free.