I am wondering which will be a better option in terms of server resources.
If there is a portlet called WeatherPortlet and if I want to create another portlet called CanadaWeatherPortlet. Which option is better
1) Clone the Weather Portlet to create CanadaWeatherPortlet OR
2) Define another portlet (CanadaWeatherPortlet) in portlet.xml
Thanks in advance
posted 5 years ago
I think neither of those proposals is a good idea, because in each way you'll 've a lot of duplicated code.
I would create just one portlet, the WeatherPortlet. If I've the requirement, that on page A this portlet has to be the CanadianWeatherPortlet and on page B you need a USAWeatherPortlet, then I would define a (country- or locale-)parameter. To create your pages A and B, and to set specific country-parameter for your portlet(-instances) you can create an XMLAccess-Script.