Saturday, January 31, 2015

transForm : jQuery Customize Form Look plugin

Using transForm jQuery plugin you could customize the look and feel of your web forms. They will be displayed identically into every modern web browser.


Features:



  • Supports wide range of form tags, including fieldset, legend, label, multiple select and new HTML5 input types.

  • Keeps logical structure of the form elements, so the HTTP request will be identical as normal form.

  • The drop-down menus are fully styled (not only the header).

  • Text areas can be configured to be expandable (when the caret goes to new line).

  • Configurable maximum character limit for text areas.

  • Easy to change the status of transformed elements from JavaScript (changing value, disabled, readonly, checked attributes) using acquired DOM element


The post transForm : jQuery Customize Form Look plugin appeared first on jQuery Rain.




by Admin via jQuery Rain

Multi-Download : jQuery Plugin for Download multiple files

Multi-Download is a jQuery plugin for Download multiple files at once.


The post Multi-Download : jQuery Plugin for Download multiple files appeared first on jQuery Rain.




by Admin via jQuery Rain

jQuery Github Feed

jQuery plugin to take the feed from github usename.


The post jQuery Github Feed appeared first on jQuery Rain.




by Admin via jQuery Rain

Fascinating #SocialMedia Stats 2015: Facebook, Twitter, Instagram, Google+








This is a guest post by Michael McPherson.



Social media entered people lives not that long ago. But in this little time, it has become more than a part of reality. Social media is now a parallel world. Here, users all around the globe have built personal lives, have developed relationships, have shared their experiences, and have also grew businesses. Domains like marketing and advertising have a completely new meaning since social media existed. Today, in 2015, the saying is that if a person doesn’t have a social media account, he or she simply doesn’t exist. And the same goes for companies. So let’s see the latest social media analytics for the most popular websites.



Read more →



by Irfan Ahmad via Digital Information World

Stoyan Kutsev Art Projects

About the art of Stoyan Kutsev. Art Projects – Selected. Performance, video, objects, paintings




by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Prollective

We’re a collective of digital specialists. We create unique front-end experiences for all platforms.




by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Powerhouse Dance Academy

Powerhouse Dance Academy is a recently established dance studio in Kent, UK




by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Alyoop

Alyoop is made up of two like minded designers from Melbourne, Australia. We have a passion in communicating our ideas into creative designs. We pride ourselves in having a careful process to design the best possible outcome.




by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Bootstrap Switch

Bootstrap Switch is a jQuery plugin that turns checkboxes and radio buttons in toggle switches.




by via jQuery-Plugins.net RSS Feed

5 Questions for Business Owners to Ask Before Posting to #SocialMedia - #infographic





If everything in business came with instructions, perhaps anyone and everyone would be successful. But for new small business owners who plan to use social media to grow their consumer base, it isn't as simple as it is for the everyday user. Much like how you run your business, you have to have a game plan before jumping into the crazy world of social media marketing.



As a business owner, you should have the answers to at least these five questions before you even posting, tweeting, or uploading information onto a social media platform:

Read more →



by Irfan Ahmad via Digital Information World

Assassin's Creed Unite


The trailer of the latest Assassin's Creed game does not just feature one hero: its stages thousands of them. All created by the fans. Some lucky fans even got the surprise to find their avatars posted in the city.

by via Awwwards - Sites of the day

Friday, January 30, 2015

Social Auth For PHP Standalone Sites and Applications

Social Auth Plugin is the authentication and authorization solution based on social networks for web applications. Nowaday, almost internet users have at least one account on social networks (like Facebook, Twitter or Google Plus …). Therefore allowing users log in your applications/sites (apps) via social network accounts is not only help your users approach your apps easily but also help you reduce amount of work which is not necessary to focus on developing your apps. So now I introduce you a simple way to make a Social Auth plugin for your apps.


The post Social Auth For PHP Standalone Sites and Applications appeared first on jQuery Rain.




by Admin via jQuery Rain

jQuery Combobox plugin for Twitter Bootstrap

Combobox plugin for Twitter Bootstrap, based on dropdown (which is compatible down to IE7).


The post jQuery Combobox plugin for Twitter Bootstrap appeared first on jQuery Rain.




