MICROSOFT SQL server and windows azure with Mac OS X and Cocoa - sql

So I am currently doing some research for creating iPhone and Mac applications for my company and perhaphs other small businesses. I have found god knows loads and loads of books on cocoa and iOS development, but on the side of SQL server things get a little more shady. I have seen all kinds of products online who claim to be the best SQL driver and to be the simplest and performance enhanced way of adding a relational database to your cocoa app. I have currently been and still create desktop applications under windows and we extensively use our databases for almost all applications and reports we build. We have iPads and iPhone all around our company and I could really bring some innovative apps to our table if we could have some of our workflows or reports on the iPhone or iPad. I cannot seem to find a viable SQL driver like using visual studio under widows. Is there a obvious solution that I have missed or do developers just not deal with enterprise projects with relational databases? We as a company have the capabilities to create what ever web or server needed to get such a project underway but before I do I want to make sure I can work with our existing database as I could with visual studio, any ideas or suggestions are welcomed.

I guess this is one of reasons why is there sooo little enterprise-class software on Macs... As a first candidate I would consider FreeTDS to access SQL Servers. It has headers and libraries that can be linked in XCode as far as I know.

As you mentioned in your post and comments, you do have great design in your mind. For having an application to compatible with any mobile device, the best application design would be to have your application running on as cloud service connected to specific cloud DB while application is talking to it over any exposed interface.
With Windows Azure your application can run as Cloud Service while using SQL database. In your cloud service you can have WCF endpoint exposed which can serve connection to your SQL Database and provide specific data you are looking for. This way your cloud application will be able to serve any mobile device as long as you can make connection to secure WCF endpoint and get back the data. In WCF you not only get XML data, you can pass much more complex results and process in the device as if needed.

Related

How can I create database and web service on azure?

