• Advertisement
Sign in to follow this  

what language / API should i use for a windows application?

This topic is 4730 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, recently i have been given the chance to work on a small commercial project. anyway, im a little nervous about this because i have no application programming experiance, aside from the level editors i have made. however, i always used SDL / OpenGL to make them. the only language i know with confidence is C++, but i know a little Python. i am allowed to use any language i want. can anyone recommend to me what i should do? i own VS.net 2003 (the entire suite). i quickly went through it creating new C# and C++ applications. it seems like the winforms interface to C# and C++ are the same? is this how all of .NET is? should i just stick with C++, and use winforms? i have no experiance with managed C++, is there any quirks i should know about? would it be faster to learn C# and use C# forms? what about MFC? what about other languages? i like Python, but i'd prefer to not use it since i dont like writing large projects with it. so far im thinking using C++ w/ winforms will be my best bet, since i am confident in C++ and would only have to learn the winforms GUI, which seems pretty strait forward. thanks for any help. [Edited by - graveyard filla on March 20, 2005 12:53:11 AM]

Share this post


Link to post
Share on other sites
Advertisement
If you're looking for something to use to rapidly create a windows app, I'd probably recommend MFC. As much as some people hate MFC it's incredibly trivial to make most windows applications with it. If you are comfortable enough with C# though, use that instead.

Share this post


Link to post
Share on other sites
I can't see whats wrong with python. If your going with managed C++ then you will probably need to know abit more about managed c++ than just plain C++ plus winforms alone to use effectively that is, its not very nice hence MS introducing a new standard language C++/CLI first compiler implementing it being VC++ .NET 2005 its not completely ready yet though. I'd personally say if not python then for the time being go with C#.

Share this post


Link to post
Share on other sites
Quote:
Original post by DrEvil
If you're looking for something to use to rapidly create a windows app, I'd probably recommend MFC. As much as some people hate MFC it's incredibly trivial to make most windows applications with it. If you are comfortable enough with C# though, use that instead.


im looking at MFC right now.. is there anything to MFC besides just a GUI? i mean, if i use MFC in my app, can i just write regular C++ code? will there be anything weird i should know about (like how winforms brings managed C++ and other things to the table). also, i dont know any C#, which is why i would prefer to use C++. however what im looking for is what will get the job done fastest, and learning a language might take too long (even if its just a day or 2..).

Quote:

I can't see whats wrong with python. If your going with managed C++ then you will probably need to know abit more about managed c++ than just plain C++ plus winforms alone to use effectively that is, its not very nice hence MS introducing a new standard language C++/CLI first compiler implementing it being VC++ .NET 2005 its not completely ready yet though. I'd personally say if not python then for the time being go with C#.


im not exactly the biggest Python fan. well, i absolutely love Python, and everything it can do. however i just hate the whole no braces thing and whitespace-actually-means-something thing. i just cant get used to it and would prefer to not use it. also, you think that learning C# and using winforms would be faster then just using C++ and winforms?

last, what about the Win32 API? is that just way out of the question in times of how long it would take to learn / use?

thanks again.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Avoid Managed C++ until VS2005 since it will change a lot. C# is probably your best bet. You'll be able to learn it really quickly if you know C++.

Share this post


Link to post
Share on other sites
In all seriousness, although it may look unprofessional if not done right, do that sucker in SDL man! If all it is doing is data processing, with minimal user input, then this would not be that hard at all. Heck, I can make a quick little demo of what it might look like if you want me to. It is not entirely out of the question. Cna you please tell me more of what you are doing?

Share this post


Link to post
Share on other sites
Win32 API will take a while to get used to if you don't already know it, and MFC is definitely easier to use, no matter how badly designed it is. MFC is just a set of C++ classes, you can still use C++ while using it. On the other hand if you don't like MFC you can always use something like wxWindows. If you already know (a little) winforms I would go with that cause MFC is really not well-designed.

Cheers!

Share this post


Link to post
Share on other sites
Quote:
Original post by Drew_Benton
In all seriousness, although it may look unprofessional if not done right, do that sucker in SDL man! If all it is doing is data processing, with minimal user input, then this would not be that hard at all. Heck, I can make a quick little demo of what it might look like if you want me to. It is not entirely out of the question. Cna you please tell me more of what you are doing?


heh, ive done GUI app's in SDL / OpenGL before and it was just plain hell =). however, those were level editors which were probably more complicated then what im doing. although i must admit, i would love to be able to just bang it out using SDL. this would make things very simple because then i wouldnt have to learn a new language / API.

i dont have the full spec on it yet, but after a brief discussion, the gist of it is i will take in stock ticker data from a feed, print out some charts, upload data to a database, and do some statistics (i heard the word "linear regression" mentioned). the guy said this should be a "simple" program and shouldnt take more then a week or two to make. i have to admit, im a little nervous [grin].

i dont know any winforms, or any C# for that matter. i think i'll wait for the spec before making any major decisions. if everything is offline, and the GUI can be simple, then i might just use SDL. if i have to pull an XML file from a website and have a complex GUI then im gunna have to start reading some C# tutorials.

thanks again everyone, and ill look into wxWidgets like you suggested.

Share this post


Link to post
Share on other sites
Quote:
Original post by graveyard filla
i dont know any winforms, or any C# for that matter. i think i'll wait for the spec before making any major decisions. if everything is offline, and the GUI can be simple, then i might just use SDL. if i have to pull an XML file from a website and have a complex GUI then im gunna have to start reading some C# tutorials.


Yea, I think that is a smart move, but you could go ahead get a jump start on C#, it wouldn't hurt any [wink]. I think I want to make my own SDL 'windows' library now [smile]. I had something going a while back but lost it during a format. If you could get MFC down, it would be really easy to use that, as others have suggested. I used it for my audio library tester program. It was a less than 30 min app. The hard part was coding in all the stuff to use my library. The actual GUI is a drag and drop and that's it. However, I'd suggest using VS6 to do MFC. MFC 7 is just a pain and I have trouble with it.

Share this post


Link to post
Share on other sites
My vote goes for C# (with winforms).
Failing that, C++ with MFC/wxWindows/[insert-your-favourite-wrapper-here]

I do recommend reconsidering Python (with wxWindows or similar), but if you really can't stand it, then I guess that's that.

C++ with winforms is a possibility; I don't have experience with it, so I won't say much, but given that it will be using managed C++, I believe it would be easier to use C# from the beginning (you should be able to pick it up quite quickly if you're experienced with C++ and you get to grips with the whole managed thing)

Not pure GDI for something like this, since the interface will be too complex and you'll end up with a hacked up MFC clone anyway.

Not SDL; you don't need the advantages it provides, and you do need things that it doesn't provide. Sure, you could use it, plus some freely available GUI system, but I don't believe it would give you any advantage over MFC/wxWindows/whatever, and you'll end up with an ugly, half broken and non-standard interface.

John B

Share this post


Link to post
Share on other sites
Quote:
Original post by graveyard filla
also, you think that learning C# and using winforms would be faster then just using C++ and winforms?


I believe so, for managed c++ you need to change your mindset from value semantic based language to reference semantics (not to be confused with C++ reference types). C# is reference semantic biased language, standard C++ is value semantic biased.

Managed C++ adds languages extensions for C++ to gel well in a managed enviroment and you'll need to know about some of them, understand how the garabage collector effects how you work with memory/resources, that you have finalizers aswell as destructors for objects, pretty much some of the stuff your going learn from C# but more simplified less issues to deal with and i bet much more pleasant to work with, to me managed c++ looks more like a big hack compared to C++/CLI [wink].

Quote:
Original post by graveyard filla
last, what about the Win32 API? is that just way out of the question in times of how long it would take to learn / use?


Its not diffcult its just nasty not worth the time in fact you'll probably waste time for a complex interface (i wish it would just go away to be honest), its a C API besides, this is the problem domain that OO languages excel, GUIs.

[Edited by - snk_kid on March 14, 2005 5:12:00 PM]

Share this post


Link to post
Share on other sites
Another vote for C#.

I recently rewrote a program for my wife's business, from C++ to C#, both created using WinForms in VS2003.Net. Had never used C# before, and used Win32 (not MFC) for the original program.

The difference in production time was shocking. For your typical windows style front-end (essentially a front-end for SQL for my program), C# just makes handling all the clicking et al so much easier.

