Learning to work with databases - from web to desktop application - c#

I have experience with MySQL as a web developer. I also have some experience with desktop applications, but I have never needed a database in one. Now I want to create a simple desktop application for me, which I would like to make in Visual Studio C#. I know I can work with database in C#, but I have some noob questions, which are not answered by tutorials I've browsed through so far.
There are obviously more solutions, what would you recommend for simple application aimed to work with vocabulary for new languages learning?
What does a database mean for application installation? Can I keep it simple, so that I could than run the application on other computer without installing something more for the database to work?
I would appreciate some tutorials, or advice on start.

If it's a simple application you could go with Microsoft SQL CE database - CE means Compact Edition. You can then install the app in whatever computer and just place the accompanying database file in a directory of your choice and should be good to go. There's no database server involved and as a result it's pretty light when deploying the app.

It's a bit hard to find a question, but I think I found one - you're asking how to install a database with an application.
If every user of your application sees her own copy of the data, with no sharing, then MySQL is probably an overkill. You should take a look at SQLite instead. There's no installation at all.

Related

Is it possible to develop an application to run without having a DBMS/RDBMS in back-end?

I have some background in ASP.NET applications, and I am also using Webforms, MVC and WinForms.
But right now I need to develop a WinForms Desktop application in .NET to run only to the computer which is currently installed not on a shared environment.
It needs to have and support all create, read, edit, delete functions, but without a database like SQL or any other RDBMS/DBMS, since I want to avoid having to install it separately.
The application should store user information in other types of files like XML or something like that.
I want to ask weather if there is a way or not. Which best practice technology should I need to follow?
Yes it is Possible to have data store to be used with Windows Form
Applications.
You have multiple options here.
Sql server compact edition
Microsoft Access
Sql Lite
Though you have to install SSCE,SqlLite separately in user PC.
But Microsoft Access comes in package with Microsoft office.

How do I make a C# project that 3 users can work on at the same time?

Me and two others are starting to make games, we all have some knoledge of C# and VB.Net, we are using C# with the XNA Managed Runtime Environment to make a game.. We have one problem we can't find an answer too though. How do all three of us work on the same project? I saw something about Team Foundation Server, but would that allow us all to work on the project? Or is that just for statistics and time activated builds..
Thanks, Matthew
You need source control. That could be Team Foundation server, it integrates nicely with Visual Studio. Git is also a very popular alternative, but it's more complex.
I started out with SVN server and that was simple and easy for me. You should google for what suits your needs.
Source control is something that runs separately from your project, it has little or nothing to do with your preference of language.
Any source control solution will work to help you manage the project in a team. This includes Team Foundation Server, but also github.com, Bitbucket and other options.
Team Foundation Server is primarily used as a source control tool (can also be used for build management, storing test cases etc.). If you want to maintain a history of the changes to any code, then go ahead with Team Foundation Server or some other source control. A source control would also help you in making local changes and then merging your change with the changes made by others afterwards.
Yes TFS (Team Foundation Server) will help you.
It has a source control, which keeps track of changes made by individual developer and let you merge your changes with code on server or rollback any changes
It provides project management capability, to create user stories and tasks then assign each commit with task to let everyone know that "this change is performed for following task"
and many more ..

A solid intro/tutorial to programming (for a SmartDevice with Windows CE & Visual Studio 2008)

I'm a beginning programmer who needs to write a simple program in C# for use on a Windows CE 5.0 device. Specifically, I'm working with Visual Studio 2008 and an SDK for Psion Teklogix devices. I've not been able to find a relevant introduction or tutorial for this sort of programming, and as I'm not familiar with C# or any of its relatives (and don't have any knowledgeable programmers around me), I can't seem to get off the ground. I've perused the following tutorial: http://msdn.microsoft.com/library/bb330928.aspx
But the code given for C# here doesn't function with the References I've got, as a consequence of my SDK. So, my question is - are there specific tutorials, blogs, books, etc that may help me here? Or do I need to learn C# by doing the tutorials for console applications and then switch to working with the SDK-relevant resources once I'm mildly competent? Thanks in advance for any answers/advice.
The Compact Framework is largely a subset of what you have on the desktop. When you add a device to the mix, you're going to have challenges around deployment and debugging, and I think trying to get through those while also trying to learn the language is simply setting an unreasonably high barrier for yourself.
Start out with a basic "intro to C#" book or set of tutorials and just work on the desktop for now. Most of the fundamentals are going to directly translate to the device when you get there.
Spend time on the desktop doing a bit of what you need - build up some of the business objects you're going to need and even mock up some abstracted UI.
Once you are comfortable with the language and the tools, then go into some of the device-specific tutorials so the only thing you're trying to learn at that point is how to deploy and debug with CoreCon.

C# 2010: Deploying Multiple Apps..Need Sure Fire Way To Update

