Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

For learning purpose, I am trying to figure out the ways to create a Rapid Application Development tool in C on Windows through Win32 apis.

Purpose of tool:
1. To make the user feel very easy to Create GUI when compared to that of writing 100's of lines of code instead.
eg: Providing Drag and Drop options of windows and enabling re-sizing options etc.,
2. To enable a small scripting mechanism, through which the user can actually handle events of the GUI that he is preparing for.

Now there are two parts in creating the RAD tool and are mentioned as below.

1. Front end part.
2. Back end part.

Front end part: It is the main GUI interface which is very similar to any of the IDEs provided by the C/C++ compiler.

Back end Part: Here I am struck. Once the user prepares his GUI application, I want to know the best ways to make the final executable a stand alone program. I dont know if this is possible at all.

May be i can elaborate a bit more here. Once the user is done with his design of the application through my tool, what are the ways you can suggest me to make the program a stand alone executable.

Please note that I do not want to write a new compiler to convert the User design to machine code through my tool here. But instead i want to make the tool as a scripting utility instead for the user rather than pure low level coding that is done in other languages and which consumes a lot of time.

May be on linux, you can consider the shell scripting utility where the user can end up writing code for his application through various commands embedded in a file and then finally run the shell script at the command prompt.

May be once you review the above and ask me more details about what exactly i am trying to do, i can add more by way of response.

Please suggest.
Posted
Updated 4-Jun-12 11:08am
v2

You have basically two choices:

1. Write a compiler
2. Write an interpreter

If you write a compiler, you don't necessarily have to generate machine code, your compiler can generate C or C++ or C# code which is then fed to an an appropriate compiler. Or you can generate java-bytecode and run the thing in the JVM or you can generate CIL and use the CLR.

If you write an interpreter, you'll find that you have to do a lot of the same things you'd have to do to write a compiler.

The advantage of writing a compiler is that testing is often simpler since you just need to examine the output and verify it is what you expected from the input.
 
Share this answer
 
Comments
nv3 4-Jun-12 18:20pm    
Good answer. +5.
Albert Holguin 5-Jun-12 0:24am    
The advantage of an interpreter is that you can sandbox your applications and they never crash the system.....lol, sorry I couldn't say that without laughing... they almost never crash the system (better). Good answer, +5
Rapid Application Development (RAD) tools usually generate ugly non human readable code that will then be compiled normally by the supporting languages (C, C++, C#, ...).

The difficulty is to match the design aspect (GUI) to the code (matching events, for examples).

The front-end is quite simple (but it is a lot of work), you need to create your UI for everything you want to support (GUI, events, ... ) (have a look at how Visual Studio is working).

The back-end is (can be) quite complex, translating the "design" to workable compilable code; this means manually (via your own code) create the functional code.

for example, if you add a button to a dialog and you want to add an event, you will need to add the code to create the button to the existing dialog (CreateWindow, ...) and add events (for example either via message maps (MFC), or handle events in DlgProc functions, ... )

Visual Studio could be considered a RAD tool, have a look at how it is working:
- The resource editor UI will create a RC file that will be compiled by the resource compiler.
- The different wizard that will add code (classes, methods, variables, events, ... ) to code that will be compiled by the C/C++ compilter.




Good luck.
 
Share this answer
 
Comments
Albert Holguin 5-Jun-12 0:27am    
I don't know if I'd consider Studio a rapid prototyping tool...but then again I don't like most "rapid prototyping" tools (and I hate the Studio wizards too)... so maybe that's a good thing. :)
Sergey Alexandrovich Kryukov 5-Jun-12 1:13am    
Wow! It so good to meet people thinking reasonably. All those "designers" means a lot of manual work, in any practically significant products. They are created mostly to please lamers and give them the delusion they really do some work. Coding with writing text is the order of magnitude more productive, set aside much better for maintenance. However, when used in a minimalistic manner and very carefully, those tools could be used.

I voted 5 for this answer.

Cheers,
--SA
Albert Holguin 5-Jun-12 9:45am    
lol... I think what bothers me most about them is that the people using them never learn exactly what it is that is taking place behind the scenes and never get a good understanding of what they're doing. Then eventually we see them at CP with questions when the wizards don't work.
TRK3 5-Jun-12 13:41pm    
My favorite "rapid prototyping" tool is paper and a pencil.

The user interface is totally intuitive -- it lets you get you create your prototype almost instantly.

And best of all -- there is no pretense that it actually writes production quality code for you. You are forced to throw away your prototype and do a complete re-write when you actually need to create the production version.
Albert Holguin 5-Jun-12 13:58pm    
lol, if I could +5 this comment I would...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900