Home  >  Article  >  Backend Development  >  Web in 2015: Pursuing new functions outside the original “framework”

Web in 2015: Pursuing new functions outside the original “framework”

WBOY
WBOYOriginal
2016-07-25 09:00:59827browse

Web website development is currently undergoing a huge change. ServiceWorkers, sensor access, push notifications and other methods will break the original framework of the Web. In 2015, we can use these methods to quickly change our website. Find the most suitable function among the ever-increasing number of Web functions.
The original vision of the Web was a universal version of an application, or in the words of history books, an "application". It is the lowest common denominator that can run anywhere, which makes the Web completely built in a "frame" and the potential functionality is limited to a "rectangular content".
Early applications allowed developers to execute code in the background, provide cached data for offline use, use push notifications, and provide other features that some websites could not provide. However, the Web is currently undergoing a huge change. The browser responsive apps revolution, and now anyone can take advantage of these changes to "break the frame."
Here are the three most practical ways to break the framework:
1. ServiceWorkers allow applications to utilize the background processing capabilities of the server, such as starting web applications when offline through hooks. The core of the system is an event-driven Web Worker that responds to events distributed by Web documents or other event sources. Service Worker provides a common entry point (Entry Point) for event-driven background processing on the open Web platform, and can be extended to support other specification requirements. It allows a web page to have scripts running in the background, making the web application look more like a native application.
2. Sensor access will make the page "aware" of the user's environment. For years, web pages only knew the size of the user's screen and browser type. Now that data from various sensors is available, ambient light, microphones and cameras are all present in the W3C standard, which gives the page outside the rectangular boundaries of the website.
3. Push notifications will allow websites to maintain a continuous connection with their users, even after the user has closed the website's browser option.
4. The combination of ServiceWorkers and push notifications also has a very important symbiotic effect. Push does not necessarily have to display a notification to the user, but instead executes arbitrary ServiceWorkers code. In other words, imagine your favorite show, when you watch the first episode, execute the ServiceWorker through push, preload the second episode into the cache, and when you are offline, you can watch it when you want to watch it The content of the second episode.
What should we pay attention to?
Some people may be "scared" when a large number of features are added to the browser. So each function needs to have a permission check/visual indication that it is being used. For example, when a microphone is recording, there needs to be an icon symbol to let the user know what is happening and to cancel the application through this icon.
Another major trend is the secure web, these new features like ServiceWorkers and push are powerful, HTTPS is required to protect users and website owners. This prevents code injected by malicious wireless carriers or ISPs from having long-term consequences for websites and users. In 2015 EFF will provide SSL for free, and Google even recommends marking all HTTP in browsers as insecure, which will lead to an explosion of websites converting to SSL.
Editor's note: Our common link addresses start with "HTTP". Some websites are gradually using SSL for security reasons, thus becoming the "HTTPS" protocol. For example, when using the HTTPS protocol, when you visit http://www.csdn.net/, it will automatically change to https://www.csdn.net/, that is, starting with "HTTPS". In this access mode, it means that you are having an encrypted connection with this website, and the communication information between you and the website is difficult to be obtained by a third party.
How to position your website in 2015?
Here are some quick ways to change your website and put it ahead of the competition:
1. “Offline First”: Use ServiceWorkers to cache the latest state of your website, render it out, and show it when new data is fetched Load messages, which results in a lightning-fast user experience.
2. Response intelligence: Use valid sensing data to provide users with presets or other adjustments. For example, if a website has a lot of content, the contrast can be adjusted based on lighting conditions. Games or other interactive content? Then connect the motion sensor to give users an immersive experience.
3. Reconnect with your users: Find a natural way to evoke memories for your website. Keep your website fresh. Some good examples are reminders of new content (new messages/friend requests).
Visitors of a project will often focus on the selling price, so you have to find a truly suitable application for your website. Rather than just imitating others.
Receive LAMP Brothers’ original PHP video tutorial CD/"Essential PHP in Detail" for free. For details, please contact the official website customer service:
http://www.lampbrother.net
You can subscribe Email, I will share IT-related tutorials and books with you from time to time.
http://list.qq.com/cgi-bin/qf_invite?id=ea7d919ad263169bce2be53a3e16da0f0ec55ac36513c68e



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn