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!
( Last edited by daniellemill; Dec 27, 2022 at 02:15 AM. )
     
shifuimam
Addicted to MacNN
Join Date: Aug 2006
Location: The deep backwoods of the PNW
Status: Offline
Reply With Quote
Sep 25, 2022, 05:46 PM
 
Originally Posted by BLAZE_MkIV View Post
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.
Depends entirely on what you're trying to do, and in due time, businesses will move back to running their own stuff, because the cloud isn't actually the answer to much of anything in the enterprise.

@GHPorter - I can't write C++ to save my life. I've become pretty adept as a .NET hobbyist. Husband is a brilliant engineer who has helped me improve my code and the way I approach things, but I've taught myself all the .NET I know. It's easier to work with than C++, but if you're already good enough in C++ to become fluent, you may as well stick with it, because you'll be able to write more efficient, streamlined applications that don't come with any fat framework weight.

If you ever DO decide to try .NET, I know enough to be helpful. Mostly. It is C-like, and you can import C and C++ libraries and use them with .NET very easily.
Sell or send me your vintage Mac things if you don't want them.
     
ghporter  (op)
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Sep 27, 2022, 02:13 PM
 
Shifuimam, thanks for the offer. I’m “better” with C than C++, but only because I learned that first (and formally, in college…C++ was introduced, but not actually “taught” for some reason). I haven’t delved into .NET much because I’ve been trying to stay closer to known territory, but that doesn’t mean I’m against learning it.

The original reason I started this thread was that I was trying to write something GUI-based that was “functional”. I wound up having all sorts of headaches with that on several platforms.

Eventually I found Gnome Builder, which is an IDE and much more. And with that, I was able to build my functional app. More importantly to me, I was able to use code chunks I’d already gotten polished for a command line program with minimal adjustments - that made it easier for me to actually understand the specific paradigm used with Builder.

In theory, you can use Builder for just about any platform and a huge variety of languages, not just C/C++ in Linux, but I’m not going to explore that too much until I’m more comfortable with it on Linux.

Glenn -----OTR/L, MOT, Tx
     
shifuimam
Addicted to MacNN
Join Date: Aug 2006
Location: The deep backwoods of the PNW
Status: Offline
Reply With Quote
Oct 1, 2022, 01:26 PM
 
I found myself in the same boat in Windows, which is why I taught myself .NET - to make applications for myself that nobody else wanted to make. It makes sense there'd be a development stack for Gnome, since it's such a mature platform. Qt's supposed to be similar.

I'm learning Swift right now for the same reason and it's a beast to learn compared to .NET.
Sell or send me your vintage Mac things if you don't want them.
     
ghporter  (op)
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
Oct 3, 2022, 09:22 AM
 
Swift has enough uniqueness that I’ve had to spend a LOT of time with the documentation just to feel that I’m getting the “hello world” stuff right. And it’s taken multiple tries.

It doesn’t help that Swift isn’t 100% consistent for some things. Some properties are managed “this way”, but the same properties for a different structure (the window versus something in the window) are managed “this other way.” Great for learning, right?

Glenn -----OTR/L, MOT, Tx
     
   
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 02:52 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.,