Changes between Version 5 and Version 6 of relationships


Ignore:
Timestamp:
03/07/2011 09:42:26 PM (13 years ago)
Author:
christoph.neijenhuis
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • relationships

    v5 v6  
    55A framework that implements relationships as first class members of the language and extends the browser to support them.
    66
    7 You can define relationships between classes. The framework will automagically create responding methods that you can use. This is not only faster than implementing these methods yourself, it's also a lot easier to read and edit the relationship. Additionally, the generated methods maintain the relationship in a consistent state which prevents common bugs manual implementations of bidirectional relationships.
     7You define relationships between classes and the framework automagically creates responding methods for you to use. This is not only faster than implementing these methods yourself, it's also a lot easier to read and edit. Additionally, the generated methods maintain the relationship in a consistent state to prevent common bugs.
     8
     9The browser extension helps in creating new relationships by providing good templates. Usually, you only select the first class, the relationship-type and write the name of the other class. Compare this to Ruby On Rails where you have to open the first class, type the relationship-type and write the name of the other class - and then do the same thing again in the other class (for bidirectional relationships)!
    810
    911The framework was inspired by relational databases and ORM mappers.
     
    4244In the relationship browser, select the ''Artist'' class and click on the relationship symbol: -->
    4345
     46[[Image(auswahl.png)]]
     47
    4448In the category menu, select ''!OneToMany''. As you can see, there is a template for a ''!OneToManyRelationship'' in the edit pane. Simply add the ''Artwork'' class as the right class and save. The new relationship has been created.
    4549
     
    5660Select the existing relationship and add a name for the right class: ''rightClassName: 'painting' '' and save. The methods will be renamed.
    5761
     62[[Image(nachaenderung.png)]]
     63
    5864= Known limitations =
    5965
     
    6167
    6268Generated methods are editable. Don't do it!
     69
    6370Generated instance variables are editable and accessible. Don't do it, use the accessors instead!
    6471