Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Guidance Needed - Trying to Learn X-Code and Visual Studio

Guidance Needed - Trying to Learn X-Code and Visual Studio
Thread Tools
ghporter
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Feb 7, 2022, 01:35 PM
 
I am far from new to programming, and I can still bang out some C code to do what I want. But gone are the days when you could learn how to actually build a working, GUI-based application with Visual Basic by just poking around and trying stuff.

I would like to get started building simple GUI apps with both X-Code and Visual Studio’s current versions. Trying to figure them out myself, even following the official “here’s how you do this” intro instructions, has been both confusing and completely unsuccessful.

What’s the best, step-by-step guide for X-Code and for Visual Studio? I don’t mind the idea of a “for Dummies” guide; they’re usually very well written. But I don’t want to dive in and buy “X-Code for Dummies” only to find that it only focuses on iOS apps, or the VS equivalent, only to find that it’s really a .NET book that uses VS as its vehicle…

Glenn -----OTR/L, MOT, Tx
     
BLAZE_MkIV
Professional Poster
Join Date: Feb 2000
Location: Nashua NH, USA
Status: Offline
Reply With Quote
Feb 7, 2022, 03:03 PM
 
I would say if you're looking to learn how to write GUI based applications for Windows, don't bother. All the buisness apps are moving to web. And all that remains is game development and those are in frameworks totally different than the windows GUI framework. If I get time i'll look to see if there's a decent WPF intro I can find in a blog or something. Microsoft hasn't been writing real documentation for 10 years.
     
ghporter  (op)
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Feb 7, 2022, 03:44 PM
 
Thanks for the help.

Glenn -----OTR/L, MOT, Tx
     
ghporter  (op)
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Feb 19, 2022, 11:30 AM
 
I’ve done some research, and I’ve learned a lot.

It looks like both Windows and GTK use similar paradigms for GUI construction. There’s an XML component that can be included (via tools like Glade in Linux) that helps avoid hand-coding every GUI component - to say that activity is “error prone” is an understatement that completely ignores how complex and arcane the code has to be.

Yesterday I loaded Visual Studio 2022 on my Windows laptop, and I plan to start playing with WPF. I’ve messed with GTK’s tutorials for a bit, so now I’m going to compare the tools in VS with the Linux tools. It’s slow going, but after as long a break from coding GUIs as I’ve had*, I guess it’s to be expected.

My GUI textbook was “Portable GUI Development with C++” by Mark Watson, copyright 1993. I graduated in 1995…

Glenn -----OTR/L, MOT, Tx
     
BLAZE_MkIV
Professional Poster
Join Date: Feb 2000
Location: Nashua NH, USA
Status: Offline
Reply With Quote
Feb 22, 2022, 05:22 PM
 
So key concepts in WPF development are:
Data Binding,
Control Templates,
Data Templates,
Styles,

The last two are basically: if the type is X use this.

I recommend MVVM pattern.

http://www.cheat-sheets.org/saved-copy/WpfBinding.pdf

This doesn't look too bad.
https://docs.microsoft.com/en-us/dot...netdesktop-6.0
https://docs.microsoft.com/en-us/dot...netdesktop-6.0
     
ghporter  (op)
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Feb 22, 2022, 09:56 PM
 
That really doesn’t sound too horrible. I hope to dig into the various Windows tutorials soon. I’ve upgraded the RAM in my Windows machine, and added another hard drive to give myself room to work.

I was going through the GTK tutorial from Gnome, and it was fine for “here’s how we make a window,” “here’s making a button,” “here’s several buttons,” and “here’s how we arrange buttons”. Then BOOM, they went to “here’s how you build a full-blown application”, with multiple header files, multiple source files, complicated make files…. I have had to back off and try to get my head around each step, especially when the tutorial now only provides snippets of code to show specific functions.

If they actually start using those multiple source code files in more than one example program, it might wind up ok. I’m not sure about how my head will feel about it though.

Glenn -----OTR/L, MOT, Tx
     
BLAZE_MkIV
Professional Poster
Join Date: Feb 2000
Location: Nashua NH, USA
Status: Offline
Reply With Quote
Feb 25, 2022, 10:14 AM
 
For good or ill, C# doesn't have header files.
The multiple files for code isn't mandatory. But you'll quickly never find anything otherwise.
     
ghporter  (op)
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Feb 25, 2022, 12:34 PM
 
Yeah, in school I learned to “get along” with multiple files. That was both for “efficient reuse of code” and my own laziness. Not sloth, exactly; I didn’t want to have to rewrite anything that I’d already had working. Eventually they became useful and even comfortable to use.

One issue I’ve had with looking up tutorials - for anything, but as an example for GTK+ - is that tutorials seldom seem to mention “this code was written for ‘version X’”. I spent about half an hour yesterday messing with an otherwise well written tutorial on GTK widgets, but the code just wouldn’t work. Turns out it was written for “GTK+ 2.0” instead of 3.0, so I had to change the compiler command line commands to use 2.0. My first clue was how many warnings and errors there were for deprecated stuff…

Anyway, day-to-day stuff has kept me from digging into Windows programming much this past week. I hope that C# is as familiar to this C coder as C++ was. I’ve done plenty of object oriented stuff with C, it’s just more “organic” with C++.

Fortunately, Visual Studio tutorials on the web have been more enlightening than the ones that come up within Visual Studio. I’ve found a few that were well above “now end the line with a semicolon” but not quite at the “now toss in your window controls here” level.

Glenn -----OTR/L, MOT, Tx
     
daniellemill
Fresh-Faced Recruit
Join Date: Feb 2022
Status: Offline
Reply With Quote
Feb 26, 2022, 05:51 AM
 
My favorite GUI tutorial is Portable GUI Development in C++ by Mark Watson! I have enjoyed reading it many times!
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 12:20 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,