By "framework", I was thinking of something like
Zend Framework for PHP. Something that would just guide you through creating well-structured code.
For example, newbies (and others) often mix modeling logic and scene drawing in the draw() loop. I think it is mostly inappropriate. Let's take an example, say you want to move objects and render them on screen. Often you see things like :
Code:void draw() {
for (int i = 0; i < balls.length(); i++) {
balls[i].move();
balls[i].display();
}
}
Modeling logic (moving the balls) and scene drawing (displaying the balls) statements are all mixed in the same loop. If your modeling logic gets more complicated (say, you want the balls to bounce on each other) then the code above is not the easiest to start from. It is much better to start with something like :
Code:void draw() {
model();
view();
}
void model() {
// modeling stuff
for (int i = 0; i < balls.length(); i++) {
balls[i].move();
}
}
void view() {
// rendering stuff
for (int i = 0; i < balls.length(); i++) {
balls[i].display();
}
}
Sure, you don't need a framework to build a simple application. You don't even need it to build well-structured code or to implement a design pattern, but it's easier to do so with some guidelines (especially if you are a new to programming).