by Admin via jQuery Rain

9 Graphic Design Trends for 2015 - #infographic






To start the year right for people in the design and print industry, Cardprinting, a plastic card printing company in Monsey, New York, has come out with another infographic called "9 Graphic Design Trends for 2015". In keeping with their previous infographics, this one is also intended to be used as a reference: comprehensive and straightforward for the professional who needs a refresher, yet simple enough for the amateur who is looking to create for personal use.



Although there are a lot of elements that can make a great design, this infographic enumerates and describes the top 9 which are essential in achieving a look that is representative of the coming trends for this year. In 2015, flat design is in and is already used by big companies. Borrowing from Swiss, Minimalist, and Bauhaus, this design forsakes dimensionality and will most likely use bright pastel colors. In terms of layout, Grid, which celebrates geometry and precision, will be used on more and more websites,



The loud, funky and brightly colored elements, and short quirky slogans of Kpop, which has boomed during the past few years, will be the choice for embellishments, mixed with non-traditional, custom and handwritten fonts which will be the rage, thanks to the rise of free typekits like Google fonts.



Stock photos are out, and illustrations are in, as well as the use of single shades of solid colors. Both taking an inspiration from the past, seemingly opposite designs - the zany colorways and flowery classic detailing of paisley pop, and the heavily geometric pixel play will both be favored for this year.


Read more →



by Irfan Ahmad via Digital Information World

On Our Radar This Week: Bees with Machineguns

Welcome to On Our Radar, our weekly round-up of news, trends and other cool stuff from the world of web development.


Great user experiences


This week an interesting look is taken at the iOS interface and how we can benefit from using using motion for user experience on apps and websites. Apple have just posted the largest quarterly earnings in history, so they must be doing something right. On a similar global scale, Riot Games have been experimenting on users with League of Legends. Take a look inside the largest virtual psychology lab in the world and how they are using psychology to help their players behave themselves.

Withstanding "break the internet" events


Speaking of global, when PAPER Magazine published Kim Kardishian's rear end they knew their servers were going to take a hammering. Here's a safe for work look at how PAPER Magazine’s web engineers scaled their back-end for Kim Kardashian where they made good use of Bees with machineguns, a utility for arming (creating) many bees (micro EC2 instances) to attack (load test) targets (web applications). Other site owners are also starting to fear China as their great firewall sometimes mistakenly directs millions of users to their site, so here are good details on how to protect your site from too much traffic. Microsoft is getting ready to replace Internet Explorer soon too. Take a look inside Microsoft’s new rendering engine for the Project Spartan. Also in development is Vivaldi - a new web browser from a developer of Opera that claims to be highly flexible and puts the user first.

Developing an eye to the future


Helping with your workflow this week we have Git workflows for pros: a good Git guide that gives good details on how branching works with do's and don'ts to be watchful for. Some developers have been having careful thoughts about frameworks lately too. John has an an opinionated guide to React.js, best practices and conventions. James has an unconventional review of ReactJS that comes out pretty positive, but his more recent an unconventional review of AngularJS more controversially recommends to avoid it. One of their developers left several months ago, and can now introduce Aurelia that uses ES6/ES7 features transpiled and polyfilled to work with today's evergreen browsers and is even working well on IE9.

Opinionated CSS fun


Another opinionated piece is on should the W3C and WHATWG die. Fortunately some solutions are being found, such as how to center and crop images with a single line of CSS and giving help with negative margin spacing troubleshooting. Having more fun with CSS we came across an excellent guide to compositing And blending In CSS, and Chris is having Fun with line-height!.

Cool stuff


Lastly for this week we have elevator saga the elevator programming game, and a video on the new Tesla car has a button called 'Insane Mode' - see what happens when you press it!


Which links caught your attention? Do you want to use Bees with Machineguns to hammer on anything? Are you thinking of jumping ship from AngularJS too, or want to get involved in the opinionated discussions? And isn't the Tesla insane?! Whichever takes your interest, we would love to hear your thoughts.

Continue reading %On Our Radar This Week: Bees with Machineguns%




by Paul Wilkins via SitePoint

Swift from Scratch: An Introduction to Classes and Structures

Optimizing Your Images for WordPress

