Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it a bad idea to design and develop a python applications backend and then once finished try to apply a GUI to it?

Is it better to do it all at once? I'm very new to wxPython and I'm thinking it would be better to write the program in a way familiar to me, then apply the wxPython gui to it after I'm satisfied with the overall design of the app. Any advice?

like image 341
tehryan Avatar asked Dec 28 '09 03:12

tehryan


People also ask

Is Python good for GUI applications?

They make a particular kind of application easier to create, or a particular language easier to work with. A GUI framework for Python makes developing the user interface for your application far easier than trying to code it by hand in Python.

What is wxPython used for?

wxPython is a cross-platform GUI toolkit for the Python programming language. It allows Python programmers to create programs with a robust, highly functional graphical user interface, simply and easily.

What are GUI applications?

A graphics-based operating system interface that uses icons, menus and a mouse (to click on the icon or pull down the menus) to manage interaction with the system.


1 Answers

This is a viable approach. In fact, some programmers use it for the advantages it brings:

  • Modular non-GUI code can then be tied in with different GUIs, not just a single library
  • It can also be used for a command-line application (or a batch interface to a GUI one)
  • It can be reused for a web application
  • And most importantly: it can make unit-testing of the code easier.

However keep in mind that it requires some careful design. You'll want your "logic code" to be free from GUI constraints, and sometimes it is difficult (especially when the code relies on GUI idioms like an event loop).

like image 147
Eli Bendersky Avatar answered Oct 01 '22 19:10

Eli Bendersky