Plus - have you seen the C++ syntax for a treeview? Not for me, thanks!

And finally - don't forget it's another language on your resume!

Jim.

Share this post


Link to post
Share on other sites
I also vote for C# or python with wxwindows.

STAY AWAY FROM MANAGED C++! The first implementation was so bad that, as many previous posters have stated, MS is totally redoing it. The new managed C++ syntax, thankfully, looks as if it will be much better.

Share this post


Link to post
Share on other sites
Quote:
Original post by JimPrice
Another vote for C#.

I recently rewrote a program for my wife's business, from C++ to C#, both created using WinForms in VS2003.Net. Had never used C# before, and used Win32 (not MFC) for the original program.

The difference in production time was shocking. For your typical windows style front-end (essentially a front-end for SQL for my program), C# just makes handling all the clicking et al so much easier.

Plus - have you seen the C++ syntax for a treeview? Not for me, thanks!

And finally - don't forget it's another language on your resume!

Jim.


Tree views are pretty easy in MFC, if you wrote it using the C Win32 API, then you have my extreme sympathy.

To the OP, either C# or MFC will fit the bill nicely. I would say to go with C# if you're at all comfortable with it, as it will benefit you in the long run. MFC is actually almost as easy to use and has some features that C# still doesn't (or didn't last time I checked) like support for Wizards, but as I said C# will benefit you more in terms of the job market.

Share this post


Link to post
Share on other sites
Throwing in my vote with the lot for C# or Python.

I was in the same position (sounds very similar only a bit larger scale on my end) and ended up using C# for the first time. Absolutely great experience.

Share this post


Link to post
Share on other sites
Some further ideas:

You might try doing it in GTK or Qt. Both are easy to work with. Commercial apps in Qt will require a license, but you can use GTK for free i believe. I know one of Nikon's photography applications is done in Qt and looks great. I have used GTK with perl for a small little project i did and it was fine. The only hitch there is that you have to distribute the GTK libs with your project since they are certainly not standard on Windows.

PS: how did you come across this job? I wish i had someone offer me a programming job :-(

PPS: hey, our ratings match again! It's like a race!

Share this post


Link to post
Share on other sites
thanks everyone for your replies. i still havent gotten the spec yet, but ive already picked up a few C# books (can anyone recommend any?) from my school library. i most likely will use C#, unless i cant wrap my head around the winforms thing, in which case ill use C++ w/ wxWidgets or something.

leiavoia, lucky me, turns out a friend of the family owns a software company on Wall street. he had a few projects laying around and hooked me up with this one. im a little nervous, but i think i can handle it [grin].

Share this post


Link to post
Share on other sites
Quote:

can anyone recommend any?


I found the Microsoft one (Microsoft Visual C#.Net, Mickey Williams) to be pretty good - it doesn't belabour the stuff you'll know like an introductory text does, and has some fairly complete sections on WinForms and Ado.Net. Doesn't cover some of the more recent stuff though, like generics.

Then again, the resources on codeproject are also pretty good; there are some pretty good 'Transfer to C# from C++ / another language' tutorials on there that can get you up and running pretty quickly.

Jim.

Share this post


Link to post
Share on other sites
Quote:
Original post by graveyard filla
a few C# books (can anyone recommend any?)


I would suggest Microsoft® C# Language Specifications. It's what I am going to use to learn C# [grin]. It's just awesome. Plus you can't beat this:
Quote:
63 used & new from $0.49
[lol] Note that it was based on beta content, but from what I've seen by glancing over it, it covers the basics pretty well. It does not go over any GUI. It's more of, well a language specification guide to C#. It's basically MSDN clearly organized on paper [wink]

Share this post


Link to post
Share on other sites
thanks for the book suggestions.. that codeproject site was very helpfull.. wow! i cant believe how many hours and hours of torturous pain i went through making my level editor in OpenGL, when doing it in C# is a joke [grin].

Magmai, why would you buy a third party control for the graph? it shouldnt be too hard to draw the graph, i dont think. havent though it all out yet though.

leiavoia, hah, i would if i could [grin].

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Will this be distributed to many end users (via for example internet download)? Maybe even Windows 98 users? In that case, avoid managed languages such as the .NET languages and Java. Most end users won't download huge runtimes for it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement