Author Topic: Visual C++ / C# / VB / Java / ETC.  (Read 8447 times)

0 Members and 1 Guest are viewing this topic.

Offline sidharthTopic starter

  • Newbie
  • Posts: 6
  • Country: 00
Visual C++ / C# / VB / Java / ETC.
« on: November 22, 2013, 05:56:03 am »
Hi,

Occasionally there are projects that come my way which need a computer GUI other than the usual micro controller based embedded system.

A project came my way that I had to let go of, for various reasons, one of them being, I did not know how to develop this GUI by myself. Now I know there there are people that do this for you... but... these guys are not used to doing things at an embedded level, they think more along the lines of a desktop level. Anyway, I decided that I need to start learning this sort of thing.

Here's a brief description of that project I was referring to:
The application was that of a basic low cost medical treadmill where the patient walks / runs as per the doctors input on a PC. Designing a micro controller based system with RS232 or may be even USB seemed easy, but the treadmill interface GUI needed to be developed from scratch & this had some very specific requirements too.

Now, I am not looking to get into IT or become a software engineer or something... but I would like to take on projects as the one described above. From my preliminary research there are a plethora of languages that can accomplish this. Also Microsoft seems to be phasing out VB.

Finally, my question is... as an electronics engineer... which programming language/s is best suited for this sort of application? Is it VB, or VC++, perhaps C#, may be even java. Your thoughts?!!

Thanks,
Sid
 

Offline ivaylo

  • Frequent Contributor
  • **
  • Posts: 661
  • Country: us
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #1 on: November 22, 2013, 06:33:08 am »
If you know VB, do VB (are they really phasing it out?).

Had to do something similar myself last week. Just downloaded the latest Netbeans whipped the GUI I needed in Java (easily found all the crazy libraries I needed). But I've done it before (although years ago). With the Java/Swing IDEs you have to know what to trust to delegate to the IDE and what to do yourself (quite a bit more than with VB). Until you learn Swing and don't need the IDE any more. This has the advantage of running on any OS too.

Many people do this in the browser too. Just run a small server somewhere. It has it's advantages, but if you haven't done any web stuff it is another can of worms.
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6459
  • Country: nl
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #2 on: November 22, 2013, 07:45:22 am »
Depends on the GUI, if you really have to do nice and fast graphical displays I would recommend C#, you can use Visual Studio.
But I have to warn you, the learning curve can be steep, esp. if you have to do fancy stuff and you have to know the target OS (platform).
I am currently finding this out and I only have to do some buttons and text and comboboxes, still it is another language which is quite different from ansi C as I am 90% doing and it needs a different kind of thinking (more OO, classes, seperation of the GUI parts from the calculations etc.).
You also probably need stackoverflow.com (as F1 HELP site) to find out how to do things  :)

VB is kinda old (will not say obsolete but for new students I would not recommend it), C++ is now being replaced with C# so better go that way. Java also good candidate if you have to build web based stuff, which is platform independent but the html won't let you give the nice GUI experience as a real platform program would.
So it depends on your assignment. IT is so wide and big you can not do it all, you have to choose.

If I would have to do such projects I would still team up with a senior C# programmer, split the project in two, let him do the GUI and take care of the electronics and embedded stuff myself, they are two different worlds.
 

Offline Anks

  • Frequent Contributor
  • **
  • Posts: 252
  • Country: gb
    • www.krisanks.wordpress.com
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #3 on: November 22, 2013, 10:23:37 am »
I use C# and get things done quick in VS but if you need cross platform Mono works well but can come with some headaches especially if you need something that's in Microshafts version that's not been implemented. These situations now are few and far between but 3 years ago were common.

VB is very basic hence the name but its amazing what people can do with it but given the new direction companies seem to be going I would still chose C#. As of C++ it was my preferred language but now it takes too much time just to get a simple GUI together that its hardly practical.

At the end of the day someone will pop up and say its horses for courses so  chose your weapon.
 

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #4 on: November 23, 2013, 12:27:44 am »
At the end of the day someone will pop up and say its horses for courses so choose your weapon.

Choose C# or Java if you don't want a lot of headaches later.

edit: I say this because finding skilled Java and C# developers later to take over is as easy as pie.
« Last Edit: November 23, 2013, 04:04:48 am by Rigby »
 

Offline Rory

  • Frequent Contributor
  • **
  • Posts: 410
  • Country: us
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #5 on: November 23, 2013, 12:44:51 am »
Been using Powerbasic for several years. Doesn't require a runtime library installation like VB.net does.
 