Once upon a time, about 20 years ago, there was Mosaic. Mosaic is often credited with starting the World Wide Web as we know it today. It was the first browser that allowed images to be displayed inline with text, rather than having a separate window popup for each image. Although it wasn’t the first graphical browser, it caught on with the wider public.


Back then colour screens with 256 colours were relatively new, and we were all on dial-up Internet, the aim was to get your images to download, full stop. How they looked was secondary.


Fast-forward to today and things are very different. As people buy increasingly higher resolution screens, we need to make our images look great. On the other hand, Google would like your Web pages to load in one second, even on mobile devices. So how do you make your images look good and load fast? In this article, we're going to cover the basics of optimizing your images for WordPress.


Is an Image Really Required?


Of course the first question you should ask is do you really need an image when text, symbols, and simple logos can be replaced with web fonts and other CSS effects that can possibly do the job better, faster, and in a responsive way. Any text element such as banners and buttons that are created from images should be replaced with non-image formats. However, if you need to use an image read on.


Raster Versus Vector


Raster images are made up of a grid of a fixed number of pixels. They don’t scale well, and enlarging the image will result in jaggies and pixelation as the grid pattern becomes visible. Images created in a digital camera and programs such as Adobe Photoshop are raster images. The image quality setting will determine the size of the saved file. This could be as large as 7360 x 4912 pixels with a high end SLR camera; such an image would be well over 36MB in size. Clearly this is way larger than required for WordPress use.


Continue reading %Optimizing Your Images for WordPress%




by Andrew Renaut via SitePoint

RAML, the RESTful API Modeling Language

In a recent article I introduced Slate, a static site generator specifically designed for writing API documentation. This time around, I’m going to look at something which in many ways is even better.


But first, if you’ll indulge me for just a moment, I’d like to begin by quoting myself from that article;



[an] API is only as good as its documentation



I think it’s worth repeating, since it’s all-too-frequently overlooked, and it’s one of the motivations for this short series of articles on some of the tools out there to help you write great documentation.


Slate is a useful tool, but despite the relatively rigid structure of the pages themselves, the actual documentation is pretty freeform.


RAML (RESTful API Modeling Language) provides a structured, unambiguous format for describing a RESTful API. It allows you to describe your API; the endpoints, the HTTP methods to be used for each one, any parameters and their format, what you can expect by way of a response and more.


You can use RAML in a number of ways;



  • It can be used in the design and specification stage to describe the API you plan to build

  • You can use RAML to generate documentation

  • RAML can be used to implement interactive API consoles

  • You can test against RAML

  • It be used to generate mock API responses


In this article I’ll primarily look at generating documentation; in a later article I’ll look at how you can integrate RAML into your API testing. But first, let’s look at how to write a RAML document.


Continue reading %RAML, the RESTful API Modeling Language%




by Lukas White via SitePoint

Digital Agency

Somos una agencia creativa de diseño y desarrollo dedicada a brindarle a nuestros clientes la mejor experiencia digital…




by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

G3 Genuine Guide Gear

Highly branded visual content distributed via drupal management application. Featuring in depth (UX designed) product look books with e-commerce integration.




by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

VOMMAK MACHINE

Vommak Machine, Geology – Mining Equipment, Cake – Bakery Equipment, Radiation Armor, Medical Equipment we are working on production machines.




by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

MKS Graphisme

Web Playground. Parallax animation, no image, only CSS




by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

MEFILAS Inc.

Japanese web design company / Typography with Movie




by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Time Signal

This MARGARET HOWELL’s idea watch online catalog called “TIME SIGNAL” implements an unique approach of telling time on Instagram platform. 10 female influencers such as model, singer and florist, upload their private moments by particularly fea




by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Wilderborn

Wilderborn


What a gorgeous hero image in this responsive One Pager promoting the digital services of 'Wilderborn'. The responsive design really fills a big screen well and adapts great on mobile.



by Rob Hope via One Page Love

Optimizing Your Workflow

A Look at More WooCommerce Product Settings

Salta BoomBox

Salta BoomBox


Parallax scrolling blue-schemed One Pager promoting the 'Salta BoomBox' concert in Argentina.



by Rob Hope via One Page Love

