G
G
gunya2011-07-28 14:11:05
Python
gunya, 2011-07-28 14:11:05

Application architecture - book question and challenge

What are some good books to read on how to build an application?

For example, now I am writing a bot for one xmpp-based python game.
I am using xmpppy. So far, I decided to do this:

When generating a message, make modules according to xmlns, that is, to get a profile, something like bot.send

( gameApi.iq.ProfileIq( id ) ) will

be done
.Iq( payload = getProfile( id ) ) )

The problem is that I don't know how to organize handlers for incoming messages:
you can make a function gameApi.event.GameHandler(), LeaderHandler and so on, and attach them to the bot, for example or create a class that will register them automatically.

At the same time, the game is divided into three stages, here I have no idea what to do:
The stage opens with a message from the server, the handler processes it, then (I guess), it is worth calling the stage processing function, for example, smth.StageOneProcess().

Suggest what to read on this topic and your own solution, show the jambs in my solution.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anatoly, 2011-07-28
@taliban

If you really want to understand architecture (assuming you're already quite experienced and have read quite a few books) then just make a bot. When it's ready, do it again, but in a different way, and then redo it again. After the third time, you will have a beautiful, polished and understandable code + invaluable experience from reflections and mistakes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question