Changes between Version 5 and Version 6 of relationships
- Timestamp:
- 03/07/2011 09:42:26 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
relationships
v5 v6 5 5 A framework that implements relationships as first class members of the language and extends the browser to support them. 6 6 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. 7 You 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 9 The 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)! 8 10 9 11 The framework was inspired by relational databases and ORM mappers. … … 42 44 In the relationship browser, select the ''Artist'' class and click on the relationship symbol: --> 43 45 46 [[Image(auswahl.png)]] 47 44 48 In 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. 45 49 … … 56 60 Select the existing relationship and add a name for the right class: ''rightClassName: 'painting' '' and save. The methods will be renamed. 57 61 62 [[Image(nachaenderung.png)]] 63 58 64 = Known limitations = 59 65 … … 61 67 62 68 Generated methods are editable. Don't do it! 69 63 70 Generated instance variables are editable and accessible. Don't do it, use the accessors instead! 64 71