Just Because You Can, Does Not Mean You Should
If you have seen the movie Jurassic Park, you may be familiar with the line above. In the scene, Dr. Malcolm played by Jeff Goldblum tries to explain to the owner of Jurassic Park that dinosaurs went extinct on purpose. He attempts to raise the serious ethical issues surrounding not only the resurrection of numerous extinct species, but also the ones with large appetites and pointy teeth. Ultimately, the worst case scenario occurs when the park systems fail, and the dinosaurs begin rampaging around the island, hungry for fresh scientist meat. Software is only slightly different. As engineers, we have many options available to us. It is our due diligence to recuse ourselves from implementing ill-sighted solutions.
Blazor presents its own set of novel difficulties. For example, it represents the first time we can combine a responsive and dynamic web framework with a fully featured language such as C#. Until now, JavaScript and the slightly less frustrating TypeScript were all we had (like alligators and chickens). The key difference is that JS and TS are scripting languages, whereas C# is an application language. This is magnified by the dotnet ecosystem that exists around C#, where many more possibilities exist (think sequels!).
When you design a component, ask yourself the following questions:
Does this component enable an end-user to view or interact with my application?
And...
Am I enabling the end-user to do so in the simplest way possible?
This definition does not make any assumption regarding the following:
- How data in the application is persisted
- How data in the application is retrieved
- How the UI deals with logic
Good engineering is straightforward and easily understood. Complicated problems may have simple solutions. Blazor can develop an entire solution with a single language. This doesn’t mean we forget our experiences. It means we build on them.
Blazor for developers is both a blessing and a potential curse. It allows us to employ a single technology stack that keeps development friction to a minimum. It also gives us a modern framework to build web applications that have the durability to last for years. It can also be used to overcomplicate if we allow it. Keep the responsibility of Blazor to interacting with the end-user and you won't end up with a malfunctioning, carnivorous theme park.
Molen, G. (Producer), & Spielberg, S. (Director). (1993). Jurassic Park [Motion Picture]. United States: Universal Pictures