Friday, November 4, 2016

AtoZ CSS Screencast: The translateX CSS Property

As we approach the end of the alphabet and the end of the first season of AtoZ CSS, there aren’t many properties, values or concepts that start with the letter X.

There are however a series of transform values that allow elements to have their visual coordinates changed along the x-axis to create complex and interesting visual details on the page.

In this episode we’ll learn all about:

  • The CSS transform property
  • Moving elements with translate and translateX
  • The performance benefits of using translate over other methods

transform

The transform property allows elements to be moved from their natural position in the document whilst maintaining that original space - a bit like the result of moving elements with position:relative.

Elements can be translated, rotated, scaled or skewed in various different ways on various different axes.

Continue reading %AtoZ CSS Screencast: The translateX CSS Property%


by Guy Routledge via SitePoint

Building Your Startup: Delivering Notifications

Election Rewind

Election Rewind

Election Rewind is a bite-sized recap of key moments throughout the election - all presented is a slick One Pager. An excellent reference to presenting a ton of information in a Single Page website using cards correlated with a timeline. Cheers for the build notes!

by Rob Hope via One Page Love

My Grandmother's Lingo

Interactive online animation that uses voice-activated gaming to unlock the story of Angelina Joshua, a young Indigenous Australian fighting to preserve her endangered language, Marra.
by via Awwwards - Sites of the day

Conversion Optimization: How to Split Test Your Way to Success

ms-podcast222-chris-dayley-600

Want to get more leads and subscribers? Have you considered optimizing your opt-in forms? To explore conversion rate optimization for your online forms, I interview Chris Dayley. 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 busy marketers and business owners [...]

This post Conversion Optimization: How to Split Test Your Way to Success first appeared on .
- Your Guide to the Social Media Jungle


by Michael Stelzner via

Thursday, November 3, 2016

How to use the Google Adwords preview tool

How to use the Google Adwords preview tool

You live in the US and are thinking of running an Adwords campaign in Singapore to increase sales in that location. You want to run a campaign but are unsure of what competition you could be facing and would like to see the types of keywords your competitors are bidding on.

One way to make it look like you are in Singapore, would be to use a VPN and connect to a server in Singapore to change your IP address. A simpler option however, is to use the Google Adwords preview tool.

by Guest Author via Digital Information World

Look Ma, No Server: Developing Apps with Angular 2 MockBackend

Getting your front-end and back-end teams up to full speed is certainly something each company is looking for. Often though, what happens is that the teams fall into the pit of blocking dependencies. Those are situations where the upcoming work of one team is blocked by a user story owned by the other team.

One of those examples is the communication process between the front- and back-end. These days REST APIs have ascended the throne of so-called communication standards. The benefit of using JSON, a simple yet effective data transfer format, is that front-end workers do not need to care about the actual back-end anymore. Whatever crosses the wire is directly consumable and may be leveraged to bring data into your application. So it's not surprising that those elementary entities often do not get modeled at all on the front-end and are consumed as they arrive. This brings us to the fundamental problem of having to wait for the back-end team to provide something useful. As depicted in the following figure, we see that both teams start in parallel, but at a certain time one team is kept waiting for the other to catch up.

Besides this, having no kind of fixed structure makes each change a potentially dangerous one. So the focus of this article is to present a way that front-end teams can become independent of the back-end and at the same time provide a useful interface which reduces the risk of structural changes.

A Ticketing System Without a Real Back-end

In order to achieve that independence it's imperative to start thinking upfront about your project. What entities are you going to use? What communication endpoints result therefore?

This can be done by creating a small table highlighting the necessary REST endpoints and describing their purpose. Remember the reason we are doing that upfront is for both parties to agree upon a common structure for communication. That does not mean it has to be perfectly done but it should help you get started with the most important steps. As time passes, just update your interface accordingly with the new routes needed.

The actual process of creating a back-endless environment is to capture all HTTP requests and instead of letting them go out into the wild, reply with a fake response containing the information we'd like to have. This article will demonstrate the approach by describing a simple ticketing system. It uses the endpoints shown in the following table.

Please note that the example utilizes the POST verb for both the update and create route. Another option would be to leverage PUT for the update process. Keep in mind though that PUT should be idempotent, meaning every consecutive call has to produce the same result. Feel free to choose whatever suites your needs.

Method Route Request body Description
GET /ticket None Request all tickets
GET /ticket/:id None Request a single ticket via the provided :id parameter
POST /ticket Ticket entity Create a new or update an existing ticket
DELETE /ticket/:id None Delete a ticket, identified by the :id parameter

Table 1: Consumed endpoints of the ticketing system

The Ticket entity is a simple TypeScript class containing some basic ticket information:

    export class Ticket {
      public _id: string;
      public title: string;
      public assignedTo: string;
      public description: string;
      public percentageComplete: number;

      constructor(id: string, title: string, assignedTo: string,
            description: string, percentageComplete: number) {
        this._id = id;
        this.title = title;
        this.assignedTo = assignedTo;
        this.description = description;
        this.percentageComplete = percentageComplete;
      }
    }

ticket.entity.ts describing the ticket entity

You may find the complete code as well as a preview for this example on Plunker:

The Angular 2 project setup

Enough theory, lets get our hands dirty with some coding. The project structure shown here is built upon the proposed Angular 2 Getting Started guide. As such, we won't waste too much time explaining every part of it. If you're searching for a introductory article, take a look at Getting Started with Angular 2 using TypeScript. For this article, you can just open up the above mentioned Plunker to follow the code parts explained below.

As most single page applications start with an index.html file, lets take a look at it first. The first section imports the necessary 3rd party dependencies and Angular's application files located in the vendor sub-folder. The Reactive Extensions (Rx) aren't actually a true dependency but will simplify the work with Angular's observables, which are the replacement for the previously used Promises. I highly recommend this article by Cory Rylan to learn more about the topic.

Note that manual script referencing is not the recommended way to create production-ready apps, nor is the framework itself either, being in beta state. You should use a package manager like npm or jspm. The later one works hand in hand with SystemJS, described in section two. SystemJS is a module loader previously based on the ECMAScript 2015 draft and now part of WHATWG's Loader specification. As such, it enables the use of the import x from 'module' syntax. In order to use it properly we need to configure it and then import the application's main entry point, the file app/boot.ts.

Note that we configured the defaultExtension so that we can omit the file extension in our import statements.

Finally we create the app by using a custom tag named my-app. Those are called Components and are somewhat comparable to Angular.JS 1.x directives.

Continue reading %Look Ma, No Server: Developing Apps with Angular 2 MockBackend%


by Vildan Softic via SitePoint