Friday, July 17, 2015

Validating your data with Respect Validation

Validation is an important aspect of every application’s interaction with data. Instead of reinventing the wheel every time, the community collaborated on some useful packages like Symfony, Laravel, Zend, etc. In this article, we’re going to introduce a new package called Respect Validation, which provides some nice new features. Let’s get started.

When using a framework, there is a great chance that you have a validation component shipped with it. The Symfony Validator Component provides a set of standard validation rules that you’ll need for your application.

class UserSubscriptionForm
{
    protected $email;

    public static function loadValidatorMetadata(ClassMetadata $metadata)
    {
        $metadata->addPropertyConstraint('email', new \Assert\Email([
            'message' => 'Invalid email.'
        ]));
    }
}

I’m sure your subscription form contains more than just an email, but let’s keep it simple. Inside your controller you’ll have to trigger the validation like so:

public function store(Request $request){
    $userSubscriptionForm = UserSubscriptionForm::fromInput($request->all());
    $validator = $this->get('validator');
    $errors = $validator->validate($userSubscriptionForm);

    if (count($errors) > 0) {
        // redirect with errors
    }

    // return success
}

Continue reading %Validating your data with Respect Validation%


by Younes Rafie via SitePoint

6 Tips for Writing Good Content Faster

I write a sh!t load of content. I’m on the hook to write or edit 10 posts per week (on top of running a content marketing agency). When I first got started, I was in over my head. I was struggling to manage the volume, client requests, deadlines and editors. The result was a stream […]

Continue reading %6 Tips for Writing Good Content Faster%


by Ryan Stewart via SitePoint

UX Design for Passwords and Registration Forms

Forms are a crucial part of the web design in 2015, especially since the rise of mobile has forced us to concentrate that much harder on smoothing our UXs.

Forms are often central to driving conversions in ecommerce sites and are often the difference between a successful user registration and the user leaving a site never to return.

From a user perspective, forms should clearly communicate to the user what is required from them. They should be effortless to click into and type in, regardless of the device that they're accessed on. And they should display with correctly aligned labels that indicate what the user needs to enter into a given field.

While it was once considered standard practice to ask for as much information as possible – on the off chance you may need this information later – that's not the case today. Forms should be not a character longer than is absolutely necessary.

[caption id="attachment_110580" align="aligncenter" width="765"]Short forms Image credit: Will Scully-Power[/caption]

Research has shown that shorter forms can increase conversions by as much as 160%, so a poorly designed form, or one that demands too much data can directly impact revenue.

Users Don't Like Registering

Users are growing increasingly resistant to traditional registration processes, and studies have shown that up to 86% of people will change their behavior if they are forced to create a user account.

A study conducted by Blue Research further found that, when questioning users:

  • 54% stated they might leave the site
  • 26% said they would choose another site that didn't require registration
  • 6% said they would leave and avoided the site in the future
  • 14% stated that they would complete registration

Further to this, 88% said that they have given incorrect information on a form when registering on a site and 90% said that rather than retrieve account information from a site they had previously registered on, they simply left.

The consistent message from users is clear: they prefer to not register and will avoid it if at all possible. What's more, this resistance is also growing. Given the choice over account creation, many users would more happily use social logins for all of their accounts.

So, we know forms need to be short, simple and while it's sometimes handy to have a lot of information about customers from the business perspective, it's not valuable if it seriously impacts revenue.

Satisficing

In her article Satisficing: What Does it Mean for Web Forms, Jessica Enders explains that,

The term “satisficing” refers to the human tendency to expend only the minimum amount of energy required to successfully complete a task. This is a subconscious phenomenon: (most of the time) we don’t sit down to do something and think “I’m going to spend the bare minimum on this”.

So when crafting forms, it's necessary to design with satisficing in mind to help avoid user error. Jessica suggests that in particularly important when it comes to framing your question in the clearest possible way for the user.

To overcome this, you should:

Place frames of reference at the start of questions, rather than the end

This is because the user will stop reading the question as soon as they subconsciously feel that they have the answer.

Jessica states that rather than ask the following question,

Q: Have you lived anywhere else in the past 2 years? (Y/N)

You should instead frame it like this:

In the past 2 years, have you lived anywhere else? (y/n)

This "tells the user what subset of their experience that you're interested in." So you should "front load" form questions with the important information in order to ensure that it's picked up by the user.

Check out the full article for a more detailed explanation of satisficing and how to overcome it in your form design.

Duplicate Fields

It's not uncommon to see sites that duplicate fields for email addresses and passwords in different positions in their application. Not only does this encourage users to leave, but it can also cause headaches for any users who stores passwords using a password manager.

This is because password manager typically work by hooking into the submission form events and storing field names and values.

If these password fields are given different names when the form is designed, then the password manager will be unable to populate the form as the field name doesn't match.

This is a common problem and in order to overcome it, Mammal advises you to ensure that password fields (if you really have to include two) are named identically. For sites that don't request a user password on sign up, but do request a username, Mammal recommends that you use an invisible username field when the user then goes to the site to set a password, as shown below.

Continue reading %UX Design for Passwords and Registration Forms%


by Kerry Butters via SitePoint

Debugging Cordova Apps with DebugGap

For debugging a web application in a desktop browser, there are a myriad tools available such as Chrome’s developer tools or the Firefox firebug add on. Native application development have IDEs that provide integrated debugging tools. But hybrid applications that use a web view have always been harder to debug.

Debuggap is a tool to debug cross platform mobile apps. It’s easy to use and get started. All you need to do is download the package, include a JavaScript file and run the app on a device or emulator.

Continue reading %Debugging Cordova Apps with DebugGap%


by Jay Raj via SitePoint

SQRL

SQRL

Clean One Pager promoting an upcoming survey taking app called 'SQRL'. Nice touch with the newsletter signup form is shifted above the device on mobile to keep it above scroll

by Rob Hope via One Page Love

Oli

Oli

'Oli' is a good looking launching soon template suited for any digital agency and only costs $6. The HTML template comes in two layout options - intro text slider and countdown timer. 'Oli' actually caters for a lot of information and would be sufficient for any service industry business.

by Rob Hope via One Page Love

Easy Digital Downloads: Email Settings, Part 2