Monday, July 20, 2015

Big News: Introducing SitePoint Premium

SitePoint Premium Launch

We know you need content to keep you at the top of your game. You’re not a beginner anymore, but that doesn’t mean you’re not still learning every single day.

Today, we’re proud to announce SitePoint Premium, a membership subscription for web developers. It’s everything you love about SitePoint, plus:

  • Access to the full library of SitePoint ebooks
  • Hundreds of videos on topics like HTML media, Swift, React, Git, and Ruby.
  • The entire library of A Book Apart and UX Mastery titles
  • Exclusive Q&A sessions with the best developers in the business
  • To celebrate, we’re giving away a free t-shirt to the first 1000 people who sign up for SitePoint Premium.

Wait, what about Learnable?

If you’re a regular SitePoint reader, you might have seen promotions for Learnable, our online learning platform. As SitePoint grows, we’ve decided to bring Learnable under the SitePoint umbrella and expand our community.

Current Learnable members have full access to SitePoint Premium, as well as to the rest of the growing SitePoint community.

We’re so proud of what SitePoint’s hundreds of contributors are building. What do you think? What else would you like us to create?

Continue reading %Big News: Introducing SitePoint Premium%


by Simon Julian via SitePoint

ClickSpark.js – Javascript Library to Create Beautiful Particle Effects

ClickSpark.js is an open source particle effect tool for the frontend. It’s based on JavaScript and HTML5. ClickSpark.js adds beautiful particle effects to yourJavaScript events. The special feature is that image files can be used as single particles. It’s easily configurable and flexible.


by via jQuery-Plugins.net RSS Feed

Backbone.js Basics: Models, Views, Collections and Templates

In this tutorial, we’re going to explore the underlying fundamentals of the popular MV* framework, Backbone.js. We’ll take a look at models, views, collections, and templates, and see how each builds off of each other when building an application. We will also touch on responsibilities and separation of concerns, ultimately paving the way for us to build a scalable application with a sane code base.

Backbone only has one hard dependency, which is Underscore.js. We will also leverage jQuery for easy DOM manipulation. Your typical document structure should look like this:

[code language="js"]

app content here



[/code]

All app scripts must be included after the various libraries. Other than that, we’re ready to dive in!

Backbone.js & the MV* Pattern

Backbone falls under the umbrella of MV* frameworks, which means that it is primarily composed of Models and Views. Traditional MVC frameworks contain that extra C, which stands for controller. Historically, a controller would respond to some kind of user input, and communicate that input to the model, or back to the view. In MV frameworks like Backbone, though, the controller logic is handled inside the view itself. To understand a bit more about the anatomy of a JavaScript MV* framework, check out this post.

We’ve jumped the gun a bit here though, as we haven’t looked at what models and views are. Well, it’s not that complicated! I try to think of models as a “model of data”, the same way an architect might have a model of a house, or an engineer might have a model of an aerofoil. With this in mind, it’s easier to understand how a particular model is a representation of a certain set of data. In a production grade application, that data is likely stored in a database somewhere. Models can thus communicate with that database, and perform certain actions, such as CRUD operations.

What about views? Given the name “view”, it’s pretty easy to draw assumptions about the responsibility of views. If you thought that it was to render data for the end user, then you’re mostly correct. Views are indeed responsible for this. In Backbone, however, they house one other major function as I mentioned before. They handle the controller logic. In the second part of this series, I’ll get into event handling inside the view, communicating with the model, and then sending updates back to the view. For now though, it’s just important to understand that this logic does indeed exist, but resides inside the view. Let’s jump into models, and gain a better understanding of them.

Digging into Models

Here’s a little excerpt from the Backbone docs on models:

Models are the heart of any JavaScript application, containing the interactive data as well as a large part of the logic surrounding it: conversions, validations, computed properties, and access control.

With that in mind, let’s draft up a little example that we’ll use going forward. Imagine we’re running a surf shop, and we want to build a database of surfboards that we carry. That way, if a customer asks if we have a board from a particular manufacturer, or an exact model of board, or both, we can do a quick look up. Let’s also assume that we want to keep track of the stock. Our model hierarchy would look like this:

[code language="bash"]
Surfboard
|__manufacturer
|__model
|__stock
[/code]

In Backbone, we create a new model by extending Backbone.Model like this:

[code language="js"]
var Surfboard = Backbone.Model.extend({

});
[/code]

Now, we can create a new instance of this model using the constructor like this:

[code language="js"]
var board1 = new Surfboard({
manufacturer: 'Channel Islands',
model: 'Whip',
stock: 12
});
[/code]

The variable board1 now references a new instance of our Surfboard model, and contains its own set of values. As it stands though, we can pass in any values. Let’s make use of the defaults function to add some default attributes to our model. Now, it should look like this:

[code language="js"]
var Surfboard = Backbone.Model.extend({
defaults: {
manufacturer: '',
model: '',
stock: 0
}
});
[/code]

