As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
Options

Building a GUI

FagatronFagatron Registered User regular
edited March 2010 in Help / Advice Forum
Can I get some opinions on the best programming language for this? Right now I'm leaning towards C++ because it's what I know best but I am open to other options, mostly C/C#, maybe something different if you can convince me it's worthwhile. It would be used for programming a robot I'm designing with some friends.

Fagatron on

Posts

  • Options
    LewishamLewisham Registered User regular
    edited March 2010
    No language is "best" for creating a GUI, they all suck.

    That said, even though I never use it, Microsoft's Visual Studio stuff makes GUIs pretty easy. Do it in Visual C++.

    Lewisham on
  • Options
    FagatronFagatron Registered User regular
    edited March 2010
    Looks pretty good, thanks. Any idea if I have to pay out a fee to Microsoft if I develop a commercial product with it?

    Also if I develop the software behind the GUI in C++ it should be pretty easy to integrate yeah? The project is a little bit more complex than just the GUI, I don't want to go too into detail because it's probably going to be a startup company sort of thing.

    Fagatron on
  • Options
    LewishamLewisham Registered User regular
    edited March 2010
    It seems you don't know much about programming... when you say you "know" C++, how much do you really know?

    I ask because your questions, like paying a fee to MS, or things being "pretty easy to integrate" make you sound like you're out of your depth.

    Lewisham on
  • Options
    FagatronFagatron Registered User regular
    edited March 2010
    Heurgh--

    Nevermind, I'm a dumbass, I didn't read closely enough when I was looking at the Wiki article, it's just a development environment.

    I saw that it was made by MS and I saw that you had to pay for the development tools but I guess I wanted to know if they'd have any stake in code you made with it. I misread it the first time though and thought it was a Microsoft-centric flavor of C++ kind of like C#.

    I'll be honest, I don't know a huge amount of programming. I know a smattering of Ruby, PHP, a lot of HTML and CSS, and I'm fairly proficient with C++. My education and background is geared more towards Network Engineering and Systems Administration but there isn't much money in that right now for someone without years and years of experience and this opportunity was just thrown in my lap so I'm going to run with it.

    I'm definitely out of my depth, but I know more programming than my buddy who's more of an mechanical engineering person, and my other friend who's a web developer/amateur roboticist. I'll be learning as I go but that's okay, I'm a pretty quick study; and if it doesn't work out it's not like I can get fired, I'm volunteering at this point.

    Fagatron on
  • Options
    zilozilo Registered User regular
    edited March 2010
    Look into WPF (Windows Presentation Framework). It's the new hotness for UI. Plus, it's an excuse to lean C#!

    zilo on
  • Options
    FagatronFagatron Registered User regular
    edited March 2010
    How is C#'s performance and portability these days?

    Fagatron on
  • Options
    FagatronFagatron Registered User regular
    edited March 2010
    Saw the word Silverlight in the article for WPF, suddenly found my balls were in my chest cavity.

    Fagatron on
  • Options
    TechnicalityTechnicality Registered User regular
    edited March 2010
    Lewisham wrote: »
    No language is "best" for creating a GUI, they all suck.

    That said, even though I never use it, Microsoft's Visual Studio stuff makes GUIs pretty easy. Do it in Visual C++.

    I've used it a few times, and it is pretty painless, which is rare in the world of GUI making. I am seconding this!

    If it hasn't changed recently, the free version (Visual Studio Express) doesn't include the WYSIWYG .RC file editor. There are a few freeware ones kicking around that you can use though, I think I ended up using ResEdit.

    Technicality on
    handt.jpg tor.jpg

  • Options
    virgilsammsvirgilsamms Registered User regular
    edited March 2010
    What I would do is create an API for controlling the robot, for example using Xml-Rpc, then build your gui in WPF or a web language (php?). The GUI can send messages to control and ask about state.

    Building a GUI in a markup language like HTML or Xaml will be 500% easier than using C++ or even Visual C++.

    virgilsamms on
  • Options
    mrcheesypantsmrcheesypants Registered User regular
    edited March 2010

    Building a GUI in a markup language like HTML or Xaml will be 500% easier than using C++ or even Visual C++.
    This. There's several reasons why web applications are starting to have the same functionality as desktops and this is a big one. GUI programming for a desktop environment is a pain in the ass.

    mrcheesypants on
    Diamond Code: 2706 8089 2710
    Oh god. When I was younger, me and my friends wanted to burn the Harry Potter books.

    Then I moved to Georgia.
  • Options
    RhalloTonnyRhalloTonny Of the BrownlandsRegistered User regular
    edited March 2010
    There's several reasons why web applications are starting to have the same functionality as desktops and this is a big one. GUI programming for a desktop environment is a pain in the ass.

    I can't emphasize this enough. I started in web design, and going from there to desktop GUIs is a rather quick way to see exactly why people prefer flash, or web apps.

    That being said, if you're a novice to programming in general, or just unfamiliar with how traditional GUIs work, be prepared to spend some time adjusting your perceptions of how you think it will work. A lot of GUI toolkits and layouts are obtusely complex when it comes to positioning buttons and text fields, and I blame the fact that they were designed by programmers rather than more visually-minded people.

    You could always spend some time in Java Swing, which there are ample and pretty straight-forward tutorials about.
    I've heard great things about C# and the WPF, that would be an avenue for learning as well.

    One quick note though- if you are going to be doing a desktop GUI application, be sure to try to design your application in a way that separates the GUI from the actual computation or logic as much as you can. This will save you from a lot of headaches down the road.

    RhalloTonny on
    !
  • Options
    <3<3 Registered User regular
    edited March 2010
    I suggest PyGTK.

    http://www.pygtk.org/

    <3 on
  • Options
    BluefootBluefoot Registered User regular
    edited March 2010
    I do mostly C# programming with Visual Studio at my job and it is super nice for GUI stuff. I would really recommend it. C# syntax is reasonably easy to transition to from C++, though there are some differences obviously. Some downsides to C#:

    - you're stuck with Windows
    - less control of memory management (C# uses garbage collection).

    If you're ok with that stuff and don't need super-optimized performance I'd definitely give it a look.

    Bluefoot on
  • Options
    TejsTejs Registered User regular
    edited March 2010
    I'm going to second (or third) a recommendation for Xaml - whether you are using it for silverlight or WPF apps. You can just about build a UI as easily as you can markup a web page, and Xaml is an extremely nice way of making responsive UIs.

    I'd recommend picking up whatever newest version of "WPF Unleashed" is, as it really helped me learn the fundamentals to make my own client programs with extremely nice UIs in a short time.

    Tejs on
Sign In or Register to comment.