De-Serializing Data with android? [duplicate] - c#

This question already has answers here:
Strategy for cross-language (java and c#) object serialization
(9 answers)
Closed 9 years ago.
I am a .Net developer who looks a bit at android (using Android Studio). For my Android App I wrote some additional Tools (.NET/Windows) that allow me to save Data in XML-files which contain complex serialized objects created by standard Framework-Methods.
Can I read serialized objects created by the .NET-Framework directly into Android applications? If not: Is there any workaround to "convert" these files?

There are many ways to do this. A schema may help, depending on approach. One quick/simple way to make POJO from XML on android is to use the simple framework. It takes some extra time to create the class with right extra decoration, then framework will push/pull XML to POJO. Other ways are to use other 3rd party tools to take the XML (or schema) to generate the java classes and what not, but the overhead of deserialization and/or Android availability of the JARs etc may be a headache. That's why/how I ended up using the simple framework.

Related

Monitoring of .net applications at runtime [duplicate]

This question already has answers here:
What Are Some Good .NET Profilers?
(30 answers)
Closed 4 years ago.
There is a system composed of an ASP.NET web application, .NET windows services and shared .NET libraries. It has large number of classes, each containing multiple methods.
How to conveniently collect runtime data about execution of methods without having to modify each single class and method? The goal is to register execution of all the methods that are part of the system (except .NET Framework classes). The purpose of collecting this data is to learn what features of the system are never used by the users. We already performed static code analysis as well as eliminated pages that were never displayed based on IIS logs.
You could use post-compilation tools to instrument your code with the necessary logging mechanisms in order to collect necessary data. There are existing tools that you could use such as PostSharp or Fody.Tracer.
Alternatively, if those tools are for some reason not the exact what you need, you could write your own post-compilation weaver. This can be done by using Mono.Cecil library. With this library you would be able to take your compiled assemblies, instrument them with the logging code only in places you think is necessary and then collect and analyse the logs.

Is Microsoft Store the only way to distribute a self-contained UWP application? [duplicate]

This question already has answers here:
Preferred way to deliver UWP app without Windows Store
(2 answers)
Distributing private win app in UWP
(2 answers)
Closed 4 years ago.
I've been trying to dig around a simple way to distribute this simple application I've created. I want things simple: a simple self-contained installer. Not to say that it cannot be put on the MS-Store, but I want alternative ways to distribute it simply to my clients.
I've create a package, but you need to enable the developers options to run it elsewhere.... And all the other solutions are either VERY costly or require a 3 year degree to understand them. And of course, the documentation on the internet is dominated by Microsoft who push their own solution, i.e. the Store.
I would be grateful if anyone could point me in the right direction please.

C# and .NET frameworki a [duplicate]

This question already has answers here:
How do I move from Java to C#?
(9 answers)
Closed 5 years ago.
I am going to start work with a company that works on a .NET framework and i am a professional java developer and i think i should switch to .NET because i cant see any bright future with java anymore.
My questions:
Now i have decided to move to .NET, what things i should learn as a total beginner. Should i learn C# or i should understand basics of .NET first?? as i know only that .Net is a framework and c# is one of language run on it. I am only interested in C# as it like java not in VB or any other.
please tell me what i am suppose to learn and please refer to me some books.
thanks
You are correct in your understanding that .Net is the underlying portable framework which is supported via multiple languages such as C#,VB etc. If you are looking for a Java equivalent in terms of programming language then C# is exactly what you want to be working with.
One of the best books for C# out there is C# via CLR that teaches you C# with an understanding of the underlying CLR. It is more of an intermediate-advanced proficiency book but the basics should be easy to latch on to given your Java background.

convert c# to pure java? [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
is there an effective tool to convert c# to java?
I'm not very experienced with Java and have a lot of C# that I would like to translate into Java syntax so it would become compilable.
Reason: Android and Google Cloud
I know the API/Platforms have different structures, but lets say we dont need a 100% compability, but just to get "core functionalitet" translated. The GUI itself is one story of its own, as I've learned. But instead of rewriting every SWITCH-CASE, rebuild every Class etc. it would be nice to "map" the objects to Java equals and then do a recompile on the Android/Google platform.
I am sure there would be something that cant be translated as its a "C# only thing" - but just like every language is possible to generate .NET/MONO I thought there might be a Java -> .Net available too and therefore also a decompiler kinda thing?
So are there any easy ways to overcome this translation by Frameworks, SDK or other similar methods that will take 80-95% of the task automatically?
Have a look here: JSC.
But beside, there are some c# concepts which don't easyli translate into java.
.NET and Mono are compatible because both are VMs that run C# code. Grasshopper claims to allow you to run .NET classes on the JVM, but I haven't used it. It won't work at all for Android because Android isn't the JVM, but rather Dalvik.
The differences between C# and Java are more than "structural" as you put it, and translating from one language to another is more complicated than I think you understand.
I know Microsoft has a tool that's supposed to help convert Java to C#, but considering that a great many java applications reference libraries outside of the main system (apache being the most prominent example) this type of tool would be a monumental task.
C# also has data types that aren't supported at all in Java, such as unsigned types and stack-allocated objects. Writing translations from CLR to Java bytecode would be difficult indeed. And if you're using lambda functions in your code, kiss this idea goodbye.
Then there's the fact that not all language features in Java are available to the Davlik JVM.
I'm not a microsoft fanboy, but here's a comparison of the two languages that will give you an idea why I doubt this tool exists.
http://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Java

map and shared_ptr serialization between C# and C++ applications? [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Binary serialization/de-serialization in C++ and C#
I am working on a project where server is written in C++ (boost is extensively used) and the client application is written in C#. I am facing the problem while serializing/deserializing messages between client/server.
I have studied various alternative libraries for achieving this sort of cross-platform serialization, and Protocol Buffers seems to be the best... but it does not support serialization of the standard library's map container and boost::shared_ptr.
My question then, is:
Can someone explain how map and boost::shared_ptr could be serialized using Protocol Buffers. Or failing that,
Would Apache's Thrift work for this?
...Or am I stuck using interop DLLs on the (C#) client side?
What about wrapping the c++ message classes with c++/cli ref classes so that you use the same boost serialisation library on the client side.

Categories