Victims of alleged crimes attending court will have the right not to see the defendant before or after their case under a new code that comes into force today.