If a feature is not supported on a platform natively what would a programmer do? For example, when building an iphone app, if you are trying to slide a picture(just as an example- I know you can slide a picture) and it’s not supported natively. What would a programmer do? Same thing with a programming language. If something is not supported natively in a java for example what would a programmer do to overcome that? I tried googling it, but I guess either I am not using the right words. Again, this is not an implementation issue. I am not building an application where I ran into this problem. I am just trying to understand the theory behind this.
5
You have options:
-
Use a preexisting polyfill. A lot of the JavaScript libraries like jQuery, for example, have historically covered over weak parts in this browser or that browser’s JavaScript or DOM capabilities. So, they resemble the putty-like product in the UK that fills a hole or gap in a wall. Frameworks are frequent homes to polyfills.
-
Build your own shim. A shim is like a polyfill, in that it adjusts what you have to what you want. It comes from pieces of wood (or other solid material) used to level uneven floors, or fill in gaps. Code the feature yourself, using whatever tools, APIs, or capabilities you find lying about. Sometimes this is feasible, sometimes it is not (based on how hard it is to write, or whether the platform primitives come close to supporting what you want to do).
-
Go without. There are many cases where building a feature yourself is not feasible, and there are no easy, ready, or affordable alternatives. In which case you make do without, and declare that kind of feature or activity not available on that platform. In some cases, you can design around the gap, in others it’s tough luck–just not available on this platform. Web sites that use Adobe Flash long faced this problem on Apple iOS devices. There is no official support for Flash, and Apple worked hard to make sure that there was none, and no easy/good workarounds besides.
0