GUI library: how long does it take to write one from scratch?

For one C ++ programmer, how long does it take to write a graphical interface from scratch?

Rough specification:

  • You have access to enhancement functions, image loading, font subroutine, signal slot, unicode string lines, varaint classes. (basically Qt 4 minus the actual gui (everything comes from QWidget)).
  • You will need to implement standard controls such as tree structures, table views, text editors, a list, a combo box, buttons, radio buttons, panels, etc.
  • The structure is separate from the operating system and does not use any OS objects (window descriptors). That is, you work on a bitmap or in an OpenGL window and receive mouse / keyboard events from the OS that you must send / interpret.
  • There are several windows that can be moved / minimized / maximized, delivered to the fore.
  • It should be possible to use a library to override any rectangular window using this library (think of a Win98 gui with animation effects disabled).
  • You do not need to display html pages.
  • You cannot cut corners, make a bitmap in the ms mask, split it on the screen and say "this window". The components have geometry, a custom color, can be changed, β€œtied” to different sides of the window, connected to each other and affect each other in size and geometry (think about the Qt 4 layout system).
  • Programmer's knowledge - the average value is above average, at least 3 years of experience with C ++.

Basically, a "Windows desktop" without using gdi windows.

I ask because I work on guys who develop something similar from scratch (their needs are very unusual, and afaik no existing gui structure that I know matches them), and I have a suspicion that I too can work slowly, which negatively affects my "morale".

Previous people spent 3 years on this project (they wrote it in Delphi) and could not complete it, so the responsible guy decided to abandon it and start from scratch. The project is very different from traditional guis, but should have somewhat identical complexity.

For comparison, I need a rough estimate (with arguments or based on work experience) from another programmer.
My assessment is that it will take about 1 year or longer, but I would like to know if it takes too long.

+4
source share
2 answers

According to Wikipedia , Qt development began in 1991 with two developers. They founded Trolltech in 1994. The initial release of Qt was one year later in 1995, so it was at least 2 person-years in full (1994-1995) plus any time spent on it until 1994.

The fact is that when they founded Trolltech, they probably already had a decent enough product to take on the financial risk of the company, so these two extra person-years are just the tip of the iceberg. And depending on the investments they could use, they may have hired other people to help them.

Even if you take into account all the main functionalities that are not related to the GUI (the easiest part to write, IMO) and use a very optimistic estimate, this is still a few man-years for the initial GUI part of Qt. Quite far from 3 months, your boss expected from you ...

+3
source

I would say that, given that you spent a week planning the structure of the library and put together all the functions that you want to include in it, you could complete it in 6 months. It all depends on the amount of extensibility you want for it, but I think the year is too long.

This, of course, is all under the assumption of many years of experience with C ++ and some experience in developing a graphical interface. It would also benefit from the look if you or a colleague had experience with graphic design in something like Photoshop to create various interface skins.

Hope this helps.

0
source

Source: https://habr.com/ru/post/1486403/


All Articles