Offline Maxlor

  • Frequent Contributor
  • **
  • Posts: 565
  • Country: ch
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #6 on: November 23, 2013, 12:57:06 am »
I like to use C++/Qt because of its cross-platform capabilities. I've done control applications for embedded projects that started in a lab environment where having a PC nearby wasn't a problem, but ended up running on something like a Raspberry Pi, i.e. ARM/Linux, bundled together with the custom electronics as an appliance.
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #7 on: November 23, 2013, 04:02:15 am »
You might also look into Processing. It's the precursor to Wiring and Arduino, but it isn't MCU focused. If it will only be you working with the code, it won't matter as much, however if others are expected to work on it, you should probably stick with VB or some type of C .
« Last Edit: November 23, 2013, 09:00:46 am by Stonent »
The larger the government, the smaller the citizen.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8515
  • Country: us
    • SiliconValleyGarage
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #8 on: November 23, 2013, 05:15:05 am »
Been using Powerbasic for several years. Doesn't require a runtime library installation like VB.net does.
YES ! Now there is a kickass compiler!
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline marshallh

  • Supporter
  • ****
  • Posts: 1462
  • Country: us
    • retroactive
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #9 on: November 23, 2013, 05:16:41 am »
If you want to have simple, straightforward GUIs and write straightforward code, get Visual C# express. It's free.

C# is what Java could've been if the architects weren't wanking about with theory so much. It is more practical IMO. They are 95% the same. Doing GUIs in Java is not easy and consistent as with Visual C#.
And forget C++ and its requisite gui toolkits if you just want to get it done yesterday.

With Visual C# you just draw the buttons, windows and entry boxes. Then write code that runs when you push buttons or whatever.

By the way, VC# and VB are essentially 100% the same, the only difference is the language syntax. All the tech running them is identical.
Verilog tips
BGA soldering intro

11:37 <@ktemkin> c4757p: marshall has transcended communications media
11:37 <@ktemkin> He speaks protocols directly.
 

Offline hagster

  • Frequent Contributor
  • **
  • Posts: 394
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #10 on: November 23, 2013, 07:36:35 am »
I agree that C# or VB.net are the way to go. Both langauges run virtually identically. The only real difference that I can make out is pointers in c#.

The next question would be wether to use WPF(windows presentation framework) or regular Forms. WPF is very powerful, looks great and can do really smooth transitions etc. However I have never been able to get my head round it and always ended up using Forms to get the job done.
 

Offline Skimask

  • Super Contributor
  • ***
  • Posts: 1433
  • Country: us
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #11 on: November 23, 2013, 08:01:23 am »
Still using VB6 on Win7HP.  Works well enough for what I need to do.
I didn't take it apart.
I turned it on.

The only stupid question is, well, most of them...

Save a fuse...Blow an electrician.
 

Offline Paul Moir

  • Frequent Contributor
  • **
  • Posts: 926
  • Country: ca
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #12 on: November 24, 2013, 06:15:35 am »
I just finished up a similar thing; rs-232 scale communication and a GUI with a real world button on a pendant.  Went for Qt/C++ for the same reason as Maxlor.  Ended up on a Raspberry pi as well by chance!

