Simplifying web apps with smart components
So far in this chapter, we have learned about the principles of effective web application design. Now, we can move toward the user experience, which should always be simple, intuitive, and aesthetically pleasing.
The approach with the radio button, from a functional point of view, works very well but makes things a little bit too complex because it requires the user’s intervention at the beginning and draws an ugly radio button on the screen.
The other approach is very neat and extremely clean because just a file uploader widget is present on the screen and the user can select the file by just clicking on it (or using drag and drop) without any other kind of intervention.
This is possible because the web app intercepts the file type property and uses it to open the file and read its content by selecting the proper library.
This kind of approach is quite smart and delineates the difference between an application made by a...