4 ms·
I've written web apps professionally for years now. I recently went back and wrote a GUI app. It was horrifying. First, I had to pick a language. Then a GUI
by wccrawford 16y ago
I've written web apps professionally for years now. I recently went back and wrote a GUI app.
It was horrifying.
First, I had to pick a language. Then a GUI framework. Finding a combination of those that was cross-platform was trivial... As long as the answer was 'Java' and 'Swing'. -sigh-
I really wanted to write it in Ruby, but Shoes was not a good solution (too many features missing... Ones that I desperately needed) and all the other GUIs required special installation, or weren't up-to-date in the Ubuntu repos.
In the end, I chose Mirah. Java, but with some Ruby-ish syntax. That was it's own special torture because it's such a new language that there isn't much out there in the way of documentation or examples. (One time that I complained about that, someone suggested I contribute some. https://github.com/wccrawford/TV-Director https://github.com/wccrawford/TV-Director is sample that is the answer to that.)
- davidw 16y ago> all the other GUIs required special installation, or weren't up-to-date in the Ubuntu repos. If you can get past the snide comments by "in the know" people who used it in 1998 and didn't like it, Tcl and Tk are actually still a good way of doing cross platform GUI development, depending on what your needs are.
- ebiester 16y agoNeed: not ugly as sin.
- davidw 16y agoNeed: to look at what Tk looks like these days, not in 1998. Is it perfect? No. It has improved a lot though, and if you want cross platform, you're probably never going to get "Apple beautiful". You're going to get a jeep, that gets you where you need even if it's not as nice to look at as the Ferrari. Tk also screwed something up that PHP later copied in a certain sense: it made it really easy for people to do something. Many of those people were not "qualified" to create UI's and thus went on to make some really ugly stuff. Moral of the story: if you create tech that makes things significantly easier, lowering barriers to entry, try and foster a culture that helps create "beautiful" results.
- ebiester 16y agoDo you know of any representative applications that show this off?
- Yoric 16y agoTruth be told, the only cross-platform GUI solution I found that works was, well, HTML. All the more reasons to make web development better. Edit: I initially wrote "GUI framework".
- blub 16y agoHTML is not a GUI framework, it's a markup language. Furthermore, HTML + CSS are a way to create documents that's been hacked together to create so-called apps.
- Yoric 16y ago> HTML is not a GUI framework, it's a markup language. Fixed, thanks.
- wccrawford 16y agoInterestingly enough, one of the solutions I looked for was a way to design my interface in HTML, since I was a lot more used to it. I didn't find anything that was far enough along to bother with it for a GUI app, and I couldn't really make it work right as a web-page that communicated with a local process on the server to launch certain other GUI apps. But it was a neat thought. :)
- blub 16y agoYou had to pick a language and then a framework as opposed to web development where we are born with the knowledge? In fact it is not horrifying, it is nicer than writing web-apps. Pick either Qt with C++/Python, Java or C#/Mono and you're good to go.
- wccrawford 16y agoThe point is that someone went from GUI apps to Web apps and was horrified at having to pick all that stuff. I did the exact opposite and was equally as horrified.
- lobster_johnson 16y agoThe very idea of cross-platform GUI frameworks is a fallacy. That's because in GUIs, the important stuff is in the details; but platforms are all different, in different ways, so on each platform, care must be taken to offer the best possible experience. Most toolkits (Swing, Fox, Tk, Qt etc.) work around this problem by ignoring it and merely instating their idea of what a GUI should be, or offering the lowest common denominator. So you end up with non-native widgets that don't "feel" right, bad performance (often because you can't take advantage of the platform's native graphics stuff) and all sorts of impedace-mismatches in the integration with things like file dialogs. The only way to do good cross-platform GUI development is to go full MVC and isolate the non-visual parts from the UI to the point where the UI bits are just controllers and views that interact with a generic backend. This way, the UI is small enough that it's relatively trivial to custom-build a UI for each platform, making sure that each UI gives the optimal user experience for that platform. It's more work, but it's considerable less work than writing a cross-platform GUI toolkit. With some careful planning, a lot of GUI-technology-independent code may be factored out. For example, a toolbar can be abstracted out in a generic implementation that the native implementation can invoke to make decisions. In a 2D-drawing app, the entire graphical buffer system can be platform-independent. And so on. I know just one app that is implemented as a cross-platform GUI yet is equally "slick" on all platforms: Spotify. The app is written in C++ and draws its own widgets, but uses native widgets for things like input fields. However, Spotify's UI is very simple, and it camouflages its non-nativeness by using a dark colour scheme with some pretty neutral/browser-like design choices.