←Older revision |
Revision as of 12:21, 27 October 2008 |
Line 35: |
Line 35: |
| When I checked the state of all solutions after [[APIFest08:Task3|task 3]], I found a perfect way to win. The solution 07 is an example of absolute API stability. The author of this solution managed to guess my future requirements and he changed nothing in the original API in first three rounds! Indeed, it is impossible to find an inconsistency in two versions of an API if they are identical. That is why my own goal for [[APIFest08:Task4|task 4]] was to force the author of solution 07 to make some changes. I succeeded, the API version 4 is different than the previous versions, however as the solution 07 is based on a variation of [[APIDesignPatterns:RequestResponse|request/response]] pattern, it still seems unbreakable. | | When I checked the state of all solutions after [[APIFest08:Task3|task 3]], I found a perfect way to win. The solution 07 is an example of absolute API stability. The author of this solution managed to guess my future requirements and he changed nothing in the original API in first three rounds! Indeed, it is impossible to find an inconsistency in two versions of an API if they are identical. That is why my own goal for [[APIFest08:Task4|task 4]] was to force the author of solution 07 to make some changes. I succeeded, the API version 4 is different than the previous versions, however as the solution 07 is based on a variation of [[APIDesignPatterns:RequestResponse|request/response]] pattern, it still seems unbreakable. |
| | | |
- | And actually nobody managed to question [[BackwardCompatibility]] of the solution. But '''Jan Žák''' noticed an important problem. To quote his email: ''Sometimes - like in the Task2 - the author even added nothing to the API and implemented the requested feature directly in the test case. I'm not convinced, that this approach is strictly fair.''. When I look at the quest of the [[APIFest08:Task2]] and see the complex subclassing classing code provided by solution 07... | + | And actually nobody managed to question [[BackwardCompatibility]] of the solution. But '''Jan Žák''' noticed an important problem. To quote his email: ''Sometimes - like in the Task2 - the author even added nothing to the API and implemented the requested feature directly in the test case. I'm not convinced, that this approach is strictly fair.''. When I look at the quest of the [[APIFest08:Task2|second round]] and see the complex subclassing classing code provided by solution 07... |
| | | |
| <source lang="java"> | | <source lang="java"> |
- | /** Merge all currency rates of convertor 1 with convertor 2.
| + | /** Merge all currency rates of convertor 1 with convertor 2. |
- | * Implement this using your API, preferably this method just delegates
| + | * Implement this using your API, preferably this method just delegates |
- | * into some API method which does the actual work, without requiring
| + | * into some API method which does the actual work, without requiring |
- | * API clients to code anything complex.
| + | * API clients to code anything complex. |
- | */
| + | */ |
- | public static Convertor merge( final Convertor one, final Convertor two ) {
| + | public static Convertor merge( final Convertor one, final Convertor two ) { |
- | // quite a complex code with subclassing
| + | // quite a complex code with subclassing |
- | }
| + | } |
| </source> | | </source> |
| | | |