Describe the key principles and considerations involved in designing an earthquake-resistant building. Discuss the various structural and non-structural measures that can be implemented to enhance the building's performance during seismic events. Include an explanation of the concepts of base isolation and energy dissipation devices. How do these concepts contribute to the overall seismic resilience of a structure?