The State of #ContentMarketing 2015 - #Infographic





2015 promises o be a great year for marketers as confidence in content marketing is growing significantly. In fact, 50 percent of B2C marketers expect their budgets to increase!



Content marketing was voted the top marketing activity to drive commercial results in 2015, according to Smart Insights, so competition will be tough and the need to create a focused plan is paramount.



Even though content looks set to take over the digital marketing landscape in 2015, brands still need to get the fundamentals right. This means coming up with a clear strategy, researching consumer data, distributing content in the right places and measuring campaign effectiveness.



By doing so, B2C companies can overcome challenges such as creating engaging content, which resonates and appeals to customers, on a regular and consistent basis.



Take a look at the infographic below for an overview of, the most commercially important digital marketing trends for 2015, marketers top goals for 2015, most popular B2C content marketing tactics, 7 content marketing planning techniques, and more.

Read more →



by Irfan Ahmad via Digital Information World

Mélanie F


Melanie F slippers were born from the desire to offer a different vision of the design. It is no longer just a functional object, it is also very design.

by via Awwwards - Sites of the day

Content Curation: How to Easily Find Great Content to Share

Do you curate content for your blog and social media sites? Want to discover how to find remarkable content to share? To learn how to explore content curation, I interview Ian Cleary. More About This Show The Social Media Marketing podcast is an on-demand talk radio show from Social Media Examiner. It’s designed to help […]


This post Content Curation: How to Easily Find Great Content to Share first appeared on Social Media Examiner.

Social Media Examiner - Your Guide to the Social Media Jungle




by Michael Stelzner via Social Media Examiner

Thursday, January 29, 2015

Packery : Bin-packing layout library

Packery is a JavaScript layout library that uses a bin-packing algorithm. This is a fancy way of saying “it fills empty gaps.” Packery layouts can be intelligently ordered or organically wild. Elements can be stamped in place, fit in an ideal spot, or dragged around.


The post Packery : Bin-packing layout library appeared first on jQuery Rain.




by Admin via jQuery Rain

GS Chained Custom Selects

GS Chained Selects provides you with a custom JavaScript class that automatically creates chained selects based on the options entered.


To generate the selects you can choose between using your custom created object or by accessing via AJAX a server resource that returns a custom formatted JSON .


The post GS Chained Custom Selects appeared first on jQuery Rain.




by Admin via jQuery Rain

blinkTitle.js : JavaScript TitleBar Alert or Notification

Is a Pure Javascript Implementation of TitleBar Alert or Notification.It Can Perform Blinking of Html Titlebar for Titlebar Alert or Titlebar Notification


The post blinkTitle.js : JavaScript TitleBar Alert or Notification appeared first on jQuery Rain.




by Admin via jQuery Rain

Responsive Email Design Is No Longer Optional - #infographic






With the total number of mobile devices set to rise to 2.6 billion by 2016 - up from 1.9 billion in 2012 - responsive email design is quickly becoming more important than ever. Responsive email, for the uninitiated, is essentially email that's designed to deliver the same viewing experience regardless of which app or mobile device the user is reading on.



You see, even though our mobile devices are never far away from our fingertips, and can be used for an increasing number of purposes - from banking and personal finances to games and gizmos - it may surprise you to hear that email remains THE most used functionality. A phenomenal 91% of consumers check their email at least once every day on their smartphone, and it's been reported that mobile email opens have grown by 180% in just three years. In fact, Adobe report that nearly 8 out of 10 people use their smartphone for reading email - which is, amazingly, a higher percentage than the number who use it for making calls.



This creates a critical challenge for marketers. It's generally accepted that email remains a tool with huge potential - how else can you deliver highly personalized and target messages to 100% of your audience? But, with 30% of consumers now EXCLUSIVELY using their mobile devices to access their emails, failure to deliver responsive emails can fatally undermine the ROI of your email campaigns. After all, over 71% of users will delete an email immediately if it doesn't display correctly on their device.



This infographic from the team at Instiller - an email marketing solution for agencies - lays out the case for responsive email design. It explores changing trends in mobile adoption and email use, investigates the growing shift away from desktop-only users, and illustrates some stats around how email advertisers and the industry in general are adapting to these changes.



