<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:38:54 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CSHARP-1185] A PCL (or Portable Profile) version of MongoDB.Bson</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1185</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Hi, &lt;/p&gt;

&lt;p&gt;I was wondering, if a portable profile would be on the cards, and if pull requests would be accepted regarding the same.&lt;/p&gt;

&lt;p&gt;I ran through a quick test for portability, currently only MongoDB.Bson of the latest 2.0.0-beta, and found while, not non-trivial, could be quite comfortably made compatible with Win/WP8.1, Xamarin.IOS and Xamarin.Android. &lt;/p&gt;

&lt;p&gt;If this is a possible future, then perhaps, a checklist could be started here, for the same. &lt;/p&gt;

&lt;p&gt;Things to be done: &lt;/p&gt;

&lt;p&gt;1. Change ConcurrentDictionary, and ConcurrentStack with portable implementations (Preferably, from immutable collections) . &lt;br/&gt;
2. Some of the IdGenerators have to be adapted. (Eg: AscendingGuidGenerator - ProcessId implementations)&lt;br/&gt;
3. IO classes use Serializable Attribute, which is not available. Any practical issues of not using them? &lt;br/&gt;
4. Same as 3, for Exceptions&lt;br/&gt;
5. Some implementations will have to be moved to a separate, platform specific library, say classes that use IPAddress.&lt;/p&gt;

&lt;p&gt;Would like to hear if this a feasible path. Cheers! &lt;/p&gt;</description>
                <environment></environment>
        <key id="186295">CSHARP-1185</key>
            <summary>A PCL (or Portable Profile) version of MongoDB.Bson</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="12300">Won&apos;t Do</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="prasannavl">Prasanna V. Loganathar</reporter>
                        <labels>
                    </labels>
                <created>Thu, 26 Feb 2015 01:59:04 +0000</created>
                <updated>Thu, 3 Dec 2020 16:59:31 +0000</updated>
                            <resolved>Thu, 3 Dec 2020 16:59:31 +0000</resolved>
                                                                    <component>BSON</component>
                                        <votes>1</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="3514584" author="jeff.yemin" created="Thu, 3 Dec 2020 16:59:31 +0000"  >&lt;p&gt;Closing based on Robert&apos;s last comment.&lt;/p&gt;</comment>
                            <comment id="1464271" author="rstam" created="Thu, 22 Dec 2016 19:14:14 +0000"  >&lt;p&gt;I think the need for this has gone away with the introduction of driver support for .NET Core, or more precisely, for any platform that supports netstandard1.5.&lt;/p&gt;</comment>
                            <comment id="1199832" author="krisloekkegaard@gmail.com" created="Thu, 10 Mar 2016 23:41:01 +0000"  >&lt;p&gt;I am happy to have found that I can achieve what I want with the BsonClassMap instead, thereby avoiding the need to decorate the data classes directly with BSON attributes. I still think it would be nice to have that option in a PCL though, but having the alternative approach available makes it a much lower priority for me.&lt;/p&gt;</comment>
                            <comment id="1199546" author="krisloekkegaard@gmail.com" created="Thu, 10 Mar 2016 20:02:09 +0000"  >&lt;p&gt;This still seems relevant to me. I have a C# project which contains my data layer &amp;#8211; all the domain objects (or entities / POCOs), which will be passed around and used throughout my application, and some of which will also be stored in a database. I have another project in the same solution, which uses Xamarin and references the data layer. Therefore, the data layer project has to be a PCL. I am using MongoDB to store the data on the server side, but because I cannot add the MongoDB.Bson package to the PCL project, I am currently unable to manipulate the way my objects are represented in the database using BSON attributes (e.g. BsonId, BsonRepresentation etc.).&lt;/p&gt;

&lt;p&gt;Of course I could write the data layer twice in two separate projects. One for the server side, where I can have the full control over how data is represented in the database using the BSON attributes, and another for the client side, where all the objects would be almost identical, except they are in a PCL project and the BSON attributes are left out. However, that is a lot of code duplication, and ongoing work to keep everything in sync as things change, which I would like to avoid.&lt;/p&gt;

&lt;p&gt;Alternative suggestions are very welcome, e.g. if you see another way I could / should be designing and doing this. Otherwise, what is the outlook of getting a PCL version of MongoDB.Bson?&lt;/p&gt;</comment>
                            <comment id="837688" author="prasannavl" created="Thu, 26 Feb 2015 03:07:11 +0000"  >&lt;p&gt;CoreCLR definitely seems like the best-fit road-map. My target was in-fact to figure out if it was feasible to get the serialization library working on mobile devices. Its is a great serialization library - kudos to the team!, and was experimenting if we could BSON for local persistence layers, so we could have a more unified data models both on the server, and across consumer devices. But if targeted for the CoreCLR, should open up most of code to be shared, since Microsoft&apos;s strategy is to have the Store Model sitting atop the CoreCLR, and the Xamarin story, should &apos;almost&apos; automatically be in order with the exception of a few rough edges as long as anything to do with the DLR is tucked away.&lt;/p&gt;

&lt;p&gt;Alright, please close this issue, or perhaps change the titles to CoreCLR, as you see fit. Let me try to map out the spectrum next week, that overlaps with getting the serialization libraries running on the WinRT, and the CoreCLR work required. Thanks for the insight on your next step. Would make sense for me to contribute alongside, if the overlap area looks non-intrusive with your next step. &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;PVL&lt;/p&gt;</comment>
                            <comment id="837669" author="craiggwilson" created="Thu, 26 Feb 2015 02:18:13 +0000"  >&lt;p&gt;Hi Prasanna,&lt;/p&gt;

&lt;p&gt;We certainly aren&apos;t opposed to this happening, but don&apos;t have a good use case, at least for the driver. Talking directly to a database from a mobile application is generally not advisable. Our next step was to work on Core CLR compatibility, which will be more important than PCL for most users.&lt;/p&gt;

&lt;p&gt;Perhaps you could share some reasons and use cases where PCL support would be important?&lt;/p&gt;

&lt;p&gt;Craig&lt;/p&gt;
</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hs6mmf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>164031</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>