With bumblebee gobies, the female becomes much more round in the belly than the male when it's gravid. During breeding time, the male will become an intense yellow and dart around the tank dancing for the females and attacking other males.
With violet gobies, don't worry about it. You might be able to sex the goby by looking at its urogenital papilla, but I've never heard of anybody doing that with aquarium specimens. Breeding them is very difficult and does not occur often. In fact, if you plan on keeping both of your violet gobies in the same tank, you'll probably end up needing a very large tank, because they can be very territorial and their fights are nasty.