Difference between Class library and portable class library - asp.net-web-api

I want to build Web API project using with seperate Model class library. But I have confused about ClassLibrary and PortableClassLibrary. Which library is perfect for web api project.

Portable class libraries help you if you are developing cross platform apps / libraries. For an example if you are developing Windows Phone / Windows 8 / WPF / Silverlight apps and these apps consume data through Web API that you are developing right now, most probably you want to use same model classes you are having in your Web API project. In such scenario portable libraries will help you reduce the time and costs of developing and testing code.
But if you are developing your API for third parties that you are not aware of (do not have control over), or you want to consume these APIs from non .NET platforms (such as Web pages , android, iOS etc..) then you would not want your model library to be portable.
Follow this MSDN article for more details

Related

Xamarin Cross Platform Development .net

We are developing a cross platform mobile application using Xamarin. I have noticed there are different ways of structuring your code using Shared code or PCL/.net standard.
I attempted to use .net standard and what i have found is that it doesn't include all the libraries such as using ado stuff , datatable/datasets using system.data. Or using system.net for example. Other functions have less overloads and seems that its a stripped version of .net to work across platforms. Is there any way to add this functionality or use a broader range of .net?
You are correct - .Net Standard and .Net Core are stripped down versions of the full .Net framework. They contain only features that can be used on all platforms (Mac, Android, iOS, Linux, Windows, etc.)
The full .Net framework only needs to work on Windows, so there are additional things that you can do based on the fact that there is less complexity in implementing and that the code base is more mature (cross platform is still pretty new by C# standards). To the best of my memory, System.Net should work if you have your references correct, but System.Data will not (or at least direct database access is not possible)
You can regain some functionality through NuGet packages, but it won't be the same as using WinForms or something like that...
My best advice would be to program against an API. You can use a web server that runs on the normal (full) .Net framework, and does all the heavy lifting using all the .Net features that you are accustomed to. Your Xamarin app would send and receive data from the API and basically provide a mobile front end for whatever you are doing. This approach makes sense for most apps anyway, and is generally what you would be doing anyway if you used Swift and Java to create separate iOS and Android apps.

Creating Content Provider using Xamarin Platform

I am using Xamarin cross-platform for the development of an application. At this moment, my goal is to develop it for Android OS. But future goal also consists of using the same code(with some modifications) for Windows phone application.
I have to create a database and make it available to other applications. I am planning on using Content Provider(android specific) in my app. My question here is where do I write the code for Content Provider - android space or common code space ?
Should I use Shared Library or Portable Class Library for this type of development ?

Can Xamarin be used to produce a iOS, Android AND WEB app?

Xamarin is designed to create native iOS, Android, and Windows apps by coding it in C#. But can it also produce a web app?
If not, is there some solution that would enable us to do that?
You can write your backend code (services, data, domain, business logic, etc) in PCL libraries that can be shared between your Mobile apps and your website. But the web frontend would need to be written separately than the mobile front-ends.

How to communicate with SUP (Sybase Unwired Platform) MBO using kendo UI mobile?

Developing a hybrid application using Kendo UI mobile framework. My requirement is to communicate with SUP (Sybase Unwired Platform) MBO's. As i'm newbie, need someone's help who have implemented the hybrid application before using SUP. Please suggest me how to communicate and what are the process required.
SUP allows you to develop mobile application which are native and HWC, native applications are developed by using the object api generated from SUP, HWC on the other hand is The Hybrid Web Container is the runtime on the device within which Mobile Workflows (HTML UI) are executed.\
Mobile Workflow Forms editor is a Hybrid App Designer tool which allows you to create HTML screens in a graphical interface.
The Mobile Workflow Forms editor uses the Hybrid Web Container as the runtime for Mobile Workflow packages. The Mobile Workflow Forms Editor included with Sybase Unwired Platform is a tool that helps you design the user interface and test the flow of the business process for a mobile workflow application.
In SUP 2.2 provided capability to develop Hybrid Apps using third-party tools such as Sencha and Cordova (formerly PhoneGap). SUP 2.2 allows you to generate Hybrid api and you can use any html framework to create SUP apps which will run inside the HWC container in the mobile devices.
For your question regarding the third party framework (like Kendo UI). If the framework does support oData, then you can take the approach of using the oData Native API that SUP or SMP provides.

Appcelerator Titanium Developer with Java?

i just downloaded Appcelerator Titanium and experimenting with it, I selected Desktop application and to support python,PHP and Ruby but I can't find Java. how to really work with java. I just need a hint about how to get my java code working there, where to put my java files and where should I include them.
Appcelerator Titanium does not support java .. well not directly
But take a look at these URLs for some possible options in writing java code
that indirectly uses titanium ..
As usual, the mileage obtained from adding a new layer of code would depend on how
well one understands the core architecture of how all the bits plug together .. :
https://github.com/emitrom/titanium4j
http://www.learningtitanium.com/software/gwt4titanium/javas-write-once-run-anywhere-for-titanium.html
As Emitron writes:
Titanium4j(Ti4j) is a Java application framework designed for creating rich
and interactive native applications for mobile and desktop.
The mobile package inside Ti4j leverages Appcelerator Titanium Mobile
to create native mobile applications.
The desktop package inside Ti4j leverages The TideSDK to create native desktop
applications.
Titanium4j takes the underlying frameworks to another level by making you avoid
JavaScript and puting all Java libraries and tools are at your disposal
You will have to decide whether the above justifies learning this extra functionality .. I reckon it does justify it

Resources