Практический инструментарий GUI?

Вы не должны подписываться на наблюдаемое внутри трубы. Это анти-паттерн. Используйте вашу более высокую наблюдаемую и mergeMap с combLatest, чтобы получить то, что вы хотите:

this.backend
.request(
  'v1/users',
)
.pipe(
  mergeMap(items => {
    const requestUserWithCatArray = items.map(user => this.categories.getName(user['id']).pipe(
        map(category => {
             user['category_id'] = category['id'];
             return user;
        })
    ));
    return combineLatest(requestUserWithCatArray);
  })
);

Он вернет массив пользователей с их категорией.

14
задан Peter Mortensen 10 September 2010 в 08:21
поделиться

10 ответов

Я бы пошел с Qt. Он работает на всех основных платформах и постоянно совершенствуется. Вы также можете начать очень быстро. Есть привязки для Java, Ruby и Python.
Кроме того, это бесплатно, если вы пишете программы с открытым исходным кодом.

20
ответ дан 1 December 2019 в 06:54
поделиться

Honestly, I've built things with Tk, wx, and Qt, and I hate them all equally. Qt's visual editor is the least obnoxious of the three I think.

7
ответ дан 1 December 2019 в 06:54
поделиться

WX all the way! I am not a GUI expert, designer or a even a "GUI guy", but recently I needed to write a front end for a product config tool (actually it's a collection of tools, but we wanted a single interface to access and run them all).
The tools are all written in Python so naturally I turned to Python for the UI.
I settled on wxPython... one "import wx" and a few tutorials later, I was banging out frames, notebooks and button panels like I knew what I was doing.
I found plenty of examples to help me when I got stuck and the wxPython docs were very useful - although they are just C++ docs, they were still pretty intuitive.
A quick web search will turn up tons of wxPython tutorials to get you started.

I've written and refactored the UI couple times, but I had a clean, working prototype in < 1 day. The tool was cross platform and all the windows and frames matched the native window system (WinXP, Win2K3, Gnome, etc.) - I was definitely impressed. If I ever have to write UIs in any other language I will certainly be looking for a wx implementation.

4
ответ дан 1 December 2019 в 06:54
поделиться

Tk is still a very viable solution. The learning curve depends a lot on you. Many folks, like myself, can or have learned all the fundamentals of Tcl and Tk in about a day. There are those that still fight the syntax after years of use. It all depends on how good you are at "unlearning" things you've learned with traditional languages like C and Java. If you have any lisp in your background you can probably learn Tcl in a morning.

Another benefit to Tk is the fact it works with Tcl, Perl, Python and Ruby (and others) so you aren't stuck with a particular language. Though, there's no direct port of Tk to Java. Learn it in one language and your knowledge will transfer over pretty easily to other languages. Tk comes out of the box with Tcl and Python so for those languages there is nothing else to install.

I will say, though, after writing several hundred lines of Python/Tkinter code the past few weeks I much, much prefer coding in Tcl when it comes to GUIs, but that's more of a personal thing than anything else.

For more on Tk with Tcl, Ruby and Perl see http://www.tkdocs.com

3
ответ дан 1 December 2019 в 06:54
поделиться

Если вы рассматриваете Java, SWT - отличный кроссплатформенный инструментарий GUI.

2
ответ дан 1 December 2019 в 06:54
поделиться

Я не работал с Qt, поэтому не могу судить об этом, но я работал с wx, и с ним довольно легко работать, и при этом он довольно экономичен. Кроме того, wxWidgets предоставляет вам собственные виджеты на каждой платформе, что является огромным преимуществом (особенно для Mac). В то время как другие имитируют внешний вид собственной платформы, wxWidgets напрямую использует собственные виджеты, что во многих ситуациях быстрее.

1
ответ дан 1 December 2019 в 06:54
поделиться

I recommend Gtk. It is a nice, cross-platform, good-looking toolkit. It is designed with language bindings in mind and allows create nice language bindings (pygtk, ruby/gtk2, java-gnome, gtk# and more). Gtk+ is quite easy to learn.

1
ответ дан 1 December 2019 в 06:54
поделиться

If Java is your preferred language, consider Groovy. It is a really nice dynamic language that sits on top of Java, and has some really nice features (SwingBuilder) with respect to writing GUIs. If it wasn't for the fact I'm highly productive in Tcl/tk, I think Groovy would be my personal second choice even though I'm not a big fan of Java or Swing per se. Groovy looks to take a lot of the tedium out of both of those.

For more information see GUI Programming with Groovy.

1
ответ дан 1 December 2019 в 06:54
поделиться

Я настоятельно рекомендую книгу Rapid GUI Programming python development . Страница автора .

Я помню, что Elsevier выпустила книгу с Python-GUI, но теперь ссылка и название ускользают от меня.

2
ответ дан 1 December 2019 в 06:54
поделиться

Я просто хочу упомянуть, что Qt - это намного больше, чем просто набор инструментов GUI. Вы получаете гораздо больше с его помощью, все прекрасно интегрировано в структуру, что было бы хорошо использовать его, если вы рассматриваете кроссплатформенную разработку. Единственная проблема заключается в том, что если вы хотите использовать его через привязку Python PyQt, вам придется либо заплатить за коммерческую лицензию PyQt (дорого), либо за свой код GPL.

0
ответ дан 1 December 2019 в 06:54
поделиться
Другие вопросы по тегам:

Похожие вопросы: