<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Extensible Storage - best practices with plug-in development &amp;amp; growth in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/extensible-storage-best-practices-with-plug-in-development-amp/m-p/12096724#M49542</link>
    <description>&lt;P&gt;Could you provide an example please, with versioning?&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jul 2023 13:54:33 GMT</pubDate>
    <dc:creator>a_minet</dc:creator>
    <dc:date>2023-07-12T13:54:33Z</dc:date>
    <item>
      <title>Extensible Storage - best practices with plug-in development &amp; growth</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/extensible-storage-best-practices-with-plug-in-development-amp/m-p/8050177#M49538</link>
      <description>&lt;P&gt;I'm currently developing a Revit plug-in and need to utilze&amp;nbsp;a Schema, for now, I will just need two bool fields. However, the plug-in will grow over time and eventually will become a ribbon with multiple buttons &amp;amp; various functionality. Thus I assume that at some point I might need more sophisticated Extensible Storage. I already know that once a Schema is built, it cannot be extended, what is then best practice in such situations? To have separate Schemas for each part of my plug-in?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 11:44:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/extensible-storage-best-practices-with-plug-in-development-amp/m-p/8050177#M49538</guid>
      <dc:creator>adam.krug</dc:creator>
      <dc:date>2018-06-06T11:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Extensible Storage - best practices with plug-in development &amp; growth</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/extensible-storage-best-practices-with-plug-in-development-amp/m-p/8050359#M49539</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some people store data in serialized form (such as JSON).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't thing, that it is good practice. Imagine, your app v1.0 requires 2 piece of data: A and B, and your app v1.2 requires 3 piece of data: A, B and C. Your v1.2 app reads storage and see, there is no C. What does this mean? Was it due to old data or C should not be present? Your next app v.1.3 requires new data format for B -&amp;gt; B', may be with old data structure. Again you should deal with ambiguity environment, moreover, your app v.1.3 may deal with 3 data formats: (A, B), (A, B, C) and (A, B', C).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To deal with such thing you should have data version information and build specific processor for each version:&lt;/P&gt;&lt;P&gt;(A, B) -&amp;gt; v1.0 processor, that for example asks user about C and transfer data for the next processor&lt;/P&gt;&lt;P&gt;(A, B, C) -&amp;gt; v.1.2 processor, that converts B to B' using some algorithm&lt;/P&gt;&lt;P&gt;(A, B', C) -&amp;gt; just use data to do useful things.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since schemes could not be changed, specific schema with it's id &lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;works as version mark. It has strongly typed fields and it is rather comfortable to use it. Your task as a software developer is just to organize your code, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class=""&gt;encapsulate details and don't repeat yourself. Prohibition of scheme modification is good thing in my opinion.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 12:47:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/extensible-storage-best-practices-with-plug-in-development-amp/m-p/8050359#M49539</guid>
      <dc:creator>aignatovich</dc:creator>
      <dc:date>2018-06-06T12:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Extensible Storage - best practices with plug-in development &amp; growth</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/extensible-storage-best-practices-with-plug-in-development-amp/m-p/8052751#M49540</link>
      <description>&lt;P&gt;Not being able to modify schemas does become a problem as your add-in becomes more complicated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I store everything in map fields, like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;builder.AddMapField("strings", typeof(string), typeof(string));&lt;BR /&gt;builder.AddMapField("ints", typeof(string), typeof(int));&lt;BR /&gt;FieldBuilder field = builder.AddMapField("doubles", typeof(string), typeof(double));&lt;BR /&gt;field.SetUnitType(UnitType.UT_Custom);&lt;BR /&gt;builder.AddMapField("bools", typeof(string), typeof(bool));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These fields allow me to change what I am storing without modifying my scheme. The first value I always add is a version to the ints. When I get my entity from an element, if it's not there, I know I need to add it and do any initialization. If it is there, I check the version, and do whatever upgrades are necessary if it is not the most recent.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 09:49:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/extensible-storage-best-practices-with-plug-in-development-amp/m-p/8052751#M49540</guid>
      <dc:creator>David_Robison</dc:creator>
      <dc:date>2018-06-07T09:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Extensible Storage - best practices with plug-in development &amp; growth</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/extensible-storage-best-practices-with-plug-in-development-amp/m-p/8052804#M49541</link>
      <description>&lt;P&gt;It seems like having these four dictionaries (strings, bools, ints, doubles) should be enough to handle every possible data. If you need other types you can derive them from these four one way or another.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really like this idea, it's more generic from&amp;nbsp;aignatovich&lt;SPAN class=""&gt;'s yet still it enables version control.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Thanks for sharing David.Robison &amp;amp; aignatovich!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 10:23:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/extensible-storage-best-practices-with-plug-in-development-amp/m-p/8052804#M49541</guid>
      <dc:creator>adam.krug</dc:creator>
      <dc:date>2018-06-07T10:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Extensible Storage - best practices with plug-in development &amp; growth</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/extensible-storage-best-practices-with-plug-in-development-amp/m-p/12096724#M49542</link>
      <description>&lt;P&gt;Could you provide an example please, with versioning?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 13:54:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/extensible-storage-best-practices-with-plug-in-development-amp/m-p/12096724#M49542</guid>
      <dc:creator>a_minet</dc:creator>
      <dc:date>2023-07-12T13:54:33Z</dc:date>
    </item>
  </channel>
</rss>

