Windows program==one big class.

Started by
13 comments, last by tHiSiSbOb 20 years, 3 months ago
quote:Original post by the_dannobot
It''s already been done. MFC is an object oriented wrapper around win32.
Many bad things have already been done.

It is generally a bad idea because monolithic software is more difficult to maintain, and one main class would pretty much have to be monolithic.
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
Advertisement
I plan to make my main() look like this:
int wWinMain( HINSTANCE, HINSTANCE, LPSTR, int ) {    new Kernel();    Kernel::GetSingleton.Run();    Kernel::Destroy();    return 0;}   
quote:Original post by the_dannobot
It''s already been done. MFC is an poorly designed and overly complex object oriented wrapper around win32.

There you go.
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis
quote:Original post by Zahlman
quote:Original post by Invader X
There isn't anything wrong with it if you are using C# or Java.


o__O

"Everything is a class" != "it's ok to use just one class". WTF.


He did not specify the size of the program. Of course it's not very intelligent to always use a single class but for small programs in those languages a single class might be fine.

Colin Jeanne | Invader's Realm

[edited by - Invader X on January 18, 2004 3:43:11 PM]
One reason to try to split it up a little is because usually it''s better to make small parts of the working application that you can debug and make sure they''ll work.

If something goes wrong, it''s often easier to find the error this way.

You can also more easily work several people on the same project. If you''re not part of a team, this is no problem for you.

It''s also easier from a design point of view... searching through a large .cpp file is just time consuming, and using one(1) .h-file with several(>1) .cpp-files are just bad design and can confuse a lot IMO. Hope you understand what I mean by this.

But sure, for small->medium size applications I could imagine this being a good solution.

Albert
-------------------------------------------http://www.thec.org

This topic is closed to new replies.

Advertisement