Top Menu
xamarin-pcl-vs-sap

Xamarin

Xamarin is a cross-platform development of the CLI and Common Language Specifications.

Developers can use Xamarin platform to develop native Android, iOS, and Windows apps with native UI and share code across all three platforms.

Development in Xamarin means making native apps in cross platform.

Native Means:

  • It’s more reliable and flexible.
  • Achieve native performance.

There are Two Approaches to Create Xamarin Cross-Platform Apps

  1. PCL (Portable Class Library)
  2. SAP (Shared Asset Project)

Both are shared codes between all platforms like Android, iOS, Windows but in different ways.

In PCL approach, common codes are bundled into dynamic link library that refer to each application projects and binds to at run time. In this approach code platform specific is written in platform specific project. The PCL project can be easily referenced to other projects in an application, or the output assembly can be shared for others to reference in their solutions.

In SAP approach the common code files are included with each of the application projects at build time. Initially, the SAP has only a single file. We can write all three platform codes in single file using some of C# directives like #if _IOS_, #if _ANDROID_, #if _WINDOWS_APP. In this approach code, all three platforms are at one place, so it is more productive and easy to maintain.

About The Author

Rakesh Kanani, working as a Senior Software Developer in Intransure Technologies. I am working in .Net technologies, Windows Services, JQuery, Angular 2.0, Ionic with expertise knowledge in developing Web development using MVC with C#. Also working experience with WhatsApp and YouTube API.

1 Comment

  1. Excellent goods from you, man. I have understand your stuff previous to and you’re just extremely fantastic.
    I actually like what you have acquired here, certainly like what you’re saying and the
    way in which you say it. You make it enjoyable and you still take care of to
    keep it sensible. I cant wait to read much more from you.
    This is really a great site.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Close