3 ms·
Xamarin appear to be pushing big time the cross platform abilities of C# now. It is possible to have your business logic shared between Windows desktop, WinRT,
by edandersen 14y ago
Xamarin appear to be pushing big time the cross platform abilities of C# now. It is possible to have your business logic shared between Windows desktop, WinRT, iOS, Android, web apps etc, with a thin native UI layer on top.
- shadowmint 14y agoYou need to add IF you're using visual studio to that sentence. This is currently not possible using mono develop; the portable library support doesn't exist, which means your 'shared' libraries can't do things like use sqlite or linq; in fact, they can't have references to anything other than other portable libraries at all. Like, for example, system.collections.generic.
- CodeCube 14y agoWhat!? this is entirely incorrect ... with MonoDevelop you can use the entire framework (linq, async/await, sqlite, entity framework, etc.). It's possible to build applications without using visual studio at all (minus winrt apps, you need VS for that).
- jmcqk6 14y agoI thought it was possible to do all of this without using visual studio - or any other IDE - with the possible exception of the WinRT app submission process. I know you're wrong about sqlite and linq as I've used them on both .net and mono. I think you're using the phrase "portable library" incorrectly. In the .net world, these are libraries created by microsoft that use the more limited version of the framework on their other platforms. For example, windows phone 7 and win rt use different portable libraries (a pain to manage, admittedly).
- shadowmint 14y agoI'm referring specifically to portable class libraries (PCL) (http://stackoverflow.com/questions/5238955/what-is-a-portable-class-library http://stackoverflow.com/questions/5238955/what-is-a-portabl...) that allow you to write code that is 'cross platform'. (ie. PCL --> One code base that compiles and runs on multiple c# runtimes; a key feature of writing cross platform c# applications) Support is currently limited, see: http://docs.xamarin.com/ios/tutorials/Cross_Platform/Building_Cross_Platform_Applications/Part_3_-_Setting_Up_A_Xamarin_Cross_Platform_Solution#Portable_Class_Libraries_(PCL) http://docs.xamarin.com/ios/tutorials/Cross_Platform/Buildin... Of course you can copy and paste your code into different projects manually, and compile it for a specific runtime. Or... you can use visual studio.
- migueldeicaza 14y agoIt is easy to be confused, because PCL is confusing. My personal preference is to just link source files and use partial classes (very much like the Linux kernel uses "pluggable" files to create a kernel) to create a product. The problem is that there is no "Portable Class Library", there are dozens of profiles, and you need to pick the subset you want, for example: "Desktop and Windows8" is a much larger profile than "XBox and Silverlight", the subsets are different. If you ignore Xbox and Silverlight, you pretty much have the whole stack everywhere.
- migueldeicaza 14y agoYou seem confused. Because I use LINQ and Sqlite on my shared code between Android and iOS. And you can even use Sqlite on Windows Phone (using Sqlite-cs) and Win8.