I working on my school project.My project purpose is movie rating application with ionic.When I will present my application on the phone.I need to get data on the internet.So I have to use cloud system for keep in web service and sql database.Oh also I will using sql database.I want to build database and web service on the azure.But its my first time for azure.How can I migrate my sql database to azure and how can I create web service in azure.Im rookie these things.I need a starting point.I searched on the web but cant find a good tutorial :(
If your SQL Database and WebService structure is not a requirement, you can also explore other options such as Mobile Apps. Mobile apps is a workload on Azure specifically built for such scenarios to connect with mobile devices and two way data communication. It uses what is called "Table storage" on Azure. You can start with that and later on move to a no-sql database such as DocumentDB for persistent storage and querying.
You can find a step by step tutorial below on how to create the Mobile apps and connect it to different platform such as Windows Phone, Android or iPhone. The link here is for Android. If you wish to use other platforms you can use the tab to switch to them. It will even give you a sample project that you can download and run directly which can get you started pretty quickly. I also have a blog post around this if you are interested.
https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-android-get-started/
Hope this helps!

How to move a windows .net runtime frontend application to the cloud (it uses a local sql server backend database)

I had a engineer design our .net application back in 2009, my guess is that it was coded using visual studio, and all I have is the installer application. We have been using it on our 1 or 2 local client machines very well for the past few years, but now I want to move this front end to the cloud. Instead of installing it as an application on our windows 7 machines.
It is a very simple application used in our small warehouse that keeps track of cargo/shipments etc. It uses Sql Server 2008 Express as a backend which is stored locally.
I know how to get the database in the cloud, their are many options for that, using Amazon or Azure, but how do i get the local client application to the cloud?
I dont have access to the visual studio code, i just have the runtime executable file..
I am sure there is no way to do this, and many of SO users will say i need to re-write the front end.
I have tried to contact the developer and they hav since closed down. Is their anyway i can run this in the cloud?
I welcome all options and solutions!
Thanks.
I believe you have two options for hosting this application:
If you are able to configure the database connection string, you could host the database in the cloud, and distribute the application to your end users. However, you've already stated that you know how to move the database, so I assume this isn't an option.
The only alternative is to run the entire application on a cloud server, and send the user interface to a client using terminal services. This makes it appear as if the application is running locally on the user's computer, while it is actually running on the server.
For an off-the-shelf solution to achieve this, you could consider using Microsoft's RemoteApp Azure service. I'm sure there are other similar offerings available.

Sync Framework: SQL Server to SQL Server To SQL Express

I'm very new to Sync Framework, Still exploring different possibilities. Here is my Scenario.
We need to have an application (SQL Server and ASP.Net) which is hosted on our web server. Users can register and interact with it online. Another Copy of the application will be installed on our Client's Intranet server. Users can be registered over LAN on this server.
A third copy of the Application (SQL Express) will be installed on various laptops and windows 7 tablets. Users will use the application remotely without connectivity to LAN or internet. Once the device is back in network, it will sync data with the LAN server and LAN Server will sync to the Internet server.
I intend to do this using WCF services and Sync Framework for the sake of security, however I'm open for suggestions. Can someone please suggest me the correct way of doing this and point me to some tutorials samples to do this. I've been struggling with samples available online (mainly this one http://code.msdn.microsoft.com/Database-SyncSQL-Server-e97d1208) for a while and still have no success ..
Feel free to shoot any questions and I will answer them as best as I can.
have a look at this link and ignore/substitute the Azure specific stuff with SQL Server...it has a good discussion on the WCF specific components... Walkthrough of Windows Azure Sync Service Sample

Online SQL Server database accessed from my software

I have been working on the software using a SQL Server database. Now I am in the phase when I would like to provide this software for other people, but I don't know how to manage the database. The thing is that it is really inconvenient when installing my software to also install SQL Server at the users computer (many unexpected thing could happen).
Therefore I thought that I would pay for web hosting with SQL Server, but it is:
Expensive (just for database with few tables).
Most of the web hosting don't offer remote access to the SQL Server database (so I can't connect there from my software).
So there is my question, what would you do? My own virtual server? (even more expensive), or would you install SQL Server on users computer? Or do you know where to get only SQL Server hosting for low costs?
I don't advice using a remote SQL Server. SQL Connections strongly depend on network connection and the Internet is not "stable" enough for that. There are also performance issues that will make your application completely useless.
One important thing you didn't mention is whether different users will share the same data or will have their own. If each user will use their own data you can install a "local" SQL Server Edition (SQL Compact Edition, here is the reference)
http://msdn.microsoft.com/en-us/library/aa983341(v=vs.110).aspx
In case several users will share the same data, you shouldn't rely on the database solely. One possible approach is having an Application server that implements business logic whereas your desktop application stays actiong as a "dumb" client. This is a lot better for performance and reduce data transfer problems. You can implement webservices for you application server. This is a good solution as the data is transfered from he application server to the clients through HTTP/HTTPS and this relieves you from dealing with ports and other communication issues. An alternative is using Microsoft Communication Framework (WCF)
Good luck!

Windows CE - Database

I need to setup an application to scan a barcode from a packing slip and the associated fulfillment items on a windows CE 5.0 device and update the inventory on the server. I'm using VB.NET. However, what is the best way to interact with the database? Integration Services, ADO.NET, RDA... etc... it's a bit overwhelming trying to figure out what I should use to interact with the database. It's currently an Access database, but I imagine I'm probably going to need to migrate it to SQL Server or SQL Server Express.
I'd also need to print the packing slip to a network printer from the device. Is there any way to do this?
Sql CE is an excellent choice if your devices have to function for stretches in a disconnected state (i.e. not connected to the server). If you do use Sql CE, however, I strongly recommend not using RDA to persist local changes back to the server database (see this answer). In any event, RDA merge replication would require your server database to be Sql Server.
If your devices are always connected to the server through a wireless network, then you do not need a local database on the devices at all. Your devices can upload and download data through ASP.Net web services running on the server. Using DataSets for this communication is a good choice, since they are essentially database-agnostic (and thus your PDA code won't particularly care what database you're using on the server).
The web service approach will also let you handle the printing requirement. The PDA would send the relevant information to a web service method, which would then handle printing to the network printer.
My recommendation is to use SQL Server Compact edition (http://www.microsoft.com/Sqlserver/2008/en/us/compact.aspx) for storage engine, and ADO.net implementation of SqlCe in System.Data.SqlServerCe namespace (http://msdn.microsoft.com/en-us/library/system.data.sqlserverce.aspx) for code interaction. They are very well integrated with Visual Studio 2008, including designer support of strong-type dataset and run-time examination of data content on device etc.
No idea about the printing.
In all today scenarios, I would recommend using SQLite. It is the most used database today. Don't bind yourself to an database ecosystem. Just go here and search for "Precompiled Binaries for Windows CE (.NET Compact Framework)". Then you have a SQLite.Interop.*.dll and the System.Data.SQLite.dll. The SQLite.Interop.*.dll has to be placed and deployed besides your EXE file. The System.Data.SQLite.dll is the managed wrapper, that you have to reference in your project. Example: Create SQLite Database and table
SQL Server Compact is not compatible to most mobile platforms like iOS, Android and so on. Microsofts support for old target platforms is poor, leaving Windows CE with only SQL Server Compact 3.5 SP2 where you don't have some essential SQL functions like "LIMIT". Databases generated on the Desktop OS (> Windows XP) will also need to be converted on the device (long delay, when you first open the database), because MS is using different code pages on desktop and Windows CE.
This is Microsofts statement about RDA:
Because of design limitations, remote data access (RDA) will be removed in a future release. If you are currently using RDA, you should consider transitioning to Microsoft Synchronization Services for ADO.NET. If you were planning to use RDA in a new application, you should instead consider merge replication or Sync Services. Note that Sync Services is currently available only for the Windows Desktop Operating System.
Best way to interact with the database is just build the database on the server, compress it als deflate (available under both Desktop and Compact via System.IO.Compression) and send it to the device in whole. Plain and stupid. Most devices have poor import performance, so doing the import locally may take too much time, even if you have a fancy sync framework.
To transfer the database you can use a WCF service or just any web server using a HTTPS GET. Like so:
// ppp_peer is in most cases the active sync connected pc
string url = #"https://ppp_peer/export/database.db.gz";
string html = string.Empty;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
using (Stream stream = response.GetResponseStream())
using (FileStream fs = new FileStream(stream))
{
// Decompress your database here
}
To ORM your POCO objects just use something like https://bitbucket.org/twincoders/sqlite-net-extensions
However, if you have WLAN access everywhere, I would consider writing a browser application and using the mobile browser together with a web server for your needs. Just keep in mind, that Windows CE 5 based devices don't come with HTML 5 support out of the box. If you have a choice consider switching to a Android based device.