VB.Net Silverlight project and MySQL - mysql

I am an experienced web programmer that has sadly had little experience with Web Services and technologies like Silverlight - I've done a lot of PHP, Javascript, CSS and MySQL. I recently have been assigned to learn Silverlight and connect a new app to a MySQL database. After a full week of trying to get this working, I'm really hoping someone can answer these questions:
I have found the MySQL .NET Connector - am I correct that this is not compatible with Silverlight and I do not need it?
I understand I must use a Web Service for this. Can I use WCF or WCF RIA, or am I best using a more traditional web service method like REST or SOAP?
What's the best web service method for many quick queries (such as updating a search as the user types in the keywords)
Do I have to use technology like LINQ, Entity SQL, ADO.NET Framework, or a stored procedure? Is one of these the best way to do it or should I just skip them all and create a simple web service?
What's the best source to learn how to do specifically Silverlight VB.NET and MySQL and learn to do it the best way as explained above. Everything I've found (books and websites) seems to be in C#, not a Silverlight product, or just uses built in SQL Server support. Very frustrating!
For our web app, we need to be able to give the buyer not just access to our client side application via a browser but also the server side so they can OPTIONALLY host the entire product themselves. We're hoping to have one installer for them on their server (so they wouldn't have to set up php or mysql to host the product for example). If I use a VB.NET website and web service, will that deploy as just an exe or dll so the user won't have to install anything special? Is installing mysql on their servers unavoidable? Please advise.
Thank you!

Wow, lots of questions in a single question.
You can't use this from Silverlight.
WCF and WCF RIA are both technologies while SOAP and REST are protocols that are both supported by WCF. So yes.
Quick queries require good code and a well tuned database, the protocol won't be an issue.
LINQ, Entity SQL, and ADO.Net are all database access technologies and have nothing to do with web services. You'll need to build a web service and then connect it to a database using some database access technology. Which one you use depends on what backend you have.
C# is much more common. Most of the MSDN content has VB.Net as well. MySQL isn't an MS technology. You can use MySQL with Entity Framework and then expose that using WCF RIA Services.
If you use VB.Net as the server side technology they will need to be running Windows with IIS and have .NET installed. They will also have to install MySQL if they want to host it.

Related

Building a Xamarin Forms App using MySQL

I would like to build a mobile version of a household financial planner web app that I built with MVC, C#, MS SQL, and Entity Framework. What I've learned from my research is that I should communicate with the database for this project using API endpoints. I am familiar with setting up a WebAPI with MS SQL, but not MySQL. Also, the little work that I have done in that field was based on only retrieving information from the database. Not adding application users, roles, or any rows to tables. The web application that I'm trying to base this Xamarin application is at http://abacus.travismcdaniel.me
I have been unable to find a guide our tutorial that teaches what I need to know. In fact, most of the guides I've found are so outdated that I can't follow the steps because the things they say to do simply don't exist anymore.
So my question is this: It's there a n up-to-date guide anywhere that can walk me through the basics of setting up a MySQL database to use with the app that I'm building, then walk me through writing stored procedures, seeing up WebAPI endpoints for those stored procedures, and then incorporating all of that into a Xamarin Forms application?
If there isn't one single guide that does this, are there a few (still up-to-date) that I can work through to get the same information? Thank you in advance.

Support for MS Access

