the other driver know that you are putting the brakes on. i will go further on the driver who is driving behind you but here again you must not assume that this driver is alert and is a safe distance away from you. paying attention to the back is very important though you may not be the cause of the accident but who wants to be in an accident regardless of who is at fault.
in the case of (2), coming towards you, you also need to pay full attention as this driver may decide to turn in and cross the street in front of you. it is amazing but sometimes 