If we wanted to fetch some data from that instance, we would use get, which gets the current value of an attribute from a model. Imagine we had this markup in our document:

[code language="js"]

Manufacturer Model Stock

[/code]

We’re able to populate those fields like this:

[code language="js"]
$('#board1-manufacturer').html(board1.get('manufacturer'));
$('#board1-model').html(board1.get('model'));
$('#board1-stock').html(board1.get('stock'));
[/code]

Continue reading %Backbone.js Basics: Models, Views, Collections and Templates%


by Nick Salloum via SitePoint

Web Design Weekly #195

Headlines

Pure UI

Not only did I find myself nodding in agreeance with Guillermo Rauch throughout this awesome piece I found his passion for taking the task at hand and over delivering really inspiring. (rauchg.com)

FullStory – See what your users see.

Watch and understand how real customers are interacting with your design. FullStory records each customer session exactly as it rendered in their browser – unlocking pixel-perfect playback, DOM and console inspection, searchability on any page element or interaction, and more. Try FullStory free for 14 days! (fullstory.com)

Articles

The introduction to Reactive Programming you’ve been missing

If you are keen to get your head around and learn about Reactive Programming this is a must read explanation by André Staltz. (github.com)

Facebook’s Business Design Principles

Margaret Stewart writes about four of Facebook’s business design principles for designing great business products. (medium.com)

Become a Command-Line Power User with Oh-My-ZSH and Z

The more development you do, the more you end up in the command-line so why not get comfortable with it. This post by Wes Bos gives you some great tips to take your command-line skills to the next level. (smashingmagazine.com)

Introduction to React.js for those who know just a little jQuery (reactfordesigners.com)

Tips for making responsive web design multi-lingual (responsivenews.co.uk)

Tools / Resources

Breakpoint Tester

Breakpoint Tester is a bookmarklet which scans a website stylesheets to find user defined media query breakpoints and lets you test responsive designs based on those breakpoints, rather than fixed device widths. (breakpointtester.com)

Tools that changed my design process in the best way possible

Baltazar Pazos-Villarreal was in need of faster and more efficient tools that would help him deliver better work in less time and in this post he lists those tools. Hopefully they can also help you. (medium.com)

D3.js Design Patterns

Larger interactive d3 programs can be difficult to organise and the goal of this resource is to help you minimise the mess before it happens. (github.com)

Paths

An SVG path element editor intended to demonstrate the path syntax in an interactive interface. (jxnblk.com)

Cushion App – Peace of mind for freelancers (cushionapp.com)

jQuery 3.0 Alpha Released (jquery.com)

Little-Known CSS Facts (sitepoint.com)

Inspiration

Things will not change unless you change them for you (tobiastom.name)

“Web Design Is Dead.” No, It Isn’t. (smashingmagazine.com)

The Web We Have to Save (medium.com)

Jobs

Stack Exchange Senior Product Designer

Stack Exchange is a fast-growing, VC-funded startup with over 79 million monthly visitors. We’re looking for a talented senior designer to join our tight-knit team of designers, developers and product managers. The work you do here will directly affect millions of users around the world. (stackoverflow.com)

UI Designer – The Iron Yard

Want to use your design skills to help people in a meaningful way? The Iron Yard is hiring a UI Designer to join its product development team. As the first designer on our product team, your design abilities will have lasting impact on students as we build tools to help teachers teach and students learn. (theironyard.com)

Need to find passionate developers? Why not advertise in the next newsletter!

Last but not least…

Comments on the web – fixed forever

A extremely brilliant idea to handle all those pesky comments. (github.com)

The post Web Design Weekly #195 appeared first on Web Design Weekly.


by Jake Bresnehan via Web Design Weekly

Video: Sass vs SCSS

In this video I'll explain the differences between CSS and SCSS in Sass.

Loading the player...

Continue reading %Video: Sass vs SCSS%


by M. David Green via SitePoint

Choosing the Right WordPress Editorial Calendar Plugin

What is an Editorial Calendar?

An editorial calendar is the foundation of strategic blogging. It enables you to plan ahead, and if implemented properly should go a surprisingly long way in terms of engaging your audience and growing your subscriber base.

Do You Really Need One?

Really, at the end of the day, an editorial calendar is nothing more than a schedule. Think of it like a plan, or a timetable, or a program for your blog posts. You can use it to plot out what your next month’s worth of blog posts might look like. It can helps you determine what you need to write about, how much you need to write, and where the holes or gaps in your editorial schedule might be.

Using an editorial calendar allows you to:

  • Hone your forward planning: you can see, at a glance, what you should be writing about, and where your gaps might be. This allows you to easily schedule writing time into your diary.
  • Stave off writers’ block: I don’t know about you, but for me, the hardest part of writing is often coming up with a relevant, meaningful, engaging topic. If you have already sat down, and done this, populating your editorial calendar in advance, then when it comes time to write, you can do just that: write.
  • Go in deep: creating an editorial calendar makes you take a step back, and approach your blog from a more holistic perspective. It makes you think about your content as a whole, rather than self-contained, compartmentalised, individual posts. It allows you to approach a topic in stages, building out a series of posts to cover a specific topic more deeply; ultimately, it allows you to provide more value to your readers.
  • Capitalise on SEO benefit: rather than pluck a topic at random and dash off a quick post to keep tempo with your weekly/daily/monthly posting schedule, creating an editorial calendar makes you slow down, and select more considered topics on which to write. Keyword research should part a major role in any editorial planning process. Use the keywords for which people are searching in your blog titles, headings, copy, and meta-descriptions.