It's clear - if you aren't doing responsive email design, then you aren't doing it properly!


Read more →



by Irfan Ahmad via Digital Information World

6 Must-Use Meteor Packages for (Almost) Every Project

Create a Tetromino Puzzle Game Using Swift – Final Steps

I hope you have enjoyed the tutorial so far. In this final part we add some final elements to gameplay to create a final, polished game. Let’s get started!


Rotation


Similar to the move method, we prepared the rotation behavior with the Tetromino class’ rotate method:


Continue reading %Create a Tetromino Puzzle Game Using Swift – Final Steps%




by Rico Zuniga via SitePoint

is.js – Micro Check Library

is.js is a general-purpose check library without any dependency. You can check types, regexps, presence, time and more...




by via jQuery-Plugins.net RSS Feed

The WordPress Template Hierarchy

WordPress themes allow you to change the design of your website, providing control over the look and feel. They are essentially collections of different template files that work together and produce the overall design of your website.


Before you dive deeper into WordPress themes, it is important that you have an understanding of how WordPress operates and how the different pages of your website are created. WordPress interacts with a database to store your content. That means whenever you create a new post or page, the content of your post or page lives in a database and it's only displayed using templates when the visitor asks for that particular content.


A WordPress theme is a collection of templates (CSS and PHP files) that WordPress uses to display the database content. WordPress will look for files in a theme to use to render the current page in a specific order. This is called a 'template hierarchy', that is used to create and extend WordPress themes.


WordPress themes decide how your content should be displayed on your website. A template in WordPress is a single file that determines what a specific page or set of pages look like on the front end of your website. When you change your theme, you are changing the way the content is displayed without changing the content itself.


WordPress themes use different templates files to generate a complete web page. For example, when you access a WordPress website, you can actually see multiple different template files combined together to create one complete page.


For instance, if you will look at an index page, like the front page of a blog, you will usually see a header created by the header.php template, content created by index.php, sidebar created by sidebar.php and the footer created by footer.php


.

Continue reading %The WordPress Template Hierarchy%




by Tahir Taous via SitePoint

Sass Basics: The Function Directive

I recently wrote an article about the basics of Sass, specifically the @mixin directive. In keeping with the theme of highlighting the basics of Sass, this time I will be talking about the @function directive.


What a function does


[code="sass"] @function remy($pxsize) { @return ($pxsize/16)+rem; } h1 { font-size: remy(32);} [/code]

A function looks a lot like a mixin, and they both accept the same types of arguments. Although they look similar,a Sass function behaves differently. While a mixin makes our life easier by lessening typing repetative code, a function allows you to strip repeatable logic from your code. For example, in the code above we are using a function to calculate a rem value for a given pixel size. The resulting code would be:


[code="css"] h1 { font-size: 2rem; } [/code]

As you can see instead of applying styles to an element like you would with a mixin, all a function does is return a value for use in your stylesheets.


Function or a Mixin


The key to understanding when to use a function versus a mixin is knowing what you want. A mixin is used to create styles that would be a chore to continually write. Using a mixin you could easily write these styles with one line of code. When writing mixins you will be tempted to include calculations.We could have wrote the remy function as a mixin:


Continue reading %Sass Basics: The Function Directive%




by Reggie Dawson via SitePoint

COFA Media

Agency web site with cool inner pages. Check Mobile and Beyond page!




by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

TKoenigs design agency

Unique Design, best usability – That´s what we make. WE DESIGN YOUR IDEAS – That’s our motto . We design simple, clear and professional websites. We also design corporate identity and make print design projects. Our website is simple, clean and min




by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

This Was My Best

I’m still alive, and maybe someone will recognize me. 2014 – year in review.




by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Carlo Civera Digital Magazine

Carlo Civera Digital Magazine




by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Decoupling with Lotus

According to the Lotus website, Lotus is a web framework that aims to make Ruby web development more object-oriented. Lotus features encapsulation of MVC layers and no monkey-patching.


We won't be making an app in Lotus, but we'll be looking at its constituents to see what it offers.


Rails is magical for a reason. When we see that Lotus takes away a lot of that magic, it's easy to be skeptical. So, try to keep an open mind.