I am creating a web interface for an old piece of software running on an Access 2000 DB. There is no support for the Entity Framework Model for Access. Is there a way of making a connection to work with breeze?
Try to use Ado.net, there is no support from breeze to Access
http://www.c-sharpcorner.com/uploadfile/mimrantaj/connect-to-access-database-in-C-Sharp-and-ado-net/
I like your idea of putting EF in front of SQL Server express. But if that doesn't work out, your only serious impediment is finding a way to expose access to your Access (chuckle) over HTTP.
Have you got that figured out? Maybe Web API? Because once you figure that out, it will be "easy".
You do NOT need EF for Breeze clients. EF is a convenient technology for many .NET developers ... but not everyone. All Breeze really cares about is the data.
You will need to get some some metadata describing your service model (meaning whatever you expose as client-facing objects in your HTTP service). You can produce that in many ways. EF is one way (it's easy) but you can also do it in JavaScript.

Develop an iOS App that gets contents from a remote DB

I am developing an education app for Kids.
The application is going to contain pictures, stories and video as well.
Including all above contents in the app will surely bloat it and hence i would like store all data on a server that will be accessed by my app.
I haven't used any remote databases (like MySQL or Oracle) with any other iOS app. In fact i am a newbie in developing such kind of apps. Can any one point me to a sample
Connecting to a remote mysql is really not recommended.
The security here is critical.
You should create a webservice and my advice to you is to make sure that the access to the webservice is restricted
The webservice can be your own "protocol" or any other well known protocol like SOAP
By your own I mean, json, csv .... or whatever.
Edit 1
The technology of your webservice should be dependent on many things.
If the system is small, and the code needs to be update very often, I would suggest to do it with PHP and some small(!) MVC framework like CI.
But if its a large system with needs of ACL (access control list) I will probably choose java with spring...
I suggest that : Do not connect to / use database directly from user application. It may causes serious security problems and your app should have native SQL drivers to connect db.
So, create a web service that receive queries from the application and response in XML, JSON or some other strings that easy to parse. This will be much easier than embed native APIs into your apps.

WCF: Best way to get data from Oracle 10g, MySQL and SQL Server 2008 databases?

I am designing a simple C# WCF service using ASP.NET 4.0 and hosted on IIS7, which will be used by .NET and Java web applications and desktop applications to extract data stored in various databases (both local and remote). I am starting to learn how to use VS2010 and WCF after working for a few years on VS2005 and asp.net web services, so am somewhat of a noob to WCF but know a bit about web services and Visual Studio.
Does anyone have opinions on what the best approach would be in terms of project/class/file setup in Visual Studio 2010 to do this, seeing as how I want to maximize code re-use and minimize development time yet still have the ability to connect to the different databases? I have a WCF Service Application project for the service, and have generated a WCF Client to use for testing using svcutil.exe, but now I'm at the point where I need to start writing database access layer code (or "model" code for MVC if that's the design route I need to go down).
Any help appreciated, thanks!
Each of the databases will have their set of nuisances while integration. The first thing you need to start with would be to design your model in more of OO (Object Oriented) fashion than relation DB way. Once such a model is created, you need to implement mapper layer/classes that would map data from a relational form to a OO format. Then for each DB you need to write some data access code. The amount of code you write for data access may well depend upon the tools\technologies you use. You could look into Entity Framework or NHibernate or other such ORMs to decrease the code required to access data. But keep in mind these ORM mappers may require their own set of tweaks to work well with MySQL, Oracle, SQL Server.

Accessing mysql from Adobe flex/AIR

Is it possible to directly access MySql databases through an Adobe AIR/Flex
application?
If not, what is the next best alternative?
I'd have to disagree (though respectfully!) with Abdullah that building an ODBC client into AIR would "cause wierd problems and open up security issues" -- that's often how it's done (e.g., Java and .NET, both of whose runtimes package various ODBC clients) -- but both posters are right: the only way's coding some sort of a service interface into your AIR application (using Flex classes like WebService, HTTPService, and so on) and a complementary server-side interface (e.g., REST via PHP, which would then connect up with your MySQL database). For simple apps, it can be a bit of a pain, but for the moment, that's all we gots. :)
Best of luck!
I haven't tried yes but there are some projects to implement a native driver in AS3 to connect to mysql server. In the end it's just a socket connection and AIR applications are allowed to open socket.
Have a look at http://code.google.com/p/assql/
No, although AIR does have a local (client-side) SQLite database builtin. You don't really want your client apps to have direct access to the server-side database anyways, it can really cause weird problems and open security issues up. You can expose a MySQL database with web services however. This article has a really easy way of doing it.
I would not recommend accessing the database directly. I describe how I'd do it here.
IMHO, the best way to access any Database from a Flex APP (Air or Flash) is to create a webservice. After a few tryouts with PHP, i got into WSDL SOAP webservice build in C# and it´s a beauty! From C#, i got the PostgreSQL, MySQL, SQL-SERVER or Oracle anytime. And using Flex Builder, you can import the WSDL so the objects and webmethod created on the WSDL side will be created for you, with events, listenerers and objects. Try. With C# or Java or any other language, the WSDL SOAP is a great alternative.
Actually, in AIR 2.0, Adobe added NativeProcess functionality. This allows the user to exchange data between applications via the command line's stdin/stdout. The drawback is that you must compile your application as an EXE, DMG, or RPM file as this functionality is not cross platform. MySQL works wonderfully via the command line so this could be a very good option for you. Here's some links on using the functionality.
http://blog.omarfouad.com/?p=277
http://gotoandlearn.com/play.php?id=125
http://gotoandlearn.com/play.php?id=126
http://www.adobe.com/devnet/air/flex/articles/air_screenrecording.html