What is PWA?

5742 2020-06-26 13:27

When Google came up with the PWA, it didn’t have a precise definition. It is not a specific technology, but a combination of techniques to improve the user experience. Those technologies are Web App Manifest, Service Worker, Web Push, etc.

The main features of PWA are as follows.

  • Reliability - instant loading, even in unstable or disconnected network environments.
  • User experience - rapid response, with smooth transition animations and feedback on user actions
  • Stickiness - like the Native App, can be added to the home screen and receive offline notifications.

PWA itself emphasizes Progressive (Progressive) in two perspectives.

  1. PWA is still evolving;
  2. PWA is downward-compatible and non-intrusive. It costs developers little to use the new features - developers can add it to the existing site progressively.

Google’s “Progressive Web App Checklist” defines those minimum requirements for PWA.

  • served over HTTPS.
  • Pages should be responsive on desktop, tablet, and mobile devices
  • All URLs have content to show in case of disconnection, not the default browser page
  • requires Web App Manifest to be added to the desktop
  • Faster page loading and shorter delay, even on 3G networks
  • It displays correctly in all major browsers
  • Smooth animation with immediate feedback
  • Each page has its own URL

Features of PWA

A PWA combines the benefits of both the Web App and Native App and gives us the following features.

  • Progressive - for all browsers, as it is developed with progressive enhancements in mind
  • Connectivity agnostic - Ability to leverage Service Worker for offline or low network connectivity.
  • Native experiences - on the App Shell model, they should have Native App interactions.
  • Continued updates – always up-to-date, no version or update issues.
  • Security - Served over HTTPS
  • Indexable - manifest files and Service Workers can be recognized and indexed by the search engine.
  • Stickiness - By pushing offline notifications, etc., you can get users back to your app.
  • Installable - users can easily add web apps to the home or desktop without going to an app store.
  • Linkable - share contents through links without downloading and installing them.

More specifically, what is the advantage of PWA over the native app? Openness and index-ability. Users can hardly install a native app instantly and search across native apps seamlessly.

The table below shows the comparison between t raditional Web App, Native App, and PWA for each feature.

Installable Linkable User experience User stickiness
Traditional Web
Native App 😐 ✅️

Why PWA?

5742 2020-06-26 13:27

PWA means Progressive Web Apps. Back in 2014, the W3C published a draft of Service Worker, and then in 2015, Chrome supported it in the production environment. If we take the emergence of Service Worker, one of PWA’s core technologies, as the start point of PWA, PWA’s birth year is 2015. Before focusing on what a PWA is, let’s first understand why we need it.

  1. User experience. Back to 2015, frontend developers spend a lot of time optimizing the web by speeding up the rendering of the initial page, making the animation smoother, etc. However, the native app still wins regarding the user experience.

  2. User retention. Native apps can be pinned onto the mobile phone’s home screen and bring the users back into the app by notifications, while the web apps cannot.

  3. Leveraging device APIs. Android and iOS provide abundant device APIs that native apps can easily use with the user’s permission. However, back then, the browser does not fully support them.

Google’s tutorial of Why Build Progressive Web Apps summarizes the problem as “Broad Reach, Low Engagement”.

UV and user duration comparison between web sites and native apps

To tackle the disadvantages of web apps in the mobile age, PWA comes into being.

How not to die?

26410 2020-05-06 16:19

Eating in the right way can significantly influence your health. Heard various advice from different sources, you may have difficulties to tell which one is the most helpful. The book “How Not to Die” provided eight practical suggestions backed up by scientific researches to help you establish a healthy diet.

Adopting a plant-based diet

The plant-based diet has been proven to have a much positive result on health than other foods we have in the US society. A China-Cornell-Oxford research project studied the menu of Chinese people in the 1980s. They found the Guizhou Province has the lowest mortality rate of coronary disease among men under 65, where people consumed the least animal-based food.

Additionally, plant-based diets can facilitate the patient’s recovery. Lifestyle-medical pioneers Nathan Pritikin and Dean Ornish put patients with advanced heart disease on plant-based diets, and then they witnessed significant improvements in alleviating their symptoms. For example, the harmful plaque in patients’ arteries dissolved faster than usual.

Having more fruits, especially berries

Four servings of fruit, including one type of berries, per day, is essential in a healthy diet. A single extra serving of fruit each day has proven to result in a 24-percent decline in the possibility of having Chronic Obstructive Pulmonary Disease. Notably, berries are particularly crucial due to their positive influence on liver function, cancer-resistance, and immune system. In 2014, a study taken among 14 patients revealed that their polyp load declined remarkably after nine months of having black raspberries.

Vegetables are indispensable

Vegetables play a vital role in preventing diseases. Known as “queen of greens”, kale can reduce people’s cholesterol levels. In a three-month study taken in 2008, high-cholesterol-level patients were asked to take three to four shots of kale juice every day. The proportion of beneficial cholesterol increased significantly, which was equal to the effect of running for 300 miles. Also, cruciferous vegetables help boost liver and lung functions.

Thus it is advised that two of the five daily servings should be leafy veggies (e.g., kale, arugula, and chard). Another two could be carrots, beets, or mushrooms. And finally, one serving of cruciferous vegetables like broccoli, cabbage, or cauliflower.

Recommending beans and whole grains for every meal

