Hot answers tagged

47 votes

"Dead programs tell no lies" in the context of GUI programs

Quoting the same passage from the book (emphasis mine): One of the benefits of detecting problems as soon as you can is that you can crash earlier, and crashing is often the best thing you can do. ...
Robert Harvey's user avatar
24 votes

"Dead programs tell no lies" in the context of GUI programs

I think you are asking the wrong question. IMHO it is pretty obvious that the principle applies especially in the context of GUI (and other UI) applications, and one should better ask if it applies ...
Doc Brown's user avatar
  • 206k
11 votes

"Dead programs tell no lies" in the context of GUI programs

In short Yes, early crash is an advisable approach also for GUI, but at the same time, the robustness expectations being higher, one shall seek to minimize as much as psosible the risk of reaching an ...
Christophe's user avatar
  • 76.6k
7 votes
Accepted

Should a State Machine or Processing Engine be abstracted away from the UI?

I've worked with UI for many years, and my experience says that you should always abstract as much program functionality away from the UI as you possibly can. UI's are complicated enough to reason ...
Robert Harvey's user avatar
7 votes

"Dead programs tell no lies" in the context of GUI programs

It depends. In theory, everything is possible and terminating the whole process is the only safe course of action. In practice, we (= my company) do the following: When an unexpected error occurs in ...
Heinzi's user avatar
  • 9,748
7 votes
Accepted

What was the first company to make a drag-and-drop GUI designer like Visual Basic?

HyperCard for the Macintosh, an application development tool with an integrated database, scripting, and drag-n-drop GUI builder was released in 1987 - several years before Visual Basic.
JacquesB's user avatar
  • 58.7k
6 votes
Accepted

Creating a private in-house application with Qt

Use of a software internally is not considered a conveyance by the GPL, so you wouldn't have to give source code to anyone. The moment you decide to distribute your software to any third party, then ...
whatsisname's user avatar
  • 27.7k
6 votes
Accepted

Standard for implementing GUIs for command line utilities

What's most favorably looked upon I think is to actually write SweetApp and libsweetapp together, with the SweetApp commandline application a full-featured but minimalist CLI wrapper around the ...
whatsisname's user avatar
  • 27.7k
6 votes
Accepted

How can a GUI display unsolicited output?

In the case of StackExchange, the technology which allows the server to push notifications to the client is WebSocket. You can check it yourself: open the developers tools and refresh the page; you'll ...
Arseni Mourzenko's user avatar
6 votes

TDD for Graphics application

When people use the term "Test Driven Development" it's often assumed they're talking about unit testing code. But there are other types of tests you can use to drive your development. If you do want ...
user1118321's user avatar
  • 4,993
6 votes
Accepted

At what stage should the (G)UI be designed?

From a real-life business standpoint, tools come in the back of the to-do list. I agree with your suggested list, though I'd move some things around a bit: Functional requirements. I'm not talking ...
Petras Purlys's user avatar
6 votes
Accepted

DRY principle vs decoupling (business from GUI)

However, what I find suspicious is the duplication between the 2 models. Between the MVC model (for GUI) and the business model. Vehicle has 30 fields (give or take). So, the interface has 30 getters ...
Flater's user avatar
  • 48.7k
6 votes

What was the first company to make a drag-and-drop GUI designer like Visual Basic?

I believe NeXT had its Interface Builder tools a couple years before the first VB iteration (not sure when Alan Cooper started his work, but IB predates VB 1.0). It's descendant of another tool built ...
rbanffy's user avatar
  • 413
5 votes
Accepted

If I create a desktop application using Tkinter, PyGTK or PyGame does my app have to be open source?

[ this is not legal advice, also I am not a lawyer, if you want a specific legal interpretation, please consult a lawyer ] It seems tkinter is licensed under the BSD license, so should be OK for your ...
Vatine's user avatar
  • 4,259
5 votes
Accepted

Why use X11 windows extensively in a GUI toolkit?

...it seems like just getting your toplevel from the window system and drawing / managing everything else on your own would be less of a hassle in a cross-platform setting. In a world where the ...
Blrfl's user avatar
  • 20.3k
5 votes
Accepted

GUI applicaton states and polymorphism

One can use MVP (Model View Presenter) here. This decouples the view from the view's logic and is typically used to make views exchangable, but there is no reason why it cannot also be used to ...
Doc Brown's user avatar
  • 206k
5 votes

Choosing the right paradigm when building a GUI for an application

I've seen a program from a vendor shipped with two UIs, i.e. as a GUI and as a console program. They're implemented as two EXEs calling a common DLL. And by using the DLL's API (ignoring both of the ...
ChrisW's user avatar
  • 3,417
5 votes

TDD for Graphics application

It depends on what your code is doing, i.e. what is the actual logic you need to test. I presume that your application uses an API in order to draw objects such as circles, lines, etc. In this case, ...
Arseni Mourzenko's user avatar
5 votes
Accepted

How Would I Create Bindings to a GUI toolkit like GTK, Tk, or Qt for a Programming Language?

You would use the language's foreign function interface (FFI) to call out to the C bindings. You can look at how other languages have done this, like pygobject. It's not easy though. You have to ...
Karl Bielefeldt's user avatar
5 votes

How do you achieve encapsulation while "separating view and business logic"?

One of the core principles of OOP is encapsulation - you're supposed to subdivide your state between different classes and make it so the only way to work with that state is via the public functions ...
Bart van Ingen Schenau's user avatar
5 votes
Accepted

MVC: Should View get strings of GUI components directly or should the controller pass strings to View?

In a traditional MVC architecture, the view should interact with the model to get domain model data. But fixed strings (i.e. not domain data) still belong to the user interface itself. The view should ...
Christophe's user avatar
  • 76.6k
5 votes

What was the first company to make a drag-and-drop GUI designer like Visual Basic?

I'm not aware of any direct predecessor to Visual Basic. It was regarded as a novel idea that later products emulated, and the commercial development took place entirely in-house at Microsoft. I also ...
Steve's user avatar
  • 8,436
4 votes

Using ObserverPattern, but need to stop some observers displaying changes immediately

You may be interested in using something like Reactive Extensions to do some more complex event processing. Specifically, using the Sample Filter might be just want you want here. If you combine all ...
MetaFight's user avatar
  • 11.6k
4 votes
Accepted

Whats a proper way to design a GUI event system?

For this answer I will assume that widgets are not, and cannot be operating system windows. Appetizer: keyboard input. The idea is that some widget has keyboard focus. You keep track of what widget ...
Theraot's user avatar
  • 9,091
4 votes

A desktop app which incorporates a REST API?

Mixing a REST service and a GUI app is likely possible but would be pretty unusual. It would probably be much easier to work with a GUI app that talks to the RESTful service, even if both run on the ...
Hans-Martin Mosner's user avatar
4 votes
Accepted

How are windows at program startup called?

This type of window is called a "Splash Screen" It is quickly shown before all of the program has loaded and initialized in memory. Later versions of this support a progress bar to show ...
Edwin Buck's user avatar
3 votes

If I create a desktop application using Tkinter, PyGTK or PyGame does my app have to be open source?

In general, the output of a GPL or LGPL program is not covered by the license unless it includes source code from the program itself. Some compilers do this. When that happens, generally an ...
Robert Harvey's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible