Chrome, HTML5, JavaScript, php, webdev

How To Implement Web Payments

One aspect for Monetization on the web is the simple action – BUY.
In this method, the user will pay and only then, she could ‘use’ the application or service. There are several providers that offer developers an efficient ways to lead users through the checkout process. In the image below you can see an example of such usage when the user got the option to ‘Pay with Card’ in one-click.

pay-ex-1 2015-02-11 16.56.42

After you will click on this button you will get a dialog that ask for your credit card details. In this example, we are using Stripe. It’s a good option that works in many countries around the globe. Moreover, you are getting for ‘free’ all the best practices of client-side validation for the credit card details. In the image below, you can see an example of buying “one hour with Ido”, it’s looking like a bargain. Continue reading

Standard
Chrome, HTML5, JavaScript, webdev

Maximizing Your ROI On The Mobile Web

mobile devicesIt’s a mobile world.
The next 4B users are going to use the web only on mobile so we should think on their experience. Moreover, a lot of people are using the mobile web as discovery mechanism and when they land on our site we got the (one) chance to impress. The summary of the slides below will focus on two main aspects: performance and user experience. In the slides you can read on the 25 principles and how to work with them.

  • Performance
    Get content to the user as quickly.
    I think this formula used in Ilya Grigorik’s talk sums this up:

    Perceived performance = f(Expected Performance, 
                               UX, 
                               Actual Performance)
  • User Experience
    Optimize for the mobile device. So start your design from the small screen and move forward to a bigger one.

Here are tools that every web developer should use (or embrace the concepts that these tools promotes): Continue reading

Standard
Chrome, HTML5, JavaScript, webdev

Web Fundamental Update

Here are the slides from a talk I gave at Campus TLV. It’s a summary of web fundamentals is offering developers at the first step of ‘building your first multi screen site‘.

If you would like to contribute to this important open-source project, please jump to our github repo: github.com/google/WebFundamentals

 

 

Standard
Chrome, JavaScript

The Little Prince And The Better Parts Of Javascript

The little price“It seems that perfection is attained not when there is nothing more to add, but when there is nothing more to subtract.”

In this (quality talk), Douglas Crockford talks on the better parts of JavaScript. As always, it’s an opinionated talk, so choose what you wish to take from it for your next project. There are many aspects that Douglas touch on, that are very helpful to any technology you are using. I truly like his opening from “The little prince” ‎- Antoine de Saint-Exupéry. Great points on software development and especially JavaScript’s holes you wish to avoid.

Btw, back at 2010 I’ve recommended his book – Times fly.


Standard
Chrome, HTML5, JavaScript, webdev

uptodate.frontendrescue.org just got a hebrew version

fed-uptodate-hebrewI’ve been contributing to this cool project: github.com/frontend-rescue/keep-up-to-date and today it’s live!

If you wish to check what are the best practices for front-end developers (in hebrew) this is your version: http://uptodate.frontendrescue.org/he/

Good luck.

Standard
Chrome, JavaScript, webdev

How To Create A RESTful API

Google APIs with picturesque app

If you wish to read the background on RESTful APIs It’s all started here.  You can look at some good examples for RESTful APIs from Google, Twitter and many others. In this post, I will try to focus on some important aspect that you want to keep in mind when you are building your next RESTful API. Btw, if you are looking on an efficient way to create it – Checkout my talk from last Google I/O. It’s over a year now, but still very relevant.

Main aspects to pay attention

Continue reading

Standard
JavaScript, webdev

YouTube Analytics Dashboard With Apps Script

player_apisThere are cases where you wish to collect statistics on your youtube videos or channel. There are few options to do it with YouTube API. As the YouTube’s API supports many languages you can choose the one that will work for your environment. In many of these options, you will need to develop a server side that will fetch the data and a front-end to present it and give the users option to query it. If you wish to dive deeper (e.g. specific metric on channel performance and videos statistics), you will need to work with YouTube Analytics API.

In this post, we will see a simple example to create a dashboard that will be updated on a daily basis. Since we wish to save ourselves from building (and maintaining!) a server side and a web app to access it, we will use the power of Google Apps Script (GAS) and Google sheets.

The Dashboard

Here you can find the “Dashboard example sheet”.
Feel free to copy it and work on your own version that is not in ‘read-only’ mode. Continue reading

Standard
Chrome, HTML5, JavaScript, mobile, webdev

Israel’s Alerts – Mobile Web App Example

Alerts IL - mobile web app

If you wish to have a window on the side of your screen and/or leave your mobile device on a page that will show you an updated list of all the alerts (Tzeva Adom and others) – Here is a web app for you. It is based on Foundation CSS framework as it’s ‘mobile first ‘ and got a very powerful grid system.

Code

Check out the Alerts-IL GitHub repo or the Google App Engine version.

If you wish to see the Android app code github.com/greenido/Alerts-IL-Android which is a simple native app that wrap the mobile web app.

Continue reading

Standard
Chrome, JavaScript, webdev

(Try To) Predict The World Cup With Monte Carlo Simulation

brazil 2014 world cupWho will win this world cup? Brazil without Neymar? Lionel Messi? Or are we going to see the Nederland making a big surprise?

If you like coding, statistics and problems that are not trivial… You found the right place. In this post, I will try to show an example to a way for solving this type of questions. For the readers that don’t remember what is Monte Carlo simulation (don’t be shy) – You might want to check a previous post that I wrote last summer and give you an intro to the world of Monte Carlo on Apps script and Google compute engine.

Monte Carlo experiments (simulations) are a broad class of computational algorithms that rely on repeated random sampling to obtain numerical results. In most cases, we will run our simulations many times over in order to obtain the distribution of an unknown probabilistic entity.  This tool is often used in physical and mathematical problems and are most useful when it is difficult or impossible to obtain a closed-form expression, or infeasible to apply a deterministic algorithm.
In the real world, we see it being mainly used in three distinct problem classes:
* Optimization.
* Numerical integration.
* Generation of draws from a probability distribution.

 

OK, there is no time. The game starts in two days.

The Idea

Monte Carlo simulations tend to follow a particular pattern. Here is how we will use this tool: Continue reading

Standard
Chrome, HTML5, JavaScript, mobile, webdev

Polymer And Web Components At I/O 2014

This talk cover three main subjects:

  • State of the union – What has change in the past 3 years
  • Problems solved by web components – When it comes to build complex web applications, there are many ways we can do things better. In this section we will see how/why.
  • Thinking in components – What are the implications when you coming to design and build web apps.

== Psst… It’s in raw format – I will polish it after I/O is over ==

State of the union

Once many years ago… We had HTML4 with all its problems. Later, well few years back, HTML5 was the answer for everything. It specifically, tried to show developers what can be done on the web modern platform and moreover APIs browser vendors could add to help developers boost their productivity. In the past 18 months we saw a lot of things like: templates, shadow dom, data binding etc’. It’s been a long journey. Now, we have Polymer. Continue reading

Standard