I have heard about both terms Injectable
and Embeddable
many times, but I am not getting actual meaning of it.
Please help me to understand both clearly.
Injectable
means that something can be created and added to the main script while the script is running.
Embeddable
means something can be added to a script or code before running it i.e before compilation or running of the script.
For better understanding lets take a website with a textbox as a context.
Now, In the textbox, suppose its very basic one. So, I can add a javascript
into the textbox and when I will submit, it will run my JS script. This way, I am injecting
my own script into the main page.
Now, suppose, I add an Iframe
of another website to the HTML file of my website. In this way, when the website will be viewed, it contains the iframe. In this way, the Iframe is embedded
to the website.
Injectable means that the object can be created and injected at run time. This is a hint to the compiler that this object will be managed outside the scope of the compilation and can be used at runtime to determine if the object was intended to be injected.
Embeddable means that the object can be serialized and stored in a column instead of as a separate table when the containing object is persisted. That also implies the lifetime of the embedded object is the same as the lifetime of the containing object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With