CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Forum has moved

New location: CSLA .NET forum


CSLA .NET Resources:
  • CSLA .NET forum
  • CSLA .NET home page
  • CSLA PCL

    rated by 0 users
    Answered (Not Verified) This post has 0 verified answers | 5 Replies | 2 Followers

    Not Ranked
    2 Posts
    Shritama posted on Tue, Mar 24 2015 1:42 AM

    Hi,

    I am building a Xamarin.forms apps using PCL. I would like to know when to expect the CSLA Universal PCL that can be used across all apps and Web.

    Thanks

    S

     

    All Replies

    Top 10 Contributor
    4,106 Posts
    Andy replied on Tue, Mar 24 2015 4:35 PM

    You should be able to use Csla now without PCL for all apps and web.  What you wouldn't be able to do is reference Csla from other PCL libraries (PCLs may only reference other PCLs).  I'm curious what requirement you have that necessitates PCL.

    Top 10 Contributor
    2,279 Posts
    JonnyBee replied on Wed, Mar 25 2015 10:03 AM

    Hi,

    There is PCL libraries in CSLA-Core Nuget package. 

    The wpa (Windows Phone AppX) is a Universal PCL library that target Windows Phone 8.1

     

     

     

    Jonny Bekkum, Norway CslaContrib Coordinator

    Not Ranked
    2 Posts

    Hi,

    Here my scenario is we have a WPF application. We are taking the Business Objects from there from the WPF app. Now in Xamarin forms we have a PCL which we are using as shared. Android, IOS and Web application will be referencing to that. So all the view models will be shared across the applications only separate view is required.

    Thanks,

    Shri

     

    Top 10 Contributor
    4,106 Posts
    Andy replied on Wed, Mar 25 2015 6:39 PM

    Shritama:
    Here my scenario is we have a WPF application. We are taking the Business Objects from there from the WPF app. Now in Xamarin forms we have a PCL which we are using as shared. Android, IOS and Web application will be referencing to that. So all the view models will be shared across the applications only separate view is required.

    Sounds like there is a PCL version now, but you could also create a VS Shared Project type project to accomplish pretty much the same thing.  this extension adds support for it https://visualstudiogallery.msdn.microsoft.com/315c13a7-2787-4f57-bdf7-adae6ed54450

    Top 10 Contributor
    9,475 Posts
    Suggested by Andy

    I've discussed the pros and cons of a PCL before, and it isn't an easy tradeoff.

    Because CSLA contains optimized code for some of the platforms (most notably full .NET vs some of the other platforms), and a PCL allows you exactly one implementation, if I created a PCL version of CSLA it would have to only use the non-optimized code - that is only code that runs everywhere, and not optimized for full .NET (like on a server).

    Alternately I could create a PCL that is a shell, and the PCL would delegate all calls to platform-specific assemblies. This would work only for people using NuGet, or people who were up for creating their own pre-build scripts in VS and deployment scripts to ensure the appropriate satellite assemblies for each platform were deployed as necessary.

    None of this is to say that I _won't_ create a PCL at some point - just that it won't be a panacea, and there'll still be very good reasons to use a platform-native implementation instead. Especially on servers where the full .NET optimizations would make the biggest difference.

    Rocky

    Page 1 of 1 (6 items) | RSS

    Copyright (c) 2006-2014 Marimer LLC. All rights reserved.
    Email admin@lhotka.net for support.
    Powered by Community Server (Non-Commercial Edition), by Telligent Systems