Continue reading %Choosing the Right WordPress Editorial Calendar Plugin%


by Sally Wood via SitePoint

An Introduction to NodeBots

Starter Kits

  • SparkFun Inventors Kit - This is the kit that started it all for me years ago! It comes with a range of standard components like colored LED lights, sensors, buttons, a motor, a tiny speaker and more. It also comes with a guide and sample projects you can use to build your skills. You can find it here - SparkFun Inventor's Kit.
  • Freetronics Experimenter's Kit for Arduino - This kit is by an Australian based company called Freetonics. It has very similar components to the SparkFun one, with a few small differences. It also has its own guide with sample projects to try as well. For those based in Australia, these kits and other Freetronics parts are available at Jaycar. You can also order it online here: Freetronics Experimenter's Kit.
  • Seeed Studio ARDX starter kit - Seeed Studio have their own starter kit too which is also very similar to the SparkFun and Freetronics ones. It has its own guide and such too! You can find it here - ARDX - The starter kit for Arduino.
  • Adafruit ARDX Experimentation Kit for Arduino - This kit is also very similar to the ones above with its own guide. You can find it here - Adafruit ARDX Experimentation Kit for Arduino.
  • Arduino Starter Kit - The guys at Arduino.cc have their own official kit that is available too. The starter kit is similar to the ones above but has some interesting sample projects like a "Love-O-Meter". You can find it here and often at other resellers too - Arduino Starter Kit.

With all of the above kits, keep in mind that none of them are targeted towards NodeBot development. So the examples in booklets and such are written in the simplified C++ code that Arduino uses. For examples using Node, see the resources below.

Resources To Learn NodeBots

There are a few key spots where you can learn how to put together various NodeBot projects on the web. Here are a few recommendations:

  • Controlling an Arduino with Node.js and Johnny-Five - This is a free SitePoint screencast I recorded a little while ago that introduces the basics of connecting up an Arduino to Node.js and using the framework to turn an LED light on and off.
  • Arduino Experimenter's Guide for NodeJS - An adaptation by Anna Gerber and other members of the NodeBots community from the SparkFun version of .:oomlout:.'s ARDX Guide. It shows how to do many of the examples from the kits mentioned above in Node instead of the simplified C++ code from Arduino.
  • The official Johnny-Five website - Recently, the Johnny-Five framework had a whole new website released that has great documentation on how to use the framework on Arduino and other platforms too!
  • Make: JavaScript Robotics Book - A new book released by Rick Waldron and others in the NodeBot community that provides a range of JS projects using various devices. Great for those who've got the absolute basics down and want to explore some new projects!
  • NodeBots Official Site - Check this page out if you're looking for a local NodeBots meetup near you, or to read more about NodeBots in general.
  • NodeBots - The Rise of JS Robotics - A great post by Chris Williams on how NodeBots came to be. It is a good read for those interested.

The SimpleBot

Andrew Fisher, a fellow Aussie NodeBot enthusiast, put together a rather simple project for people to build for their first NodeBot experience. It is called a "SimpleBot" and lives up to its name. It is a NodeBot that you can typically build in a single day. If you're keen on getting an actual robot up and running, rather than just a basic set of sensors and lights going on and off, this is a great project choice to start with. It comes available to Aussie attendees of NodeBots Day in one of the ticket types for this very reason! It is a bot with wheels and an ultrasonic sensor to detect if it's about to run into things. Here's what my own finished version looks like that I've prepared as a sample for NodeBots Day this year:

A SimpleBot

A list of SimpleBot materials needed and some sample Node.js code is available at the SimpleBot GitHub repo. Andrew also has a YouTube video showing how to put the SimpleBot together.

Andrew also collaborated with the team at Freetronics to put together a SimpleBot Arduino shield that might also be useful to people who'd like to give it a go as a learning project without needing to solder anything: SimpleBot Shield Kit.

Conclusion

That concludes a simple introduction into the world of NodeBots! If you're interested in getting involved, you've got all the info you should need to begin your NodeBot experience. I'll be organising the International NodeBots Day event in Sydney, so if you're a Sydneysider, grab a ticket and come along - International NodeBots Day Sydney, July 25.

If you build yourself a pretty neat NodeBot with any of the above resources, leave a note in the comments or get in touch with me on Twitter (@thatpatrickguy), I'd love to check out your JavaScript powered robot!

Continue reading %An Introduction to NodeBots%


by Patrick Catanzariti via SitePoint