If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
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.

Best languages/programs for GUI design?

Hi all. I'm looking for some advice regarding which languages to learn for developing a GUI.

Say if someone approached you and said ‘I have designed a handheld game console that has a digital screen that’s going to be manufactured, but it needs the GUI designed’. How would you design the GUI (in what languages & using what programs) so that it could be implemented on the product?

Re: Best languages/programs for GUI design?

Originally Posted by manufacturer

I don't understand since it would be a device

I guess Arjay is asking what OS there is on the device.

This OS will manage all software running on your device. For example there must be a program that makes the device act as a USB storage. And there will be another program (with the GUI you are asking about) that will communicate with users of your device.

OS means operating system and there must always be one on a device. It may be something very simple and rudimentary you write yourself, or it can be very advanced like Windows or Linux, or it can be something in between.

If your device doesn't have an OS you either write one or select one from the shelf and port it to the device. Your requirements probably will be things like it has a small footprint, has USB support, has GUI support and is cheap. Here's a link I just found that shows some options,

When writing your own systems software for a device and/or porting an OS, the programming languages you will be using are C and the Assembly language of the processor. Once the OS is up and running you may optionally use other languages that are available on that OS.

Finally I must warn you. This is not for the fainthearted. You may want to consult an expert or hire a professional programmer or both.

Re: Best languages/programs for GUI design?

Originally Posted by wolle

I guess Arjay is asking what OS there is on the device.

This OS will manage all software running on your device. For example there must be a program that makes the device act as a USB storage. And there will be another program (with the GUI you are asking about) that will communicate with users of your device.

OS means operating system and there must always be one on a device. It may be something very simple and rudimentary you write yourself, or it can be very advanced like Windows or Linux, or it can be something in between.

If your device doesn't have an OS you either write one or select one from the shelf and port it to the device. Your requirements probably will be things like it has a small footprint, has USB support, has GUI support and is cheap. Here's a link I just found that shows some options,

When writing your own systems software for a device and/or porting an OS, the programming languages you will be using are C and the Assembly language of the processor. Once the OS is up and running you may optionally use other languages that are available on that OS.

Finally I must warn you. This is not for the fainthearted. You may want to consult an expert or hire a professional programmer or both.

Really interesting comment! I’m now curious as it seems like an OS may need to be written from scratch. You said either write a new OS or select one from the shelf - I assume ‘off the shelf’ means use an existing one like windows or linux or some open source OS? Are there any you’d recommend?

I assume assembly is the only language to write an OS in - or are there more? Because I thought I heard assembly may be outdated.

I also assume C is a language of the programs (e.g. the GUI) that communicate with the OS? Or are there other languages that could be used to make the applications (like C++)?

Re: Best languages/programs for GUI design?

Originally Posted by manufacturer

Are there any you’d recommend?

Well, since I don't know what your device looks like I can only give general advice. I'm kind of assuming it's like a small computer with a processor, RAM and ROM memory and I/O hardware? In that case you can use the Raspberry Pi as a model to learn from,

So writing your own OS is a possibility but porting an existing OS may still be the better option. It depends, I cannot say more than that. I suggest you form your own opinion by studying the Raspberry PI.

Every processor has an instruction set called machine language. Just a notch above the machine language is the Assembly language, a different one for each family of processors. It will never be outdated since this is how you code for a specific processor at the very lowest level. The next higher language is C. Almost all close-to-the-processor coding takes place in a mixture of C and Assembly. The more C you use the better since it's more general and at a higher conceptual level than Assembly.

Once an OS is in place you can use any language that has support (compilers, linkers, libraries, runtime systems etcetera) for that OS/processor combination. So C will work but depending on the OS other languages will work too.

Note that you don't need to do any actual programming on the device itself. Instead a machine code image is prepared outside the device on another computer (a host). The image is transferred somehow onto the device and stored somewhere in memory of some sort. A permanent so called bootstrap program on the device then can be asked to set up and start executing the image. The image could contain both the OS (of your own making or someone else's) and all application software (such as the user GUI interface). This kind of host-device developments require special tools such a cross-compilers.

---

Finally I suggest you consider basing your device not only on an existing OS but on an existing single-board computer. This will improve you quality of life immensely . But again, everything depends on the nature and purpose of your device of which I know nothing. And again, I urge you to seek expert advice.

Re: Best languages/programs for GUI design?

