.NET Development
Xamarim App with SQL
Gravatar is a globally recognized avatar based on your email address. Xamarim App with SQL
  Bill Plander
  All
  Feb 23, 2017 @ 12:22pm

Hi All and Rick,

I am about to take my first crack at Xamarin. It will start off as simple drill-down CRUD App calling to a Windows Server / SQL Server.

Question:

To avoid countless hours of testing and research, which is really the best method of passing data? (Rest, ASMX, WCF, etc..)

Rick, we still have that old SQL/Web Server (wwWebSQLServer) running at FULL crank. Maybe it would be better idea to build a .Net wrapper for it instead? It would be great not to have to add anything to the Server.

Thanks in advance, Bill

Gravatar is a globally recognized avatar based on your email address. re: Xamarim App with SQL
  Rick Strahl
  Bill Plander
  Feb 23, 2017 @ 05:07pm

It's funny I was looking at the old wwWebSqlServer just the other day for another customer who needed to get distributed data online for a mobile app. Isn't the version I built for you running .NET? That service already supports JSON (or maybe I added this later).

REST is easiest and most efficient - no overhead of SOAP processing and libraries. Xamarin doesn't include the same WCF/Old WSDL client tools directly - you have to generate proxies manually and maintain them that way. Doable but not idea. I'd go with REST and just do the JSON parsing via helpers and a client wrapper for the service.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Xamarim App with SQL
  Bill Plander
  Rick Strahl
  Feb 24, 2017 @ 08:41am

Hi Rick,

Yes, I forgot, we did add JSON! (It was for those Debit Card guys, but that whole Industry soon after went down in flames taking our project with it. haha) However, I can't find the source anywhere.

So, I'm thinking, JSON wwWebSQLServer server side with JSON.Net / JSON2CSharp using POCO client side should be a good simple option?

I also have an old Silverlight app (RIA nightmare from hell) that I would like to revert back to WinForms could also use this schema.

thanks Bill

Gravatar is a globally recognized avatar based on your email address. re: Xamarim App with SQL
  Rick Strahl
  Bill Plander
  Feb 24, 2017 @ 02:31pm

I like to create service client wrappers that simplify the HTTP calls and error checking that the client makes. It's not a ton of stuff but it's repetive and creating a client class with a few helpers for http configuration and get and send operations makes life a lot easier.

I tend to use my Westwind.Utilities.HttpUtils for this which makes short work of the serialization tasks.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Xamarim App with SQL
  Bill Plander
  Rick Strahl
  Feb 25, 2017 @ 10:26am

Hi Rick,

Do you have a newer version of wwWebSQLServer with JSON? I've looked everywhere and no luck.

HTTPUtils definitely looks like a useful tool. I'm going to look into the rest of your stuff to see what else can simplify this task.

I want to get the Data Access side down pat before I even begin to write the APP.

thanks Bill

Gravatar is a globally recognized avatar based on your email address. re: Xamarim App with SQL
  Rick Strahl
  Bill Plander
  Feb 25, 2017 @ 12:35pm

Just keep in mind that these libs won't work on Xamarin as is. They might compile for it but don't know if they work as is.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Xamarim App with SQL
  Rick Strahl
  Bill Plander
  Feb 25, 2017 @ 12:39pm

Do you have a newer version of wwWebSQLServer with JSON? I've looked everywhere and no luck.

Yup, but it probably needs a once over since that code is pretty ancient. The JSON support built in then was very rudimentary.

If I recall I built the server for you, then customized it after the fact to be more generically applicable. Never did anything with it other than use it in a few projects where customers needed a quick way to get distributed server access to their data. I have a FoxPro and .NET client that can use the data directly with DAL classes, but it's all pretty hazy since that was so long ago.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Xamarim App with SQL
  Bill Plander
  Rick Strahl
  Feb 26, 2017 @ 11:17am

Hi Rick,

I'll take anything you got (beggars can't be choosy). Probably have to customize it away. I know for one is to add the ability to fire a Stored Procedure multiple times in the same request based on multiple sets of parameters.

I am surprised that WebSQL isn't more popular. It's such a no-brainer to use and better solution than having to secure database connections all over the place.

BTW Your Markdown Monster looks really slick. Too bad I don't have much use for it. What I need is a XAML Monster! haha

Thanks Bill

© 1996-2017