While it may not be the best of times to start reading a book on iOS programming, I have no idea when I can really run through this book (perhaps only after I've gotten myself a Kindle-like reading device. But still, something to consider.
OH:
There are only two hard things in computer science: cache invalidation, naming things and off-by-one errors.
LOL.
Here are the exact steps on how the implementation would go as of now.
##On the Product Page
- Product page loads. Also loads Advocado JS.
- Advocado JS extracts information from the page or from parameters to decide what to render.
- Advocado JS calls platform side API or advocado backend for data to populate templates (mustache.js).
- Advocado JS downloads, renders and inserts the overlays (HTML/CSS) (via templates) into the page
- Wait for user interaction
- User clicks and proceeds to choose one of the sharing channels, for the case of this scenario, Facebook
##AdvocShareWidget
###Events
shared
The user has successfully shared the product.
sharing
A sharing popup has been launched and the user is currently sharing.
##Inserting Javascript
We propose a method to load our scripts/CSS using HeadJS. We do the insertion of the HeadJS asset loader via a simple script then we use it to load the rest of our modules (we have to do a minimum of 1 script insertion. which adds some certainty to it.)
Script insertion of HeadJS (not fully tested across all browsers):
var _hT=document.getElementsByTagName('head')[0];var _a = document.createElement('script'); _a.src='//cdnjs.cloudflare.com/ajax/libs/headjs/0.99/head.load.min.js'; _a.type='text/javascript';_a.async=true;var s=document.getElementsByTagName('script'); if(s.length==0){ _hT.appendChild(_a); } else { s[0].parentNode.insertBefore(_a, s); }
Listed inside the document is a set of stuff that we will need in order to render the referral overlay correctly.
- Owner_sub_name (Parent subscriber's details, such as first name and photo)
- list_products_ids_campaign (IDs of other products sharing the same campaign)
- picture_ppl_sharing/no_ppl_sharing (details of other people sharing this particular product)
- landing_template_msg (template message for a referral for this particular campaign)
I'm going to constantly come back to this entry. It's really a list of stuff I thought and said that I believe to be flawed or just wrong. It serves as a constant reminder that the world though small, is still more significant in the sum of its parts than my often too-big-for-my-britches mindset.
1. "If you're not updating Facebook, how do I find out what you've been up to?"
Call. Arrange for a meet up. Get them out for a cup of coffee. That's what friends do.
2. "Your business NEEDS to scale out of Singapore"
Background: Singapore is a really small country, with a population of less than 6mil. If you're working in tech and B2B, it's more often than not the market is too small to support a handful of competitors, so people starting (hyper-)local businesses often have to think about how to expand beyond the country's shores. If you're considering B2C, for highly disruptive products, you have a number of really conservative customers who would not be willing to fork out their hard-earned money for s
I'm going to be honest.
I saw this in the Magento documentation for extension development:
... and i got kind of scared.
But I guess now we just have to dive head in to figure it out, because trying to use my own templates and importing stuff is like trying bend over backwards to kiss my heels - too inconvenient and i've given up trying to find a way.
var cc = $('form').clone(); | |
cc.find('input[type=submit]') | |
.attr('onclick', null) | |
.on('click', function() { alert('Hey!'); }); | |
$('#some-element').before(cc); |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<meta name="viewport" content="initial-scale=1.0"> <!-- So that mobile webkit will display zoomed in --> | |
<meta name="format-detection" content="telephone=no"> <!-- disable auto telephone linking in iOS --> | |
<title>Antwort - responsive Email Layout</title> | |
<style type="text/css"> |