Talk:Canvas ND framework: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
No edit summary
mNo edit summary
Line 1: Line 1:
really "744" or is that a repeated typo and you mean "747" ? [[User:Laserman|Laserman]] ([[User talk:Laserman|talk]]) 17:55, 30 November 2013 (UTC)
== Versioning ==
: thanks for proof-reading my edits, but in this case it's actually correct - the 747-400 is commonly referred to as the B744: https://en.wikipedia.org/wiki/Boeing_747
As more and more aircraft start adopting the framework, we should consider adding some "versioning" support, so that people can request a certain version and assume a certain API that won't change over time. TheTom is already doing this in the Canvas APIs - and we basically need a similar mechanism, so that the APIs can evolve, without breaking unmaintained aircraft - redneck and omega95 were extremely frustrated with the lack of backwards compatibility when the route manager/fplan APIs were reworked, because they didn't have the time to update their aircraft - so this is a valid point and we should make sure that we're not causing any unnecessary frustration here. I am proposing a hash/namespace-based lookup for APIs, unless Philosopher can convince me that we need something more sophisticated than that...
--[[User:Hooray|Hooray]] ([[User talk:Hooray|talk]]) 18:05, 30 November 2013 (UTC)
 
<syntaxhighlight lang="nasal">
 
var VersionedAPIContainer = {};
VersionedAPIContainer.new = func(version);
...
 
 
var NavDisplay = {};
NavDisplay[ "1.0" ] = VersioonedAPIContainer.new( "1.0" );
 
...
 
# request a certain API version
var ND = NavDisplay["1.0"];
ND.new();
 
 
 
</syntaxhighlight>

Navigation menu