For a good dinner, I would do what O-Town Hockey suggests. Get away from the crowds where the restaurants are not quite as busy. It is isn't just the line-ups but the quality of service and the meal that can suffer when there is pressure to move too many people through a restaurant on Canada Day. Elgin Street is a good location (south of the end of the boulevard), a bit away from the busyness but still within walking distance of the action.
You are getting some good advice about where to be for the fireworks. One of the worst places is in front of the Parliament Buildings.
Canada Day is an all day event, starting in the morning and running until 10 pm when the fireworks show takes place. There are events on Parliament Hill starting at 9 am until noon followed by a show until 1:30 pm and then the main show in the evening 6:30 pm to 10 pm. Of course, you can spend all day walking around the various venues mentioned by others here. Whereever the crowds are, there is something going on. Here is a useful link
http://www.canadascapital.gc.ca/canadaday/ . It should be mentioned that the Queen will be in Ottawa on Canada Day this year. I don't know whether there will be any public appearances but usually there are from past experiences.