It is recommended by the American Institute for Cancer Research that beans or legumes should be included in every meal since they contain an animal-free protein as well as fibers. Navy and pinto beans can also be a good alternative to decrease bad cholesterol for people who don’t like soy much. They can also function in slowing down sugar absorption and relaxing stomach. Similar to beans, people should also take whole grains three times daily. In 2015, research found that people who involve whole grains in diets live longer.

Taking more nuts and seeds for better nutrition

The Global Burden of Disease Study conducted between 1990 and 2010 found that eating too few seeds and nuts were the third-leading dietary cause for death and disability all over the world. Even a single serving of brazil nuts is equivalent to statins medicine in lowering cholesterol levels. Nuts and seeds facilitate the detoxification of excess iron. They can also build up bone density. Among all the seeds, chia, hemp, pumpkin, sesame, and sunflower seeds are recommended. It is an excellent alternative to sauces and dressings of your daily meals.

Placing herbs and spices in food

Not only can herbs and spices add flavor to a dish, but they are also essential in preventing diseases, especially cancer. Among all the food groups, they have the highest levels of antioxidants. In a study taken in 2010, Alzheimer participants who took saffron received better cognitive function outcomes than those who had a placebo. Additionally, spices like cloves and cinnamon can reduce depression because of an enzyme inhibited in them.

It is worth mentioning that turmeric is proven to be the best in preventing cancers among all the herbs and spices. Due to the fact that turmeric disappears rapidly, having it with black pepper can slow down the process and help absorption. Curry powder is a decent choice since it usually contains both pepper and turmeric. However, turmeric isn’t for everybody. People with gallstones and kidney stones should restrict their intake.

Making water your first choice of beverages

Theoretically, a human should drink five 12-ounce beverages every day, and pure water is always the best choice. It is claimed by many articles that drinking eight glasses of water per day is a must, yet there is barely scientific evidence on that. Our daily intake of water comes from not only beverages but also fruits and vegetables.

In addition to water, coffee and tea can also be a good alternative since they are all good for health to some extent. For instance, research conducted by Tufts University revealed that tea functioned significantly in dropping blood pressure.

Credit Card Payment Processing

5 Parties

  1. Cardholder: an authorized user of the card. e.g., anyone who has a credit card.
  2. Issuer: an institution that issues credit cards to its users. e.g., Chase, BOA, discover, etc.
  3. Merchant: an entity that provides products or services, and accepts payments via credit cards. e.g., Uber, Doordash, etc.
  4. Acquirer: who provides card services to merchants. e.g., BOA Merchant Services, Chase Paymentech.
  5. Electronic payments networks: a clear-house for acquirers and issuers. e.g., VisaNet, MasterCard, Discover, American Express, etc.

Are Square and Stripe acquirers? No, they are payment aggregators.

2 Workflows

  1. Authorization: The cardholder provides the card / card info to the merchant, who processes it and sends (card number, amount, merchant ID) to the acquirer. The acquirer contacts the issuer via the electronic payments networks. The issuer checks against the credit line and fraud-prevention system, and then authorize or decline the transaction.

  2. Clearing / Settlement

    1. batching: At the end of the business day, the merchant asks the acquirer with a batch of payment information for clearing.
    2. clearing and settlement: the acquirer coordinates the clearing with the issuer via the electronic payments networks, and the issuer settles the funds and bookkeeps the transaction for the cardholder.

Why some ideas survive while others die? Two principles: being memorable and making people eager to spread. In the book Made to Stick, the authors have summarized six elements to make ideas stick, SUCCES for short, which represents Simple, Unexpected, Concrete, Credible, Emotional, and Story.

Simple - Cut down to the key message of an idea

Too often, we want to explain an idea thoroughly, but revealing too much detail is not good for people to understand. They will soon forget all the details and even the core message. We should simplify our message and understandably convey the idea, just like journalists would create good headlines for their reports to grasp readers’ attention.

Unexpected - Draw people’s attention by surprising them

The human brain would neglect selectively to things familiar to save energy. Only something surprising can draw its attention. The fact implies sticky ideas are also unexpected. It proves to be effective to use curiosity gaps to grasp attention. If you present some surprising facts or statistics in your idea, curiosity will drive people to get more information.

Concrete - Use concrete materials to be understood and remembered

Abstract terms are hard to understand, let alone to be remembered. When communicating an idea, we would better use concrete and understandable terms, along with examples and descriptive imagery.

Credible - Make an idea believable so it can spread

Ideas ought to be credible if they want to be spread out. Generally, there are three ways to add credibility to a plan. The story has experts or people with relevant experiences to back up Use realistic facts and statistics to add credibility to the story Encourage the audience itself to be a reference

Emotional - Appeal to people’s emotions rather than present dry data

Imagine we have the campaign to ask people to donate to starving African children. There are two options: presenting the population of starving children, or showing a picture of a child in need of a donation. Comparatively speaking, people are more likely to take action upon the latter because it appeals directly to human emotions. Therefore sticky ideas should focus on emotional triggers instead of dry facts.

Story - Inspire people to action by telling a story

It is a common mistake to focus on an empty slogan without any story when people are communicating ideas. A slogan is sticky, but it can not inspire people to take action like a story. For example, Subway has benefited immensely from the true story of Jared Fogle, who was an overweight man but managed to slim down by having two Subway meals per day.

Download TianPan.co App

Learn startup engineering anywhere, anytime

Community Telegram: System Design and Architecture Forum
Subscription RSS Github Email Linkedin Twitter