Hey guys.... Merry Christmas! :3 Anywho, I'm a bit depressed about something... I tried, and tried, to get pretty good at GTK+, Visual Studio, etc., but it seems that I just can't grasp the idea of UX.... As you know, I have Autism, so we tend to think in certain ways that don't involve certain things.... It's not that I don't care about how people use my Programs, it's that I have trouble seeing things from their perspective.
Add to that my inability to perceive things from a UX point-of-view...
It's depressing..... I don't mind doing back-end Programming, but it would be nice if I could find a way to make good-looking GUI Applications.
Bonus points if I can grasp making things for Android that aren't Compiled in Termux.... It took me so long to even understand OOP, but thanks to
@JasKinasis, I have begun to pretty much grasp this sort of Programming methodology.
Any suggestions guys?
Thank you for any ideas and help.... Oh, and I'm currently working on two Programs in C that will mate with each other, and create offspring. :3
Hey Adam - I didn't get a chance to respond to this the other week because I was ill - a very nasty case of flu!
Just remembered about it when I answered your other thread tonight.
I've probably said this to you several times before, but programming is an art. And like any art, it requires a lot of practice. You learn from your mistakes and you constantly get better. It just takes a lot of work and persistence.
The difference in complexity between a console program and a GUI program is not trivial. It's quite a leap from one to the other. And it can be quite daunting at first. But once you get used to it - it gets easier. But it's not the sort of thing you will master overnight, or in a few weeks, or months - it literally takes years.
It also helps to have a good IDE with built-in RAD (Rapid Application Development) capabilities.
e.g.
QTCreator for QT, Code::Blocks (with wxSmith) for wxWidgets, Glade for GTK (I think?!).
An IDE can take away a lot of manual coding and make things a lot easier.
You can design your UI using drag and drop, you can set the initial properties for the controls and quickly create placeholders for functionality - e.g. empty event handlers for mouse-button events, or whatever!
Sometimes the boilerplate code generated by an IDE is a bit messy and horrible - but after you've got your application working properly - you can always tidy up the code by refactoring things at a later date.
One thing that makes UI programming a little easier is if you think of the GUI toolkit you're using as a big black box that contains a bunch of smaller black boxes.
The UI toolkit your using will take care of creating an application instance and a window for you, you can add the other controls, (the other little black boxes) in any order to your application and you decide how they interact with each other in your code. You don't need to worry about any of the boilerplate stuff, because your IDE takes care of all of that for you. The IDE does most of the big stuff with the UI - you just fill in the smaller details and then add functionality to take data from the UI controls and then do whatever you need to do with it!
There is quite a lot to think about when you start programming graphical applications. Your application is an object - an instance of a class - that contains a lot of different objects - and in turn those objects can contain, or be composed of many other objects. And they might all have complex interactions with each other.
So you have to think clearly about how to structure your code to fit the problems you are solving.
If you are creating a class for your application, you need to think about the same things you do with a console application. Do you need to be using composition (the "has a" relationship)? or inheritance (the "is a" relationship)? You may also have to think about using design patterns to solve certain things.
Design patterns are a generic set of algorithms that can aid the creation of object oriented solutions to common problems/situations.
e.g. the factory pattern - to create a class that can create instances of other classes, observer pattern, subscriber pattern etc. - These can all aid in making it easier to design OO software.
The MVC design pattern is very often used when creating UI applications. Many UI toolkits already use and implement the MVC pattern in the boilerplate code that they generate.
MVC stands for Model, View, Controller.
In an MVC program, the program is split into three main modules:
1. The Model, or the data-model - this module contains the data for the program and any business/domain related logic.
2. The View - purely deals with showing data to the viewer (via the UI),
3. The Controller - as it's name suggests, deals with the general, meat and potatoes, logic of the program, the main event loop and passing data back and forth between the model and the view.
Anyway - I think I'm probably going into too much detail now - I don't want to overload you because this is a huge topic - there are an almost infinite number of factors that could come into play depending on what kind of program you want to create. Some of the topics I've mentioned have entire books dedicated to them. There's no way I could cover it all here. And much of it - you probably don't need to worry about right now anyway!
But even in the simplest GUI program, there is a lot going on!
Like I said - programming GUI applications really isn't trivial - especially when you're relatively new to programming. But given time and practice, it should all start to make sense!