How It's Different


On the surface, Lotus initially looks like another "me-too" framework that accomplishes things just like Rails. But as we'll see, Lotus also supports a less opinionated, more object-oriented approach to building apps.


Instead of one framework, Lotus is currently composed of several gems:



  • Lotus::Router

  • Lotus::Utils

  • Lotus::Validations

  • Lotus::Model

  • Lotus::View

  • Lotus::Controller

  • Lotus::Assets (not officially part of framework yet)


Continue reading %Decoupling with Lotus%




by Robert Qualls via SitePoint

Hosting a WordPress Website on Google App Engine

Airbnb - A World of Belonging


An interactive data visual that displays the scale and story of Airbnb through a WebGL based globe and explore-able illustrative map that is optimized for mobile and desktop.

by via Awwwards - Sites of the day

10 Ideas to Inspire Your Next Blog Post

Are you looking for blog post ideas? Would you like some direction to inspire your editorial calendar? Although it may be challenging to come up with new blog post ideas, there’s a lot you could write about. In this article I’ll share 10 ideas to inspire your business blog content. #1: Answer Common Questions All […]


This post 10 Ideas to Inspire Your Next Blog Post first appeared on Social Media Examiner.

Social Media Examiner - Your Guide to the Social Media Jungle




by Liz Jostes via Social Media Examiner

minBlock.js : Javascript Canvas Matrix Grid

Is a Pure Javascript Canvas Implementation of Matrix Grid ( Primary Application was to Generate Github Like Random Avatar using minBlock.js or Pixel Pattern)


The post minBlock.js : Javascript Canvas Matrix Grid appeared first on jQuery Rain.




by Admin via jQuery Rain

FuckAdBlock : JavaScript AdBlock Detector

Allows you to detect those nasty ad blockers.


Valid On:



  • Google Chrome

  • Mozilla Firefox

  • Internet Explorer (8+)

  • Safari

  • Opera


The post FuckAdBlock : JavaScript AdBlock Detector appeared first on jQuery Rain.




by Admin via jQuery Rain

Wednesday, January 28, 2015

jQuery Signature Field

Provides signature field as jQuery component, using either a sketch pad or an uploaded signature file.


The post jQuery Signature Field appeared first on jQuery Rain.




by Admin via jQuery Rain

Ĉapelo – jQuery Esperanto Accents Plugin

Ĉapelo is a jQuery plugin for Esperanto accents. Replace 'x' or 'h' by Esperanto letters with accent, as you type.




by via jQuery-Plugins.net RSS Feed

An opinionated guide to React.js best practices and conventions

I’ve been using React.js for a little while now, both in my 9 to 5 job and for my own projects, and during that time I have started evolving my own set of React.js best practices.


The following guidelines mostly focus on component structure and JSX. However, they are not hard and fast rules, but more of an opinionated set of guidelines I choose to adhere to that make my code more readable, more robust and easily maintainable.


Note: This article does not provide explanations of the React paradigms or idioms mentioned here or used in the examples, that is best left to the excellent documentation provided by the React team.


Component organisation


As with any code, it’s important to have consistency. This of course also applies when structuring your React components. I use the following pattern:




React.createClass({

propTypes: {},
mixins : [],

getInitialState: function() {},
getDefaultProps: function() {},

componentWillMount : function() {},
componentWillReceiveProps: function() {},
componentWillUnmount : function() {},

_parseData : function() {},
_onSelect : function() {},

render : function() {}

})


I like to declare propTypes at the top of my component as they are a useful guide to a components expected usage (see section below for more on this), followed by the mixins because it is handy to initially know exactly what external behaviours the component is using/dependent on.


I choose to split the life-cycle methods into those that occur before an instance of the component is created (e.g. getInitialState, getDefaultProps) and those which occur during the mounting/updating/mounted cycle (e.g. componentWillMount, shouldComponentUpdate). Furthermore, I find that declaring the lifecycle methods in order of execution also makes the component easier to reason about.


I always have my custom methods follow the lifecycle methods and be prefixed with an underscore to make them easier to identify. I’ll usually also group these by utility (parsers, event handlers, etc).


