What’s the difference between widgets and portlets?
In this post we examine what differentiates widgets from portlets, and explain how the Entando Widget and Plugin framework provides additional functionality and portability.
If you’ve used Entando even a little bit, you’ll already know that we’ve built our platform on easy reusability and that our widgets play a big role in making up the “easy” part. But there’s another technology out there called portlets that can look similar to the Entando widgets’ architecture and raise the question: what’s the difference between them and why have we hitched our wagon exclusively to widgets?
Let’s first take a look at what each one is, to better clarify what they are not. Widgets and portlets are both interface-based rather than based on logic, meaning they interact with the user instead of coming equipped with their own code-based logic. They are both able to communicate with other portlets and other widgets, and both are able to pull context from other sections of the page they’re on. And finally, they’re both easy to work with because they have their own code that’s independent of the rest of the page, and they’re movable simply by dragging and dropping.
So what are the differences? There are two major ones:
Where they run
Generally speaking, portlets do all of their calculations on the server side. These actions produce HTML fragments which then get assembled into a complete page with styling and cookies that the server delivers as a finished product to the client browser.
Entando widgets, on the other hand, decouple their style, data, and rendering, allowing the browser to assemble them along with other client-side components.
Where each application runs also determines the amount of heavy lifting it can do. By virtue of being server-side, portlets are able to handle complex calculations that require significant data manipulation or demand complex logic.
Widgets are smaller and better suited for simple calls such as those that display calls to a weather database. However, their diminutive size also makes them easier to deploy, cheaper to host, and the browser can load them as the user scrolls down the page rather than all at once.
Portlets are, of course, becoming antiquated at this point. Client-side rendering, while slightly more difficult to do at the onset, offers too many advantages for firms looking to find an edge in today’s ultra competitive markets.
We also have taken advantage of what the widget itself offers. A core principle of Entando’s business model is reusability, and the widget’s decoupled design allows our customers to develop their widgets for easy reuse across applications. Add our widgets enable the use of REST APIs for communicating with cloud services and Spring MVC that allows us to separate integrate disparate systems and widgets become an even clearer victor.