This type of situation is easily avoided by keeing your dog on a lead in public.
Dont be a school teacher little fish, the lads looking for advice after the fact, not advice on how he could of avoided the situation, which Im sure he will know by now.
I'm not being a school teacher, just offering advice as requested by the original poster. My dogs have been attacked by loose dogs and in my opinion it is unacceptable but easily avoided.