For starters I have whored myself out to the Internet in general as far as search is concerned. Got nowhere and am pretty Google proficient. Maybe I missed something..Enough of that.
As mentioned above C# 2010 (3.5->4.0 running on Win7x64 but would like the app to be fully compatible with XP/Vista). Dealing with XP(w/SP3) to Vista/7 clients. Working on an app that will allow my company to more easily connect to their local desktops via RDP. My app is awesome as far a usability, but eventually, my programming will catch up to me, bend me over, and do me hard.
I am looking for a sure-fire way to update the main app. I am deploying a secondary app to pull this off (app downloads updateApp from developer website if xml file has newer version, updaterApp updates main app; main app updates the updaterApp--if needed).
Looking for reinforcement or better ways to accomplish this as the app depends on admins + (possible) SQL + AD + SMB + SSH auth.
Things I have run into:
http://themech.net/2008/09/check-for-updates-how-to-download-and-install-a-new-version-of-your-csharp-application/ (at this point, what I like)
http://digitalformula.net/technical/c-self-updating-application-without-clickonce/
http://www.eggheadcafe.com/articles/pfc/selfupdater.asp
So that's what I am looking at. Would love to find the right solution with details/great code/examples. I am MOST WORRIED about admin access in Vista/7 on the 'Program Files' directory look forward to the discussion. Hope all of the info is here. Thank you so much in advance!
What about clickonce?
I read good and bad things about ClickOnce. One of these days I will sit down and figure out how it works. For now I went with update code inside the main application. Its pretty kewl. It starts a new thread to download and run the MSI package. I found it here.
http://themech.net/2008/09/check-for-updates-how-to-download-and-install-a-new-version-of-your-csharp-application/
Hope that helps someone looking to spin your own. I liked this approach because I did not have to create a second program.
Use clickonce
.net has this built in, we use it for our LOB apps, works fine.

Can an exe compiled from C# be integrated into a website?

I'm a beginner in programming. I've just made a program called "Guessing Game". And it seems to work fine. Can I integrate it into a website? The CMS that I'm using is Mambo.
===
additional info's
Thanks for all your suggestions.
I still don't have any background about Silverlight, WPF and Java Script which I think sounds good. I'm using Windows and I programmed my "Guessing Game" from Microsoft Visual Studio 2008 and it's using Window application forms.
Yes I guess, for the moment I let it be and start to learn Silverlight or Java Script so that I can integrate it on my website:-)
Thanks for all your input guys:-)
Cheers
A standalone executable cannot be directly integrated into a website. You have a few choices though:
Allow your users to download the executable and run it locally for themselves
Rewrite your program in JavaScript to have it run directly inside of an HTML page, though this could obviously involve a fair amount of reworking
Use Microsoft's Silverlight technology, which allows you to code in C# and produce a web-based frontend similar to Adobe Flash. Your program logic should remain the same and you should only have to change the UI code. In fact if you're already using WPF for the front end, the transition will be even easier.
There are several questions that you still need to answer.
What is your server running? If its not Windows, your exe will not run at all unless it is compatible with Mono or a similar framework for your server's operating system.
How does your "Guessing game" interact with the user? If it is through a WinForms GUI, it will you will not be able to use that GUI on the web. If your game is a WPF application your easiest route may be to port it to Silverlight and serve it up on a web page.
It is typically not trivial to make a regular windows application run in a web environment since on on the web you are really running in the browser, not on Windows.
Yes - in general, when you're talking about software, anything is possible. The question is, how difficult will it be?
To understand that, you have to give us more details about "Guessing Game" including how it is designed, what it's interfaces are, how readily extensible it is, and how prepared you are to change or extend it.
For example, if it is a Windows Forms GUI app, then it will be diifficult to integrate into a web app. If it is a console app, then it will be a little easier. If you can modify it to run as a Windows Service, then a little easier. If you can modify it to accept input from the network (as opposed to getting input solely from the keyboard + mouse), still easier.
You may be able to use reflection to load your assembly into the web application, but most likely, the answer is no.
Your best solution is probably to re-write the game in javascript.
The short answer to your question is now. I'm presuming that since you're running Mambo you're web environment is a LAMP stack. However, you're "Guessing Game" is most likely a Windows application from the sound of it. For a beginner in programming, there is no integration path you're going to be able to take that will allow you to have your game running on your website.
However, here are avenues you can take, which will require a significant amount of time to learn. I'm not saying you shouldn't take time to learn, by all means you should! I'm simply trying to illustrate the fact that this is not something that is going to be doable in a couple of hours.
Silverlight - allows you to run C# code with a WPF like interface on your client's browser and can integrate with your web site through javascript.
Let your client download it from your website and run it off of their PC. This would actually be fairly trivial and would be your quickest option, but it sounds like it's not the kind of integration you were looking for.

Categories