ADO.NET in Windows 8 - ado.net

Is there ADO.NET in Windows 8 and Windows Phone 8? I need SqlConnection class. Maybe there is additional libraries?

There is no ADO.NET in WP8. If you are referring to modern, Windows 8 Store Applications, ADO.NET is not allowed either. ADO.NET would only be available in desktop applications.

The answer above is correct. Here is some follow up content, if needed.
Windows 8 applications are expected to run directly from the Windows Store, without the limitations imposed by connecting to local servers via a connection string.
The recommended approach is to expose your database via a web service.
Two Microsoft technologies that do this are:
(1) Windows Communication Foundation
(2) ASP.NET Web API (the more modern approach)
For Windows Communication Foundation, here is a tutorial:
http://www.intstrings.com/ramivemula/articles/create-a-simple-wcf-service-against-pubs-database-using-ef-linq-part-i/
For ASP.NET Web API, here is a tutorial:
http://code.msdn.microsoft.com/ASP-NET-Web-API-Tutorial-c4761894/view/SourceCode

Related

REST Server without GUI

I've started working with delphi quite some while ago but I would say I'm still a newbie in all this.
So basically I tried creating REST Server, which can validate license keys. I got in working with Indy, but one thing bothers me. The GUI. The Server shouldn't have any kind of gui so it can work on any OS (Win, Linux, etc). Is there a way to make a REST Server without any GUI/FMX/VCL?
BTW: Working in Delphi 10.2.3 Professional.
Any advice is appreciated.
EDIT: I forgot to mention one thing: the server is supposed to run on an independent Data Center away from any user.
You can create the WebServer as a Windows Service.
You can use DelphiMVCFramework or any other Framework to create it.
With DMVC you can create console application, Windows Service, Linux daemon, Apache module (Windows and Linux) and IIS ISAPI (Windows).
With Intraweb you can also create Services.
Take a look at our mORMot Open Source REST framework, which works on Delphi but also on FPC/Lazarus.
FPC support ensures that you can target Linux with this free compiler. No need to upgrade to a newer version of Delphi Architect, which supports Linux, and is very pricey - and less stable (to my knowledge) since Linux support is quite new.
As you requested, the mORMot REST server has no UI part. You define your services as interface and class - like you do e.g. with DotNet - and you will have full JSON/REST support generated.
mORMot is used on production since years for very high performance and stability, hosted on both Windows and Linux. A version 2 is on its way, which would be even easier to use for new projects.
And you can create a Windows service or Linux daemon without using any third party framework. Delphi include everything you need. However, it is possible that third party framework will facilitate your programming. Don't forget you'll have to learn those third party framework.
Creating a Linux daemon service in Delphi
Creating a Windows Service in Delphi
In both cases, you can use the sample code you've found that make use of TIdTCPServer.

Is Windows Azure compatible with the .NET 2.0 framework?

I have a service that was developed in the .NET 2.0 framework. It is installed in several sites and works with my application. I would like the service to be able to "report" back to me with certain information about the application. I wanted to see if Windows Azure would be an option for me to be able to store reports in a cloud db and be able to pull them when I need to. One of my main concerns is it compatible with my .NET 2.0 service?
Thank you.
In a word: yes. Windows Azure can run code compiled against 2.0/3.5 and 4.0. You may not have access to all of the Azure SDK (some of the libraries require 3.5), but your service should run with no modifications.

Preferred database management system for Objective-C (iPhone apps)

What would you say is the best candidate for a DBMS for use in iPhone apps? The database would be online, not on the device, so a back-end updating administration interface would be most beneficial (like phpMyAdmin is for MySQL).
I only know of MySQL (not sure if it can be used for iPhone with satisfactory results), and SQL Lite, are there any other managements systems that would be great for performance as well be reliable.
Thanks in advance.
the choice of the DBMS has nothing to do with the iphone .. likely the iphone will connect to a web service (weither SOAP or REST). the web service will be the one using the database not the device.
If the database is online, I wouldn't recommend any kind of management system on the device. I would probably recommend implementing some kind of web service and communicate to the database server and its own DBMS via the web service.
Anriƫtte, I seem to have bumped into two common scenarios
For my corporate clients, they use SQL server as their database and .Net as their server API.
For my non-corporate clients, we usually use MySQL with a PHP or a Ruby on Rails server.
In both cases, I use JSON on the iPhone to talk to REST services on their servers. This works great.
Both DBMS above have good management tools. I usually use the MySQL GUI tools or SQL Server GUI tools to administer the database. Lots of people (not me) like the PHP MySQL admin tools because they are web based. Please do not use a personal database on the server like SQLite, Access of FileMaker, they do not scale.
I did once write an Objective-C program that accessed MySQL using its C++ libraries, not a good idea.
My advice: Ruby on Rails REST using JSON on top of a MySQL database on the server side.

Are there any lightweight web servers that can run asp.net web services?

As per title, I'm looking for a very lightweight web server to host some WCF web services. The Web server needs to be portable to it can run from Windows, Linux or Mac.
What are my options?
For portability across Windows, Linux or Mac you will need to use Mono. As far as hosting is concerned it is very easy to write your own host for a WCF service. You can even host it in a console application.
WCF is .net and by the book .net only runs on windows. But look at the mono project: http://www.mono-project.com/Main_Page as well for linux ports of .net

Windows Phone 7 : Socket Programming

Is there any support for TCP/IP Sockets in Windows Phone 7? I'm not having any luck finding it so far.
I want to connect to a port on a server and issue commands/receive responses
It was added in mango version.
http://msdn.microsoft.com/en-us/library/system.net.sockets.socket(v=VS.96).aspx
from the WM Phone 7 Dev FAQ:
http://social.msdn.microsoft.com/Forums/en-US/windowsphone7series/thread/2892a6f0-ab26-48d6-b63c-e38f62eda3b3
Can I use Sockets for peer to peer communication?
Windows Phone 7 Series currently does not expose the Socket classes. While the version of Silverlight on the phone follows closely the feature list for Silverlight 3 on the desktop, it is a subset of those features and will not contain all classes. (It also holds a superset of classes not available in Silverlight 3.)
According to microsoft announcment, sockets will be available in next "mango" update for late 2011. Dev tools to ship May 2011.
"...The integration extends deeper into the operating system via sockets..."
While sockets are not exposed in Windows Phone 7, the better alternative would be to use WCF.