Читать книгу Beginning Programming All-in-One For Dummies - Wallace Wang - Страница 42

Writing your program

Оглавление

Some people write the program first and then design a UI around it. Other people design the UI first and then write the program to work with it. The whole point of event-driven programming is to separate your program from your UI so you can focus on making each part work individually.

Event-driven programming focuses mostly on designing a UI and making it work, but it does little to help you write your actual program. To write your program, you can use structured programming or object-oriented programming (or both, or neither).

After you’ve written your program, you “attach” the program to your UI by writing event handlers. Event handlers “glue” your UI to your actual program. With event-driven programming, you can be pretty sure that your UI will always work perfectly. You just have to worry about errors in your main program.

Beginning Programming All-in-One For Dummies

Подняться наверх