As a seasoned local I'd rather poke my eye out with a fork than venture into the city for a celebration on the 4th of July.
However, as a visitor to the city being here on the 4th is the most exciting place on earth! July's in DC are hot and steamy (emphasis on steam!)! For the absolute best seats in the house, take the Metro to Arlington Cemetery and walk the pathway towards the parkway and river. The Park Service blocks off the area, we head towards the marina near the Pentagon as there are normally facilities. Bring blankets and plenty of water!
Another plan is to head to the Capitol (via Gallery Place or Federal Center Metro). The National Symphony hosts a special 4th event on the West Front lawn.
As for boat rides on the fourth. There are many cruises. I would recommend staying in Old Town and walking to our waterfront and catching a cruise to watch the fireworks! There are several other companies that do cruises. The Dandy is another riverboat company that includes dinners and you can walk from the waterfront to the pier here in Old Town. The Spirit of Washington is located at the SW Waterfront. This location is problematic, however due to lack of egress.
I recently enjoyed a Washington Stay-cation at the Kimpton Donovan House at Thomas Circle. They have a rooftop pool and the views are pretty spectacular. The W Washington Hotel also has a rooftop area, you should check directly with the hotels as I believe special events will drive access.
Also, we here in Alexandria enjoy our own birthday celebration on the Saturday (normally a week) following the fourth. We enjoy our own small town fireworks on the riverfront at Oronoco Park. Our party will be this week on the 13th. Our own sympony and the howitzers from the Quantico Marine Base make it a very special event! Watch for announcements as you approach the schedule for next year!
I hope this is helpful.
Edited: 7:17 am, July 08, 2013