| Subject: |
|
Misunderstandings about QP and how to get started... |
| Name: |
|
Miro Samek |
| Date Posted: |
|
Jul 16, 08 - 10:21 AM |
| Email: |
|
miro@quantum-leaps.com |
| Website: |
|
http://www.quantum-leaps.com |
| Message: |
|
Recently, I received a few letters from new users of QP, which suggest that there are some misunderstandings about what QP is and how it is supposed to be used. I believe that my reply might be of general interest, so here is what I wrote to these new QP users:
QP is a state machine framework, which allows you to code your applications as a set of concurrently running hierarchical state machines (UML statecharts). In this respect, QP is like MFC or .NET frameworks. These are software libraries, which facilitate application development.
QP is *NOT* a visual design automation tool. This means that there is no special IDE, in which you would draw state diagrams and generate code at a press of a button. Instead, you *manually* code your state machines by following a handful of very simple rules. The process of manual coding state machines in QP/C is described in the online QP/C Tutorial at http://www.state-machine.com/doxygen/qpc/tutorial_page.html.
When you gain a little practice in manual coding of UML state machines, you will find out that the coding is actually a non-issue. The real work is always in designing the state diagrams in the first place.
You can draw your state diagrams any way you like, but I strongly recommend that you always draw the diagrams before starting to code. If you use Microsoft Visio, Quantum Leaps offers a Visio stencil for drawing UML state diagrams at http://www.state-machine.com/resources/goodies.htm.
I would strongly recommend that you study the "QP/C Tutorial" and that you actually run the example code on your PC. You should focus on understanding how the example application has been designed and how the state machines were coded in C.
The new book "Practical UML Statecharts in C/C++, Second Edition" (http://www.state-machine.com/psicc2) contains a lot of examples and information about designing effective state machines. Also, tThe Quantum Leaps website at www.state-machine.com offers a lot of information about designing state machines. For example, you can study state machine design patterns at http://www.state-machine.com/devzone/patterns.htm.
Miro |
|
|
|
|
|
|