I'm not sure about walking on the sidewalk downtown, I have heard of one person who claims it is okay for him as long as he has his recommendation, but I would assume that depends on your local cops attitude torwards medical marijuana. Personally I think it's disrespectful because marijuana smoke can get others around you high, so I wouldn't do it more out of respect rather than avoiding a legal issue, but I do think it would be smart to not try it. As for on the porch of your apartment, many apartments complexes have rules against drugs, and Prop 215 does not specifically protect you, but even if having your recommendation did I wouldn't do it if the smoke was bothering your neighbors. Many apartment complexes have so many rules that if they really don't like something you are doing they can find another rule you are breaking as a reason to evict you, so for that reason I wouldn't do it unless you know your neighbors are cool with it, as well as your landlord.

In general you should remember that other people might not like smelling marijuana smoke, so it is wise to be respectful of that and keep your medication privately when possible.