I like the render method to always be last. The render method is a mandatory lifecycle method and it’s almost always the function I need to find first when I open a file. Consequently, it’s pragmatic to have it in a consistent location across all of my components.


In general, my mixins will follow the same conventions as regular components.


Always set propTypes for validation and self-documentation


I always use propTypes to provide validation for each prop the component will receive. Furthermore, this also provides a self-documenting reference for how the component should be used, and what props it needs to be passed.




propTypes: {
arrayProp: React.PropTypes.array,
boolProp: React.PropTypes.bool,
funcProp: React.PropTypes.func,
numProp: React.PropTypes.number,
objProp: React.PropTypes.object,
stringProp: React.PropTypes.string,
}


JSX


Let’s face it, JSX can look pretty ugly at times and is one of the more common reasons developers are put off by React. However, by following a few general guidelines for handling JSX in components, it’s far more readable and not such an eyesore.


Multi-line JSX


No matter how few elements are being returned, I choose to write any JSX which contains nested elements across multiple lines with indentation to enhance readability, i.e:




return (
<div>
<ComponentOne />
<ComponentTwo />
</div>
);


Rather than…




return (<div><ComponentOne /><ComponentTwo /></div>);


Furthermore, while the parenthesis are not technically required with a single line JSX statement, I still use them for the sake of consistency (and because unrestrained elements floating about in my JS makes my left eye twitch uncontrollably).


Conditional JSX


When I have conditional elements that needs to be returned depending on state, props, or another condition, I declare an empty variable at the top of the render function and only populate it with JSX if the condition is met. When the variable is returned in the render method return statement, it’ll either render the conditional elements, or nothing at all.




var optionalElement;

if (this.props.condition) {
optionalElement = (<div> … </div>);
}

return (
<div>

{optionalElement}

</div>
);


In-line list iteration


Where possible, I like to iterate over lists of data in-line in the returned JSX unless its internal logic is sufficiently complex enough to warrant moving outside of the return statement and populating an array for rendering.




return (
<div>
{this.props.list.map(function(data, i) {
return (<Component data={data} key={i} />)
})}
</div>
);


Indentation and new line for component attributes


When there are enough attributes on a component that displaying them inline becomes untidy (usually 3 or more), I always display them on multiple lines and indent each one. i.e.




<Component
attribute={...}
anotherAttribute={...}
attributeThree={...}

/>


Rather than…




<Component attribute={...} anotherAttribute={...} attributeThree={...} />


Conclusion


These guidelines are by no means authoritative or exhaustive, but I feel they are a good starting point for organising and standardising React components and some of the more common use cases I encounter.


Hopefully these guidelines provide a useful starting point for organising your React components. Be sure to leave a comment if you have a question!


An opinionated guide to React.js best practices and conventions is a post from Web Design Weekly.




by John Cobb via Web Design Weekly

When Bad Software Kills

"Snefru's Bent Pyramid in Dahshur" by Ivrienen at en.wikipedia. Licensed under CC BY 3.0 via Wikimedia Commons - http://ift.tt/1yzSVDH This is the 'Bent Pyramid' - a 4600 year old monument to engineering failure. From the base, the sides set off at an alarmingly steep 54-degree incline, before abruptly switching to a gentler 43 degree slope about halfway up. It's believed that the design was altered during construction following the catastrophic collapse of the Meidum Pyramid -- another steep-sided pyramid -- about 60 kilometres to the south. Of course, it's hard to blame the ancient pyramid builders. They were effectively inventing engineering as much as they were learning it. One thing hasn't changed since that time: when structural engineers mess up, people get hurt. We can't know for sure, but it seems unlikely that the Meidum collapse could take place without a human cost. By comparison, 'software engineer' can seem like a fluffier flavor of the engineering sciences. A mistake might prevent a user from accessing their account or entering information, but it surely isn't life threatening? No-one gets hurt, right? Or that's what we think. The truth is, every year our systems -- from power to traffic to agriculture to emergency services -- become more dependant on us all creating high quality software to support them. And when we fail -- like those ancient Egyptians -- people can actually get hurt. Surprisingly, as the sad case of the Therac-25 shows us, this isn't even a 21st century problem.


Software Can Kill


