What is the difference between GetItems and GetExtendedItems in TFS SDK











up vote
0
down vote

favorite












I'm at my first tries with the TFS SDK (Microsoft.TeamFoundation.VersionControl.Client) and when came time to retrieve objects, I got confused on why and when I should use VersionControlServer.GetItems vs VersionControlServer.GetExtendedItems. What are the differences? Performance? Features?



Thank you! :)










share|improve this question




























    up vote
    0
    down vote

    favorite












    I'm at my first tries with the TFS SDK (Microsoft.TeamFoundation.VersionControl.Client) and when came time to retrieve objects, I got confused on why and when I should use VersionControlServer.GetItems vs VersionControlServer.GetExtendedItems. What are the differences? Performance? Features?



    Thank you! :)










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm at my first tries with the TFS SDK (Microsoft.TeamFoundation.VersionControl.Client) and when came time to retrieve objects, I got confused on why and when I should use VersionControlServer.GetItems vs VersionControlServer.GetExtendedItems. What are the differences? Performance? Features?



      Thank you! :)










      share|improve this question















      I'm at my first tries with the TFS SDK (Microsoft.TeamFoundation.VersionControl.Client) and when came time to retrieve objects, I got confused on why and when I should use VersionControlServer.GetItems vs VersionControlServer.GetExtendedItems. What are the differences? Performance? Features?



      Thank you! :)







      tfs tfs-sdk






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 7 at 18:27

























      asked Nov 7 at 18:18









      bkqc

      140113




      140113
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Yes, you have a tradeoff between performance and features. You can imagine that GetItems is a simple query, whereas GetExtendedItems is a join on another table (or tables), and less efficient.



          An Item, for example, contains information about an item at a particular version. An ExtendedItem adds in information about your version of that file as it exists in the workspace that you've specified in the query. If you have done a Get on that file then fields will be populated with the version that exists on your local disk and any pending changes that you've made on it.



          ExtendedItems largely exist for the Source Control Explorer view; it can display information about both the items on the server and their status in your local repository in a single query. This reduces the number of round-trips that view makes, but the ExtendedItems query is more expensive than a query for simple Items.



          If GetItems will give you the data that you need, you should prefer that. If not, use GetExtendedItems.






          share|improve this answer



















          • 1




            Thank you! Strangely, in my case, GetItems gave me what I wanted and GetExtendedItems did not since the ExtendedItem object did not offer the DownloadFile method.
            – bkqc
            Nov 7 at 22:05










          • Could you elaborate on what additional features GetExtendedItems would provide?
            – bkqc
            Nov 13 at 16:44










          • @bkqc It's basically the information about your local workspace version; I've updated the answer.
            – Edward Thomson
            Nov 13 at 17:21













          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53195464%2fwhat-is-the-difference-between-getitems-and-getextendeditems-in-tfs-sdk%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          Yes, you have a tradeoff between performance and features. You can imagine that GetItems is a simple query, whereas GetExtendedItems is a join on another table (or tables), and less efficient.



          An Item, for example, contains information about an item at a particular version. An ExtendedItem adds in information about your version of that file as it exists in the workspace that you've specified in the query. If you have done a Get on that file then fields will be populated with the version that exists on your local disk and any pending changes that you've made on it.



          ExtendedItems largely exist for the Source Control Explorer view; it can display information about both the items on the server and their status in your local repository in a single query. This reduces the number of round-trips that view makes, but the ExtendedItems query is more expensive than a query for simple Items.



          If GetItems will give you the data that you need, you should prefer that. If not, use GetExtendedItems.






          share|improve this answer



















          • 1




            Thank you! Strangely, in my case, GetItems gave me what I wanted and GetExtendedItems did not since the ExtendedItem object did not offer the DownloadFile method.
            – bkqc
            Nov 7 at 22:05










          • Could you elaborate on what additional features GetExtendedItems would provide?
            – bkqc
            Nov 13 at 16:44










          • @bkqc It's basically the information about your local workspace version; I've updated the answer.
            – Edward Thomson
            Nov 13 at 17:21

















          up vote
          0
          down vote













          Yes, you have a tradeoff between performance and features. You can imagine that GetItems is a simple query, whereas GetExtendedItems is a join on another table (or tables), and less efficient.



          An Item, for example, contains information about an item at a particular version. An ExtendedItem adds in information about your version of that file as it exists in the workspace that you've specified in the query. If you have done a Get on that file then fields will be populated with the version that exists on your local disk and any pending changes that you've made on it.



          ExtendedItems largely exist for the Source Control Explorer view; it can display information about both the items on the server and their status in your local repository in a single query. This reduces the number of round-trips that view makes, but the ExtendedItems query is more expensive than a query for simple Items.



          If GetItems will give you the data that you need, you should prefer that. If not, use GetExtendedItems.






          share|improve this answer



















          • 1




            Thank you! Strangely, in my case, GetItems gave me what I wanted and GetExtendedItems did not since the ExtendedItem object did not offer the DownloadFile method.
            – bkqc
            Nov 7 at 22:05










          • Could you elaborate on what additional features GetExtendedItems would provide?
            – bkqc
            Nov 13 at 16:44










          • @bkqc It's basically the information about your local workspace version; I've updated the answer.
            – Edward Thomson
            Nov 13 at 17:21















          up vote
          0
          down vote










          up vote
          0
          down vote









          Yes, you have a tradeoff between performance and features. You can imagine that GetItems is a simple query, whereas GetExtendedItems is a join on another table (or tables), and less efficient.



          An Item, for example, contains information about an item at a particular version. An ExtendedItem adds in information about your version of that file as it exists in the workspace that you've specified in the query. If you have done a Get on that file then fields will be populated with the version that exists on your local disk and any pending changes that you've made on it.



          ExtendedItems largely exist for the Source Control Explorer view; it can display information about both the items on the server and their status in your local repository in a single query. This reduces the number of round-trips that view makes, but the ExtendedItems query is more expensive than a query for simple Items.



          If GetItems will give you the data that you need, you should prefer that. If not, use GetExtendedItems.






          share|improve this answer














          Yes, you have a tradeoff between performance and features. You can imagine that GetItems is a simple query, whereas GetExtendedItems is a join on another table (or tables), and less efficient.



          An Item, for example, contains information about an item at a particular version. An ExtendedItem adds in information about your version of that file as it exists in the workspace that you've specified in the query. If you have done a Get on that file then fields will be populated with the version that exists on your local disk and any pending changes that you've made on it.



          ExtendedItems largely exist for the Source Control Explorer view; it can display information about both the items on the server and their status in your local repository in a single query. This reduces the number of round-trips that view makes, but the ExtendedItems query is more expensive than a query for simple Items.



          If GetItems will give you the data that you need, you should prefer that. If not, use GetExtendedItems.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 13 at 17:21

























          answered Nov 7 at 21:20









          Edward Thomson

          48.1k9101141




          48.1k9101141








          • 1




            Thank you! Strangely, in my case, GetItems gave me what I wanted and GetExtendedItems did not since the ExtendedItem object did not offer the DownloadFile method.
            – bkqc
            Nov 7 at 22:05










          • Could you elaborate on what additional features GetExtendedItems would provide?
            – bkqc
            Nov 13 at 16:44










          • @bkqc It's basically the information about your local workspace version; I've updated the answer.
            – Edward Thomson
            Nov 13 at 17:21
















          • 1




            Thank you! Strangely, in my case, GetItems gave me what I wanted and GetExtendedItems did not since the ExtendedItem object did not offer the DownloadFile method.
            – bkqc
            Nov 7 at 22:05










          • Could you elaborate on what additional features GetExtendedItems would provide?
            – bkqc
            Nov 13 at 16:44










          • @bkqc It's basically the information about your local workspace version; I've updated the answer.
            – Edward Thomson
            Nov 13 at 17:21










          1




          1




          Thank you! Strangely, in my case, GetItems gave me what I wanted and GetExtendedItems did not since the ExtendedItem object did not offer the DownloadFile method.
          – bkqc
          Nov 7 at 22:05




          Thank you! Strangely, in my case, GetItems gave me what I wanted and GetExtendedItems did not since the ExtendedItem object did not offer the DownloadFile method.
          – bkqc
          Nov 7 at 22:05












          Could you elaborate on what additional features GetExtendedItems would provide?
          – bkqc
          Nov 13 at 16:44




          Could you elaborate on what additional features GetExtendedItems would provide?
          – bkqc
          Nov 13 at 16:44












          @bkqc It's basically the information about your local workspace version; I've updated the answer.
          – Edward Thomson
          Nov 13 at 17:21






          @bkqc It's basically the information about your local workspace version; I've updated the answer.
          – Edward Thomson
          Nov 13 at 17:21




















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53195464%2fwhat-is-the-difference-between-getitems-and-getextendeditems-in-tfs-sdk%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          Hercules Kyvelos

          Tangent Lines Diagram Along Smooth Curve

          Yusuf al-Mu'taman ibn Hud