I am trying to make a quiz application for Windows Store using the blank app template (in VS2013). I have the UI laid out in XAML but I don't know how to fetch Questions saved in my DB (MS access or SQL).
I have tried to find tutorials related to it,but what I have found is for WPF and Windows Forms. I had chosen the Blank app template, so can anyone explain how to fetch question from the Database in an application using Blank app template?
As it turns out, there's a good reason you couldn't find a tutorial for accessing a local DB in the WinRT environment. You can't. Microsoft didn't even include the requistite ADO.NET assemblies, assuming you could get out of the sandbox in order to connect.
There is a SQLLite project for Windows Store apps, found here. That's about as good as you can get it right now in terms of a local relational database in a windows store app.
What Microsoft intended for you to do was to store your database in the cloud (and if they have their way, on Microsoft Azure) and access it using a web service. Support for that is all over the WinRT API. It sounds like thats probably what you want anyways (unless you expect your users to generate their own questions) so I would go into that route.
A starting point for that would be to use Azure Mobile Services.
One last thing to note, WPF and WinForms are not WinRT, but there are other project templates (like the Hub template) that are. The fact that you chose the "Blank" template doesn't really affect anything in this regard.
Related
I'm a second year student and for my last project I'm interested in doing a Xamarin Application. So I just got started with Xamarin and I've been doing the tutorials in developer.xamarin to learn new things. However my ultimate goal is to make an Xamarin.Android App which has multiple screens which will be used to interact with an Azure SQLDatabase which is already being used for my ASP.NET Forms Website, so that I can use both like Facebook to as an App as well as an Website.
While I was searching for examples I got this by Xamarin This Link (Which is quite complicated and some unknown errors pop while I'm developing it) but, while I was reading the forums I got this C-Sharp Corner Tutorial which is quite easier than the original Xamarin Blog Example. Later I found another approach given in StackOverflow which is Hosted In GitHub. It would be grate if someone could explain me what is the correct approach (and what is used in the Industry) from above three and which is the most optimal solution for my app goal.
Plus, According to the articles I read, here's what I understood so far, It is unsafe to directly connect an Azure SQL Database to an Android App like we used to do in ASP.NET applications so what we usually do is use Some Mechanism called REST based on Json requests. It would be great if someone could tellWhat is the way to interact an Android Application with an Azure SQL database
Thanking in advance :-)
There is a really easy way to do this by using the example officially provided by Xamarin about Consuming a RESTful Service which can be found in Consuming a RESTful Service and developing its ASP.NET Core Back-end API which can be found in above URL which is provided my Microsoft
Thanks
Ok im working on something and i have one question if this is even possible. I am doing 2 applications. One will be on the computer and the other will be on android device. On the computer user will input some data that will be stored in the database. The database will be local at my computer. Is there anyway that i connect to the same database with my mobile phone if it is on the same wifi, and store some information to that database from the mobile phone?
And what should i use? sqllite or MySql. Is it better to write the android application in java or in c# with the xamarine?
Thank you
Is there anyway that i connect to the same database with my mobile phone if it is on the same wifi, and store some information to that database from the mobile phone?
Yes it is. If database is available trough the network you can establish the connection.
Depends on what you're trying to accomplish, I would rather create the data service (using WCF for example) that would expose interface for both desktop and android applications. In this way you will have unified model for working with database. But you can work with database directly as well. There should be plenty of example of how to do that.
sqllite or MySql
You can work with any of them, it is more task specific then technology specific question. IMO, SqlLite might be a bit easier to use though
Is it better to write the android application in java or in c# with the xamarine?
Doesn't really matter. I would say if there is no specific reason why you want to chose xamarin, go with java.
There is wide range of posibilities. You can use SQL, NoSQL, plain text.. whatever you want. Xamarin Forms can be a good starting point especially using MVVM. With the same logic you can code both the desktop app and the mobile app. Try Catalog, http://catdb.eu. It does the same as you trying to achive.
For Xamarin.Forms there is a good reference book. It is pretty good. https://developer.xamarin.com/guides/xamarin-forms/creating-mobile-apps-xamarin-forms/
I am really new to Windows Phone ( and Windows) development, and C#.I have done my first program as a unit convertor for Window Phone 8.1 using C# and Silverlight, run it on emulator and Phone both.
Now I want to build an application that can store data (e.g. a diary, that I can store plain text in it daily), something like usage of database, but I really have no idea how to do it and whether I need some sort of database, like SQLite, or there is some built in solution to store custom data in Windows Phone itself.
Can you please tell me how to and where to start?
In Windows Phone Silverlight apps, you have the option of using a SQLCE database with the LINQ-to-SQL framework on top of it (see docs here). If you're considering building a universal app that will run on both Windows and Windows Phone, however, your only database option is SQLite (see here for more details).
That said - unless you need to perform queries across a large amount of structured data, a database is probably overkill for your app. You may want to consider simply using flat files (docs here) to start and only upgrading to a database if the amount of metadata for the diary entries grows beyond what you'd want to keep in memory.
I need to create 100s of graph through automation, I try couple of library for charting from codeplex. however none of them works for me as they all expect either a WPF or Windows Forms interface to be present. Since I need the task to be done using Background windows service such libraries won't work for me.
I am not stuck to use ZedGraph, yeah it is one of the best library, but the Chart quality is way too dim, I use MSChart with ASP.NET projects of mine, they have such a smooth curves, but ZedGraph doesn't.
Now my only question is: Which is the best library in terms of visual as well as in terms of feature like zedgraph to use for windows service. I prefer if someone tell me how I can improve zedgraph really quick if possible.
If you are using a SQL Server you could use Microsoft's SQL Server Reporting Services which is abbreviated to SSRS. This is similar to Crystal Reports in so much as you can design your report with graphs, tables, textual information etc and then when run the information is populated from your database.
SSRS can be called either by a front-end application or simply as a web service call (via your Windows Service) that can generate the report and save to either Excel, PDF etc.
This is industry recognised and a good place to go if you already have SQL Server. I also mentioned Crystal Reports that you may also want to check out.
I want to develop a windows based application in silverlight. I went through many articles and every where I found that "Silverlight is for web based application". I don't know whether I am wrong or right, as my superiors told me that in Silverlight5 we can develop Windows based application. Can any body help me to give a clue for how to start. Any help would be highly appreciated.
Thanks in advance
If you mean a Windows based application which can connect with internet you go for Out of Browser application which silverlight supports but if you want simple plain desktop application, there is no point in using Silverlight, WPF would be the right choice in that case.
Look at this article for building an out of browser app using Silverlight.
Silverlight specializes in building rich UI based Web applications and WPF is best for making UI rich applications for Desktop.
You can run silverlight apps "Out Of Browser", its just a setting in the config. Here's a video with more info: http://www.silverlight.net/learn/videos/all/out-of-browser-experiences/
silverlight is a web-based technology that runs on the client machine. it is, basically, Microsoft's version of Flash.
Now, that being said, you CAN write silverlight apps that run out of the browser. but, they are not "really" windows apps. silverlight is a sub-set of WPF. However, you can also make WPF apps that run in a browser. Confused yet?
The bottom line is that WPF is for desktop apps and is full-featured with access to the machine resources.
while silverlight is a light-weight version of WPF that is intended to be run in a browser, similar to flash. it does not have all the features of a full desktop application due to security model and that sort of thing.
Both have elements that cross into the domain of the other.
Like all good things, the answer is "it depends on what you're trying to do". If you want an application that can run inside the browser, outside the browser, plus on Windows and Mac then Silverlight is the answer. You also get for free/are restricted by a security sandbox; you can get around this sandbox by requiring additional permissions from the user. If you're trying to do something that requires multiple monitor support, access to COM objects, stroke/pen/stylus input, 3D hardware acceleration, or access to a large local file store then WPF is probably the better answer. Silverlight out of browser applications also have a nice "phone home" feature that will automatically download updates; WPF requires you to roll this by hand.
Some folks have mention XBAPs (running WPF inside of a browser). Stay away from this error prone steaming pile of stuff. It's good for demoware, but is not something which you'd want to support.
You heard right.
This is called "out of browser":
Silverlight-based applications typically run within Web pages, but you can enable users to install them from the Web and run them outside the browser.