Improved to proficient in Mobile (android, IOS) App service program development, androidios

Source: Internet
Author: User
Tags app service

Improved to proficient in Mobile (android, IOS) App service program development, androidios

6.2 development Improvement
Please refer toDevelopment ManualBasic label language and Expression in

6.3 proficient in mobile App application service program development
Familiar with light-Open Platform rules and development examples for mobile apps (in json format)
In addition to the basic development label language and expression (see the development manual in the same download package), the light-open platform is designed for the most common json text format development rules for mobile apps:
The file name extension must be json (for example, one. json) or jsp file name extended with JspEasy
The file content must be in closed json format, and static content can be directly written in json format, for example:

{“item”:    {<chtml>… …</chtml>    },”other”:”other value”}

The value attribute parameter indicates the output value without quotation marks, for example:

<price value>@{item:price}</price>

Output: "price": 51.24

The list attribute parameter indicates that the output is in the array list format, and the end attribute parameter indicates the end position of the array (equal to the end value of)

<For bags = item end = "@ {item: getLength}"> <item list = "@ {item: getSuffix}" end = "@ {item: getLength} "> <! -- The list attribute parameter indicates that the output is in the array list format, and the end attribute parameter indicates the end position of the array (equal to the end value of for) --> <name >@{ item: name} </name> <price value >@{ item: price} </price> <unit >@{ item: unit} </unit> </item> </for>

The nolast attribute parameter indicates that a comma is output after the array.

<For bags = item end = "@ {item: getLength}"> <item list = "@ {item: getSuffix}" end = "@ {item: getLength} "nolast> <! -- The list attribute parameter indicates that the output is in the array list format, and the end attribute parameter indicates the end position of the array (equal to the end value of ), the nolast attribute parameter indicates that a comma is output after the array --> <name >@{ item: name }</name> <price value >@{ item: price }</price> <! -- Value attribute parameter indicates the output value without quotation marks --> <unit >@{ item: unit} </unit> </item> </for> <tatol >@{ item: getLength} </tatol> <! -- The nolast of the front edge is used to output a comma in the front of the group -->

Nokey attribute parameter indicates no output array name

<For bags = item end = "@ {item: getLength}"> <item list = "@ {item: getSuffix}" end = "@ {item: getLength} "nokey> <! -- The list attribute parameter indicates that the output is in the array list format, and the end attribute parameter indicates the end position of the array (equal to the end value of ), nokey attribute parameter indicates that no array name is output --> <name >@{ item: name }</name> <price value >@{ item: price }</price> <! -- Value attribute parameter indicates the output value without quotation marks --> <unit >@{ item: unit }</unit> </item> </for>

Input strings directly without a name Array

<Chtml> <! -- Content in json format, without a name array, can be directly output as a string --> <for bags = item end = "@ {item: getLength} "> <if x =" @ {item: getSuffix} "else = 1> <bag id = pPage x = 0> <we name = name>" @ {item: name} "</we> </bag> <bag id = pPage> <we name = name >@{ pPage: name}," @ {item: name} "</we> </bag> </if> </for> </chtml> [@ {pPage: name}]

Empty array direct output:

[]

The entire set of rules is still outstandingEasyCan be mastered at almost a glance. The learning will be carried out in conjunction with the instance later

Download related resources:
Mobile App server development from entry to entry: http://download.csdn.net/detail/tx18/8741611
Building mobile App server: http://download.csdn.net/detail/tx18/8737507 quickly
Light Open Platform will occasionally upgrade to provide you with more powerful and Easy functions, please pay attention to download the latest version: http://download.csdn.net/user/tx18

Related Article

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.