Xamarin & MySQL #375
Replies: 5 comments 2 replies
-
What you should rather do is use SQLite on the phone/ Xamarin target and
must behind the a webservice. I do that with my own syncing system I built
and it works perfectly
On Sun, 13 Dec 2020 at 03:12, Everett Wolf ***@***.***> wrote:
Firstly, this is an amazing project! Been playing with it all day.
However, was looking for an out-of-the-box sync solution for my Xamarin
project and it appears that I have just the right combo of things that
makes it not compatible (albeit close!):
Xamarin
MySql
Dotmim
--
Thanks,
Matthew Joughin
Founder / CTO
+27 81 529 7169
http://www.adaptableapps.net
|
Beta Was this translation helpful? Give feedback.
-
Hey @everettwolf , Indeed, Xamarin is not working with MySqlConnector. I guess, in my point of view, when you're making a Xamarin application, it's mainly because you are creating a mobile application. But, it's true to say, that we can create a desktop application, using Xamarin. "Are you creating a mobile application or a Desktop application, using Xamarin" ? Depending on your answer, we should be able to find a better solution on your problem, I guess. Meanwhile, I take a look at the last version of |
Beta Was this translation helpful? Give feedback.
-
I understand but it’s still bad practice to connect to an external database
from a mobile application, and a massive security risk having said database
open to the internet.
Are you aware that asp.net core is cross platform and therefore runs on
Linux?
If that was your reason for using Java .net has that covered and covered
very well.
I run all my asp.net core services on Linux using AWS Lambda, which saves a
fortune in costs and add’s in pretty much infinite scaling which is amazing
Plus being able to share code between the backend and front end is
priceless.
I am actually releasing a low-code framework very soon that does just that
and makes it much quicker to get out an application running on asp.net core
on the backend and Xamarin front end and everything syncing seamlessly
between
…--
Thanks,
Matthew Joughin
Founder / CTO
+27 81 529 7169
http://www.adaptableapps.net
|
Beta Was this translation helpful? Give feedback.
-
Sorry to be clear: my syncing code in my low code framework does not come
from this repo at all - I created it 2 years ago
Thanks,
Matthew Joughin
Founder / CTO
+27 81 529 7169
http://www.adaptableapps.net
|
Beta Was this translation helpful? Give feedback.
-
Thanks, you make some great points!
Reason for Java: my teammates have never done .NET, and see it as an unnecessary hurdle to learn for the time crunch we’re under. But I could probably convince them otherwise (since it really isn’t). It’s hosted in AWS as well, so it’s not a Linux concern.
Our MySQL is also hosted in AWS, so in mulling over hitting it directly, I read a bit of the docs regarding proxying through an EC2 instance, but that likely works better when it’s backend <-> dbase (so all within the VPC), rather than World -> EC2 <-> dbase. I’m no DevOps guru though, so I should probably steer clear.
Reason for MySQL: flip of a coin. :-)
Funny anecdote, to your point: when hooking up my local Java instance to AWS/MySQL for local development, I briefly turned off their whitelisting protocol, and forgot to turn it back on when I got things going. Remembered the next day, and looked at the access logs. Lots of IP hits. ;-) Ran a bunch through an IP analyzer (who knows how accurate it was) and it was a bunch of “Russian IP Addresses”. I’m in the US, and so is my cloud instance. :-)
I’m going to keep an eye out for your new framework, and, again, thanks for all the info!
… On Dec 13, 2020, at 10:48 AM, Matthew Joughin ***@***.***> wrote:
I understand but it’s still bad practice to connect to an external database
from a mobile application, and a massive security risk having said database
open to the internet.
Are you aware that asp.net core is cross platform and therefore runs on
Linux?
If that was your reason for using Java .net has that covered and covered
very well.
I run all my asp.net core services on Linux using AWS Lambda, which saves a
fortune in costs and add’s in pretty much infinite scaling which is amazing
Plus being able to share code between the backend and front end is
priceless.
I am actually releasing a low-code framework very soon that does just that
and makes it much quicker to get out an application running on asp.net core
on the backend and Xamarin front end and everything syncing seamlessly
between
On Sun, 13 Dec 2020 at 19:09, Everett Wolf ***@***.***> wrote:
> Hey, thanks @mrwcjoughin <https://github.com/mrwcjoughin> & @Mimetis
> <https://github.com/Mimetis>
> @Mimetis <https://github.com/Mimetis>, yes, it's a mobile application.
> I started working on the sync with my web service, stopped myself and said
> "hmmm, surely there's a package out there that does this already." ;o)
>
> After searching around, Dotmim seemed like the best solution.
>
> My web service is written in Java, and it's pretty far along with other
> things the app uses it for, so I'm loathe to either switch it to ASP.NET
> or introduce another web service for my mobile app to hit just for syncing.
> So, when I saw the pure front-end implementation you guys have I started
> looking at it ("violating" the "shouldn't connect directly to database from
> mobile" trope seemed acceptable for my situation (which is to get it out as
> quickly as possible, then refactor things later)).
>
> So, I think what I'll do is roll my own, but shamelessly look at your
> source code to get any guidance I might need. ;o)
>
> Unless you guys can think of a way to get Dotmim into the Xamarin/Java
> WebService paradigm I have going.
>
> Thanks for the quick responses; much appreciated.
>
> —
> You are receiving this because you were mentioned.
>
>
> Reply to this email directly, view it on GitHub
> <#375 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACOGERRIABZ3PW3HCCBLJD3SUTYNLANCNFSM4UZPNSOQ>
> .
>
--
Thanks,
Matthew Joughin
Founder / CTO
+27 81 529 7169
http://www.adaptableapps.net
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
Firstly, this is an amazing project! Been playing with it all day.
However, was looking for an out-of-the-box sync solution for my Xamarin project and it appears that I have just the right combo of things that makes it not compatible (albeit close!):
Xamarin
MySql
Dotmim
Looks as if the latest Dotmim.Sync.MySql nuget package (0.5.8-beta) uses MySqlConnector version 0.63.0, which is incompatible with Xamarin. When I tried overriding MySqlConnector with a more recent version, at 1.2.1, anything after 1.0 doesn't work with Dotmim.Sync.MySql (the error is: Error CS7069: Reference to type 'MySqlConnectionStringBuilder' claims it is defined in 'MySqlConnector', but it could not be found (CS7069) (datasync))
I BELIEVE Xamarin has solved its MySqlConnector issues with the updated package, so updating the package on your side and fixing the problem would likely work, but it may be a case where -- to get DotMim to work with Xamarin/MySql -- you'd have to switch to MySql.Data, not sure.
I think the issue is that Dotmim is trying to open MySql asynchronously, which doesn't work with Xamarin.
I could get the project running in .Net/Mysql/Dotmim without any problem, it was just taking that and trying to transfer it into my Xamarin project where I ran into the issue.
In doing some research, I'm finding quite a few people saying that connecting to a remote database directly (without going through a webservice) from a mobile app is a huge no-no, so maybe it's better off, but I'd like to get something going quickly for the prototype I'm working on, then really delving in to see if that's true (if the code is done properly).
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions