Changes between Version 2 and Version 3 of TracDev/ContextRefactoring
- Timestamp:
- Sep 26, 2007, 9:43:14 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracDev/ContextRefactoring
v2 v3 216 216 attachment = parent.get_child('attachment', filename) 217 217 }}} 218 '''Implementation Notes:''' Behind the scene, a `ResourceFactory` instance is created, which is used to share some common information across similar `Resource`, like the manager component, the `PermissionCache` instance and the (optional) parent resource. This reduces the memory footprint in to a minimum and avoids any recursive reference between the `PermissionCache` and the `Resource`.219 218 220 219 After a few iterations of the prototype implementation, I finally came to something very similar to the `IResourceManager` interface from '''Context Factories and Subclasses''' chapter above, mainly for efficiency concerns and simplicity of the implementation. But for convenience purpose, the `Resource` class has still the `name`, `shortname` and `summary` properties, as well as a `model` property and an `url(href)` method. Those properties and method simply delegate the actual work to the resource's manager (i.e. the Component implementing the `IResourceManager ` interface):