I just want to share some of my recent web development experience on the mobile platform with you.
1. iscroll Control
This control is a very good one developed using mobile WebKit to achieve the sliding effect. Http://cubiq.org/iscroll
It is written purely in JS and does not rely on other JS frameworks. The following examples show the effects of Safari on iPad:
Carousel image:
Sliding effect (similar to the Sina Weibo client, slide upwards to load asynchronously ):
Calendar controls similar to those of IOS:
You can expand many plug-ins Based on iscroll.
2. Mobile development events
In mobile development, many JS events are different from traditional development events,
For example: $ (document). BIND ('click', function (){
// Do something here
});
This definitely does not work in mobile development. You need to use touch events;
For example: $ (document). BIND ('touchend', function (){
// Do something here
});
Touchmove and so on.
For Dom control operations, such as $ (# ID). Live ('keyup', function (){
// Do something here
});
This is generally not used, probably because of jquery, which makes safari crash easily. Generally, it is replaced with an oninput event.
3. Mobile development framework
I personally think that if you want to develop a web platform for mobile platforms, you must be careful not to use jquery mobile. We mainly try to use many new features of WebKit and css3 to achieve some results. Currently, some mobile Web development platforms on the Internet are not very mature. If you are not a JS guru, try not to design JS frameworks in the project, even if you are familiar with jquery.
Because there are many. NET developers are not particularly fond of JavaScript and do not have enough patience to write Javascript. Therefore, when developing Web together, try to guide JS cainiao as much as possible, otherwise, the final Code cannot be maintained.
4. Display and load content
For mobile platform development, the corresponding content must be displayed on a page, which provides a good user experience. It involves switching many pages or content. At this time, the module cache and asynchronous loading are very important, and a good loading mode is very difficult. We recommend that you use a framework such as knockoutjs or jquery template to facilitate content separation between different modules.
I will share with you later.