Micro Project Practice (1): Describing entities in XML

Source: Internet
Author: User

The first step of system design is of course the analysis of requirements, the current can think of is the management of the log, uh ... Plus a sort of a good, basically like this:

We use an XML to describe the two entities:

 1: <?xml version= "1.0" encoding= "Utf-8"?> 2: <entities xmlns= "Http://it.ouc.edu.cn/EntityDescription/V 2 "> 3: <entity title=" log "name=" blog "module=" Blogs "> 4: <item title=" title "Name=" title "type=" text "requ Ire= "true"/> 5: <item title= "Contents" name= "Content" type= "Longtext" require= "false"/> 6: <item title= "belong to Category "Name=" Blogclass "type= entity" entityname= "Blogclass" require= "false"/> 7: <item title= "Create Time" name= "Createda" Tetime "type=" datetime require= "true"/> 8: <item title= "Update Time" name= "Updatedatetime" type= "datetime" require = "true"/> 9: </Entity> <entity title= "Log Classification" name= "Blogclass" module= "Blogs" > One: <item title = "name" name= "name" type= "text" require= "true"/>: <item title= "description" name= "Description" type= "text" require= "false "/> </Entity>: </entities> 

This XML is easy to read, its schema is defined in "http://it.ouc.edu.cn/EntityDescription/V2", and the root node indicates that the XML defines a collection of entities (entities). Each entity contains a lot of data fields, the field has a title, name, type and other attributes, it should be noted that the data field here does not represent the database design, and does not represent the design of the class, but the business logic definition of the entity.

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.