wvmarle:
Detecting the dog passing through the door can be done in many ways - detecting in WHICH DIRECTION he's going is a much harder problem.
You could mount two sensors in a row on the way out into the garden. And then whatever sensor alerts first will tell you in which direction the dog is moving.
Depending on the actual layout of your sliding door, this could actually be done simply with two motion sensors mounted to the wall next to your door. The disadvantage would be that they would alert to any object, dog or person.
Or maybe you could mount a third sensor about two or three feet high. That way, the system could distinguish between people walking upright and dogs.