Changes between Version 20 and Version 21 of MolgenisAddressBookExample
- Timestamp:
- 2009-08-23T18:58:53+02:00 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MolgenisAddressBookExample
v20 v21 1 1 [[TOC]] 2 2 3 = Generating MOLGENIS from scratch = 4 We will generate a new MOLGENIS by the example of a simple Address Book application: 5 6 a simple database having “Contacts” entities that each can have zero or more “Addresses”: 7 8 [[Image(address-book-screenshot.JPG)]] 3 = Generating MOLGENIS from scratch, step-by-step = 9 4 10 5 == 1. Create the data model XML[[BR]] == … … 20 15 }}} 21 16 22 == 2. Add a “Contact” data type.==17 == Create a “Contact” data type == 23 18 {{{ 24 19 #!xml … … 30 25 }}} 31 26 32 == 3. Add properties to the “Contact” data type.==27 == Add properties to “Contact” == 33 28 * A unique, automatic numeric identifier field that MOLGENIS will use to refer contacts. 34 29 {{{ … … 54 49 }}} 55 50 56 == 4. Similarly create a “Address” data type (to keep it simple we only do phone numbers):==57 * Entity address51 == Create a “Address” data type == 52 * Create the entity again 58 53 {{{ 59 54 !xml … … 76 71 }}} 77 72 78 == 5. Finally we need to link the Addresses to eachContact. ==73 == Link Addresses to Contact. == 79 74 * In the Address entity create a [http://en.wikipedia.org/wiki/Foreign_key ForeignKey] reference to Contact 80 75 {{{ … … 88 83 89 84 Use of a meaningless numeric ‘id’ next to a meaningful ‘label’ enables us to change the ‘displayname’ name on Contact without the problem of also having to change this on each Address that refers to this contact. 85 86 == Result == 87 [[Image(address-book-screenshot.JPG)]]