| 1 | |
| 2 | * Threading model |
| 3 | * There is just one big lock per user (the user's [source:trunk/skipforward/src/de/opendfki/skipforward/FactsDatabase.java FactsDatabase] instance); it's acquired immediately in [source:trunk/skipforward/src/de/opendfki/skipforward/ui/web de.opendfki.skipforward.ui.web] servlets. |
| 4 | * If you create a background thread or something similar, make sure you get the lock |
| 5 | * MVC |
| 6 | * [source:trunk/skipforward/src/de/opendfki/skipforward/ui/web de.opendfki.skipforward.ui.web] servlets call [source:trunk/skipforward/src/de/opendfki/skipforward/ui de.opendfki.skipforward.ui] class methods; these build views (using custom beans, typically), build HTML using StringTemplate, and return the HTML |
| 7 | * there are some MVC helper beans (not to be confused with the RDF beans) in [source:trunk/skipforward/src/de/opendfki/skipforward/ui/beans de.opendfki.skipforward.ui.beans] |
| 8 | * bean renderers can be found in [source:trunk/skipforward/src/de/opendfki/skipforward/ui/st de.opendfki.skipforward.ui.st] |
| 9 | * these renderers are used for basic types or if Java code is needed for generating the HTML - otherwise, normal templates are used. |
| 10 | * RDF Beans |
| 11 | * interfaces are in [source:trunk/skipforward/src/de/opendfki/skipforward/vocabulary de.opendfki.skipforward.vocabulary] |
| 12 | * beans provide some convenience methods (e.g., getLabel(), etc.) |
| 13 | * beans instances are built using [source:trunk/skipforward/src/de/opendfki/skipforward/FactsDatabase.java FactsDatabase] methods |
| 14 | * beans are throwaway objects and do not have any internal state - every change using their setters is immediately persisted in RDF |
| 15 | * beans are associated with their corresponding FactsDatabase so you cannot pass one bean instance to another user |
| 16 | * non-binary features |
| 17 | * non-binary features are somewhat nasty to handle since their (rather generic) feature type isn't very helpful ("Name") - you need a feature instance to know the full type ("Name: Miller") |
| 18 | * when comparing feature types for equality, you should use feature123.getFeatureTypeId() instead of feature123.getFeatureType().getUri() - the ID is the feature type URI plus added values ("Miller" in the example above) |
| 19 | * same for getting labels: feature123.getFeatureType().getLabel() is not very helpful (again, "Name") - use feature123.getFeatureTypeLabel() instead. |
| 20 | * thus, writing code that uses something like Map<FeatureType, ...> is most likely a mistake. |
| 21 | |
| 22 | |
| 23 | |