There have been a lot of lessons learned since SW111. The biggest lesson is, IMO, that of a quick response. One of the big problems with SW111 (and AC797) was that delays (a matter of seconds in the case of AC797) made the difference between life and death. The ANA pilot declared an emergency, got the plane on the ground, and got the passengers off ASAP.
It hasn't been clarified which battery was problematic in the most recent 787 incident. If it was the APU (the one that caught fire in Boston) or the main battery, Boeing designed for the "one of those batteries catches fire" case. Both are enclosed in a fire resistant enclosure, and both are designed so that smoke from such a fire is vented away from the cabin. That's a gigantic difference from SW111 and AC797 where the fires occurred in an area that was not designed to contain fire.
There are conflicting reports of smoke, and conflicting reports as to which battery was at fault in the latest instance... but barring smoke in the cabin, it likely wouldn't have ended up much worse (a couple of injuries from using the emergency slides).