Overview of Mobile front-end development

Source: Internet
Author: User

1 Background of mobile development1. The global mobile device will exceed the population; 2. The mobile Internet time exceeds the PC Internet time; 3. Devices such as tablets, e-readers, smart TVs and mobile phones download millions of apps every day.

Summary:
In the face of such challenges, it is important to keep the mind and eyes on a certain perspective.The strategy of product design and development must conform to the future trends of mobile applications in order to achieve sustainable success in terms of share and revenue.


2 The similarities and differences between mobile development and PC-side development

2.1 Performance DifferencesThis is one of the most significant differences. The biggest impact on mobile development is performance issues, especially power and fluency issues.

2.2 control ModeWith the PC universal use of mouse control, mobile devices generally adopt touch technology, the control of different ways, when the page interaction will betake advantage of good touch eventsIncrease the user experience.

2.3 Screen SizeMobile devices typically have small screen sizes and a wide range of resolutions.this will need to be done on the page display good compatibility . Also tonote the size of the click Area, the small size of the keys and the layout without space is very easy to trigger the wrong operation.

2.4 Interactive ModeIn order to limit the screen size of the mobile device screen, in order to provide users with greater reading space and an immersive experience,more and more applications are using drawer-type navigation, advocating "hidden art".

2.5 FlowThe characteristics of the mobile client itself determine the user's concern about the consumption of traffic. Soin page layout and production, to be as concise as possibleTo speed up page loading and optimize the user experience.


3 Mobile Development tips for attention

3.1 Keep a simple layout Screen redundant structure, keep the page simple and clean, content at a glance. See Example: vsco.co/  3.2 using medial QueriesSimply said medial queries is a media query, you can query the appropriate style according to the size of the set.    The advantage is that depending on the user's current width of the device, the Web page can be loaded with an alternate style to achieve a specific page style. @media screen and (max-width:300px) {/*tiny styles*/} @media screen and (max-width:600px) {/*small styles*/}
@media screen and (max-width:900) {/*big styles*/}

3.3 Defining BreakpointsDefine breakpoints, thenBreakpointWhat is it? The simple description is, the device width of the critical point, then in the mobile development design, the common breakpoint has six kinds, our future medial queries condition judgment can according to these several breakpoints to decide.

(1). The first breakpoint group is for the smartphone settings, his width is less than 480px; (2).    The second breakpoint is a high-smart mobile device, such as the ipads device, whose width is less than 768px; (3). Add a breakpoint less than 320px for small mobile devices; (4). You can also add breakpoints for tablet devices that are larger than 768px and less than 1024px.


3.4 Make your layout more flexibleThe layout of the page can be properly used in fluid layouts (that is, the self-adaptive layout, liquid layout, percent layout) best suited to a wide range of screen sizes, combined with the right medial Queries, you can make it suitable for any device page layouts that might appear.
3.5 self-adaptation of picturesA picture, what method can let him show on different device can adapt according to the screen size? There is a way to deal with this effect, if your Web page is not affected by the bandwidth (regardless of performance), you can first make a picture to fit the maximum screen, and then control the size of the display under different devices by the style, another way is you can prepare a different picture for each breakpoint.

3.6 Check your viewport.The students who have played the mobile side may know that many mobile browsers emulate the desktop PC under the browser, and your Web page will be compressed and displayed directly under a screen when browsing the browser on the mobile side.


Parameters:Viewport: Width of viewable area width:viewport, value device-width initial-scale: initial scale, Value 1.0 Minimum-scale: Allows user to scale minimum scale, Value 1.0 Maxim Um-scale: Allows the user to enlarge the maximum scale, the value 1.0 user-scalable: Whether to allow the user to zoom mobileoptimized The browser does not automatically adjust the file size, cannot pull the extension <meta name= "viewport" con Tent= "Width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" > <meta name= " Format-detection "content=" Telephone=no "> <meta name=" format-detection "content=" Email=no "> <meta name=" Format-detection "content=" Address=no ">

4 Mobile-related front-end technology

4.1 HTML5SemanticsBetterdevice compatibility featuresBetter, support the web-side audio, video and other multimedia functions, can be achieved through simple code to achieve a more dazzling effect, can be used cross-platform, and so on ...4.2 CSS3Powerful cascading style sheet enhanced version, through the simple code to achieve fillets, shadows, color gradient and so on, reduce the application of images, increase the user experience.4.3 jsZepto.js. Mobile page of jquery, lightweight mobile phone JS frame, gzip compressed 9.7k, can complete a variety of DOM structure operation, AJAX requests, touch screen events, and so on.4.4 Responsive layout to build a weaponFoundation,Ink,grumby,Maxmertkit,bootstrap, etc. With these tools, you can quickly build adaptive layouts that adapt to a variety of screen resolutions.4.5 Test Tools                                   Remote Debugging Tools Weinre
Www. (csdn too many URLs can not save, dizzy death, www.) npmjs.org/package/weinre (Csdn put too many URLs can not save, dizzy death, www. Start)

five. Mobile-side compatibility and processing

Summarizes some of the following:

1. Resolution compatible (including layout, breakpoint Settings) 2. Picture compatible (mainly in page design and CSS processing) 3. Navigation settings



Author:alone
Antroduction: Senior front-end development engineer
Sign: Life is not a failure, only a successful one.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.