I'm kind of assuming it's like a small computer with a processor, RAM and ROM memory and I/O hardware?

That's right

Originally Posted by wolle

writing your own OS is a possibility but porting an existing OS may still be the better option

Raspberry PI sounds interesting and I will definitely have a deep look into this.

Originally Posted by wolle

Every processor has an instruction set called machine language. Just a notch above the machine language is the Assembly language, a different one for each family of processors. It will never be outdated since this is how you code for a specific processor at the very lowest level. The next higher language is C. Almost all close-to-the-processor coding takes place in a mixture of C and Assembly. The more C you use the better since it's more general and at a higher conceptual level than Assembly.

Sounds like having knowledge of assembly and C will be useful then. I also suppose knowing a language like C is similar to C++ and C# etc and may make it not too difficult to learn a higher level language.

I assume 'machine language' is the most primitive language with hardware and gadgets etc. A hierarchy sounds like this: machine language (instructions for the CPU) > assembly (writing the OS) > C (& others compatible with the OS - writing the GUI & applications)?

Re: Best languages/programs for GUI design?

Originally Posted by manufacturer

Sounds like having knowledge of assembly and C will be useful then. I also suppose knowing a language like C is similar to C++ and C# etc and may make it not too difficult to learn a higher level language.

C and Assembly (for the processor in question) will definitely be used to write an OS or to port an OS. C can also be used to program the user interface (with a GUI) and all other systems software you will want on the device.

Another important aspect of C is that it's a part of C++ so by learning C you have also learned the basics of C++. In addition, C is not part of but has influenced many other languages including C# and Java.

So considering your project I can say without hesitation that C is the language for you to learn.

I assume 'machine language' is the most primitive language with hardware and gadgets etc. A hierarchy sounds like this: machine language (instructions for the CPU) > assembly (writing the OS) > C (& others compatible with the OS - writing the GUI & applications)?

That's correct but I would use a slightly different terminology.

Machine language is the most concrete and specific of languages since it's how a certain processor (a CPU) is physically controlled. All other languages are generalisations and abstractions in various ways and to various degrees.

No one really programs in machine language, instead an Assembly language is used. At the next higher level is C. One could call it the mother of all Assembly languages. It's much more convenient for the programmer and there's always a C compiler available that can turn any C program into a corresponding Assembly program (and ultimately machine language) for any processor known to man. A slight exaggeration maybe but that's how all-important C is.

Re: Best languages/programs for GUI design?

Definitely sounds like C is the best language to learn!

Originally Posted by wolle

No one really programs in machine language, instead an Assembly language is used. At the next higher level is C. One could call it the mother of all Assembly languages. It's much more convenient for the programmer and there's always a C compiler available that can turn any C program into a corresponding Assembly program (and ultimately machine language) for any processor known to man. A slight exaggeration maybe but that's how all-important C is.

Does this mean that assembly is not really necessary to learn if it can just be converted from C?

Re: Best languages/programs for GUI design?

Does this mean that assembly is not really necessary to learn if it can just be converted from C?

Yes, for your current project C is the best language to learn and a good grounding for whatever languages you may consider in the future.

Most C compilers take a C program and converts it into the Assembly language of the target processor. Then in a second step the Assembly language program is further compiled into machine language.

The main reason you may want to bypass C and write code directly in Assembly language is efficiency. Even though C compilers are very smart there are situations when a clever programmer can beat them. The best approach in my view is to start with a C version and then resort to Assembly only when there's a performance issue. This is a strategy that works well in all of programming. Stay on top as much as possible and go native only when you absolutely have to. Another reason for learning Assembly is because you may need to understand existing code written by someone else.

Re: Best languages/programs for GUI design?

The best approach in my view is to start with a C version and then resort to Assembly only when there's a performance issue.

In the case of an OS, there could be circumstances whereby you need to code directly in assembler language because the required sequence of machine instructions can't be generated from c code. For some assembler languages (eg for x86 but not x64), this can be done by 'in-line' assembler code within a c program. Also, if you are going to write an OS or similar, then you also need to think about debugging. Debugging an OS or similar is at a whole different level than debugging a c application within an IDE!

IMO for this type (OS, GUI subsystem etc) then you should at the very least have a good understanding of the processor architecture and the assembler/machine code. Whilst you may not need to actually write much assembler code, you almost certainly will need to understand it sufficiently to debug at the machine code level.

All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

Advertiser Disclosure:
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.