By the late 1970's, Atomic Energy of Canada Limited (AECL) had earned a good reputation for building radiation therapy machines. These machines used targeted electron beams to attack tumours in patients. Make no mistake, these beams are high-intensity and potentially lethal. AECL had previously enjoyed great success with their Therac-6 and Therac-20 models. These units needed to be manually controlled by a trained operator, and used mechanical switches and hard-wired circuits to ensure high levels of safety. The Therac-25 was to be their 'dream-machine'. The Therac-25 machine Smaller and cheaper, yet more efficient than its predecessors, the new machine incorporated two different beams technologies -- an x-ray and a high-energy electron. The different beams allowed operators to target tumours at different depths without damaging nearby healthy tissue. The Therac-25 was both ambitious and sophisticated -- and for the first time all this hardware was controlled by a software layer. Unfortunately, though AECL's intentions were good, their software design was tragically bad, incorporating a series of horrendous design flaws. Later investigations carefully documented these flaws and they're still chilling to read today. In one instance, during a treatment one machine continuously shut itself down reporting a cryptic 'H-tilt' and 'no dose' error message each time. The operator attempted to deliver the treatment six times before giving up. It was only later that it was determined that the machine had delivered the full dose every time. From its launch in 1982 till its withdrawal in 1986, six patients received ultimately fatal injuries from Therac-25 treatments. It's horrendous to consider that these people were already sick. Today AECL exists not as a company, but as a tragic textbook example to all of us of how poorly-designed and untested software can impact lives. The Therac-25 disaster still informs a lot of the ideas we have on systems design and safety testing today. Even if you're a front-end designer, and don't consider yourself a 'serious engineer', Therac-25 teaches us lessons. While some flaws were caused by poorly coded processes, at least as much damage was caused by inadequate documentation, thoughtless messaging and arcane errors messages. These are areas that everyone -- designers, coders, managers, UX people and testers -- should have contact with. Looking back at those ancient egyptians, it's clear that they learned from their early mistakes and went on to build some of the most breathtaking structures that have ever existed. Software engineering is still a comparatively young field -- let's hope we've already built our Bent Pyramids.

Continue reading %When Bad Software Kills%




by Alex Walker via SitePoint

Conducting User Interviews That Will Actually Help You

When you’re developing a business idea it can be tempting to build the product as quickly as possible in order to launch it early. Often, this is a fatal mistake because it can result in building a solution to your problem rather than something the users will value.


Although market research might seem like a boring and daunting task, it is still a vital component of any software development project. I’m going to run you through the basics of conducting user interviews so that you can avoid crashing and burning and understand the power that they have. While there are many ways to get feedback from your users, this article is focused on getting thorough insights through user interviews that will actually give you information that you can use.


Proper Preparation


microphone

Conducting user interviews isn’t just a matter of asking questions and jotting down the answers. For an interview to be effective you’ll have to put effort into your preparation. You’ll need to ensure that your questions cover the following areas:




  • Who: Identify the demographic your product is targeting and tailor your questions to that group. Ask yourself, “Who is my ideal customer for this offering?”




  • What: What are the problems you intend to solve? The best way to frame this is to think: “What are the biggest pain points my potential users are experiencing?”




  • When: As you draft your interview, keep in mind the times users will use your product or service. This is best covered by asking yourself, “is this something essential to a users life, or is it something they’ll only use once in a while.”




  • Where: To further help with identifying context, you’ll need to consider where the product or service is used. For example, users on a mobile device will have a shorter attention span than those on a desktop device. There are many potential answers to this question, but in general you’ll want to focus on whether the product is for work or recreation and whether the user will be on the go or at their desk.




  • Why: Understanding the psychology of customers is crucial since it’s difficult to change existing behavior. Dozens of companies offer email, but there are plenty of unique aspects that make them appeal to different audiences. Ask your potential users, “What are the biggest reasons you use product X?”




  • How: Consider how users commonly perform tasks already. Although you can’t really address this without in-depth analytics such as session tracking and more. Having a handle on this is vital to identifying ways to improve the users experience. This isn’t something you can address by asking specific questions. You just need to observe how users interact with different offerings.




Continue reading %Conducting User Interviews That Will Actually Help You%




by Charles Costa via SitePoint