开发者

Is it possible to create an application WITHOUT a framework?

I was just thinking.开发者_如何学Go C# has Winforms/WPF, Java has Swing and other frameworks, C++ has QT and so on; is it possible to create an application without using a Framework?

Putting aside the practicality of it, I'm just curious. How would one create an application that Just Works(tm) without needing external frameworks?


Two options come to mind:

  • Classical Win32 applications written in C. I don't know if standard Windows SDK API also counts as an "external framework" in your book, but that's as low as it gets.
  • DirectX/OpenGL games written from scratch with your own homebrew framework (not external, right?) There you get to do all the drawing yourself - although again, you use a pretty big library of primitive drawing functions.

If you want even less "framework", you'll have to code your own OS and drivers. :P


C# needs .NET Framework, not WinForms (which is an optional library used by some application). The same with Java.

Unmanaged (native) applications usually use some runtime library - the library of common functions. You can write a native application without any library - the compiler lets you do this, but you will need to (re)write lots of common functions, eg. for string manipulation etc..


Firstly, what is a framework?

Really a framework is just a bunch of code that is provided to you. You could, at least in theory, write the same code yourself. In that case you wouldn't be using a framework.

Your application can only do what the operating system allows it to do. Your program cannot directly manipulate the graphics card for example. So you have to use the APIs of your operating system in order to do anything.

So you are going to be calling into other code. (unless you write your own operating system). You will also being using another framework or api to get stuff done.


Yes. How: in the way that the frameworks you mentioned are implemented.


From a Windows point of view, you would register your window with Windows, then listen to window messages and react as required. Everything would be up to you - from drawing the window to building controls.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