I am not a programmer, and I had no C++ at all, but I picked it up in a couple days well enough to get out a half decent GUI running three threads (main, RS-232 comm and the pushbutton ISR monitor).  My programming background is C, Pascal (fairly dead but I'm most productive in it) and some various assemblies.  Being able to integrate C libraries was handy; I was able to use the wiringPi library with no trouble for the pendant button.

 
 

Offline hagster

  • Frequent Contributor
  • **
  • Posts: 394
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #13 on: November 24, 2013, 08:45:20 am »
Still using VB6 on Win7HP.  Works well enough for what I need to do.

I really recomend you move to vb.net. I used to use VB6 and there are so many things you just can't do, or need to get into some serious COM workarounds. .net is no more difficult and offers so much more power. It's also very easy to translate any C# code you come a across.
 

Offline Skimask

  • Super Contributor
  • ***
  • Posts: 1433
  • Country: us
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #14 on: November 24, 2013, 09:16:01 pm »
Still using VB6 on Win7HP.  Works well enough for what I need to do.

I really recomend you move to vb.net. I used to use VB6 and there are so many things you just can't do, or need to get into some serious COM workarounds. .net is no more difficult and offers so much more power. It's also very easy to translate any C# code you come a across.
Nope...that was part of my point.  "Works well enough for what I need to do".  USB, serial, parallel, basic web interfacing, basic database type stuff, etc.  Fits the bill, not much bloat, and most importantly, I'm very familiar with it.
I didn't take it apart.
I turned it on.

The only stupid question is, well, most of them...

Save a fuse...Blow an electrician.
 

Offline Rigby

  • Super Contributor
  • ***
  • Posts: 1476
  • Country: us
  • Learning, very new at this. Righteous Asshole, too
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #15 on: November 25, 2013, 12:29:19 am »
I'm very familiar with it.

That's usually a good reason to stay where you are, and I would definitely second the notion that you look at .net if you ever determine that learning another language is in order.
 

Offline AlfBaz

  • Super Contributor
  • ***
  • Posts: 2183
  • Country: au
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #16 on: November 25, 2013, 02:06:08 am »
I'm not up to speed on what ms are doing with their platforms but with regards to the last 3 posts, I read somewhere that with the release of windows 8 they were looking to scale back support for .net as well as a dew other things but vb6 will continue, namely due to the tonnes of code written for it and the die-hard's still at it
 

Offline Paul Moir

  • Frequent Contributor
  • **
  • Posts: 926
  • Country: ca
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #17 on: November 25, 2013, 02:07:27 am »
EDIT:   referring to VB6, but it applies to .net too I suppose.

Yes, but if you didn't already know it, why would you spend your time learning it?  It made it into windows 8 but I think it's doubtful it will go any further.  What about other architectures? 

Showing my age, I know lots of obsolete stuff.  Truth is all that junk was not worth learning and I'm a lot more selective about what I spend my time learning now.
 

Offline AlfBaz

  • Super Contributor
  • ***
  • Posts: 2183
  • Country: au
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #18 on: November 25, 2013, 02:12:34 am »
at any rate .net is a universe.galaxy.solarsystem.planet.earth.inhabitants.human.brain.emotion.frustration.colloquialism.PITA
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11790
  • Country: us
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #19 on: November 25, 2013, 02:20:20 am »
The next question would be wether to use WPF(windows presentation framework) or regular Forms. WPF is very powerful, looks great and can do really smooth transitions etc. However I have never been able to get my head round it and always ended up using Forms to get the job done.

Windows Forms is great for small simple GUIs and it's a good place to start if you are just learning.

WPF can be used in the same way as Windows Forms, but you shouldn't use it that way. WPF is better for larger, more complex applications, and for those you need much more structure in your design. To use WPF well you should learn how to use the MVVM design pattern and that has more of a learning curve to it than simple forms applications.

So if you have little or no GUI programming experience, use Windows Forms.
 

Offline Skimask

  • Super Contributor
  • ***
  • Posts: 1433
  • Country: us
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #20 on: November 25, 2013, 04:15:13 am »
I'm very familiar with it.

That's usually a good reason to stay where you are, and I would definitely second the notion that you look at .net if you ever determine that learning another language is in order.
I did take a look at the .net side of things way back when.  Didn't offer me anything vastly new and/or improved that I really needed.  And still doesn't...except for the price tag that goes along with getting the "professional versions" of it all.
I didn't take it apart.
I turned it on.

The only stupid question is, well, most of them...

Save a fuse...Blow an electrician.
 

Offline MacAttak

  • Supporter
  • ****
  • Posts: 683
  • Country: us
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #21 on: November 25, 2013, 05:04:06 am »
I'm not up to speed on what ms are doing with their platforms but with regards to the last 3 posts, I read somewhere that with the release of windows 8 they were looking to scale back support for .net as well as a dew other things but vb6 will continue, namely due to the tonnes of code written for it and the die-hard's still at it

That is misinformation.

Windows 8 introduces a new application mode (it was called "Metro" during the beta period, but found out later that was an infringement on a German trademark). This new mode is in addition to, and does not replace, the existing Desktop mode that Windows has offered since Windows 95.

Applications written to support the new "Metro" mode use a new API called WinRT. WinRT has some overlap with .NET, and you can use C# to write WinRT applications, which has led to confusion. When you use a .NET language (like C# or VB) in a WinRT application, it just loads the .NET runtime into the application.

Also, you can continue to write GUI applications for the classic Desktop mode using .NET, and just like always these can target either the Windows Forms or WPF UI frameworks.

Applications written for WinRT have some significant restrictions. For that reason, and because there is a TON of existing applications written for WinForms/WPF (and other non-.NET frameworks), as well as a very large group of developers who only have experience with Desktop mode development (and may not be interested in WinRT), Microsoft is not going to be scaling back support or anything of that nature.

Now, one thing you might be confusing this with is Silverlight. Microsoft did pull a surprise move in the summer of 2011 when they abruptly announced that Silverlight was being sunsetted. This was done primarily because Steve Jobs declared that the iPhone/iPad would never allow Silverlight or Flash to run on it (or any similar platform). This was effectively the end of both Flash and Silverlight. You might have noticed that now that Flash and SL are dead technologies, Adobe and Microsoft are back to being best buddies again.
 

Offline Lifeboat_Jim

  • Contributor
  • Posts: 15
  • Country: gb
    • RNLB Edmund and Mary Robinson, historic 1938 ex-RNLI lifeboat
Re: Visual C++ / C# / VB / Java / ETC.
« Reply #22 on: November 25, 2013, 09:38:08 pm »
I'd agree with C#. A modern 'managed' language will relieve you of many complex 'gotchas' (such as memory management, and complex data structures), it will be hard enough for you as it is.

However the best language to use is usually the one you know the best (if you know any). Most languages can do 99% of tasks nowadays.

The best suggestion is to team up with someone, you do the electronics and let someone else do the GUI.

Processing 2 (and it's derivatives) is perhaps something you should look at too.
« Last Edit: November 26, 2013, 12:20:40 am by Lifeboat_Jim »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf