Search This Blog

Friday, February 8, 2019

Integration between Angular-6(Angular-2.x) and WebSphere portal

Hi everyone,

I tried integration between angular-6 and WebSphere portal.
It works but with some problems, I did NOT recommend to integrate angular-6 with WebSphere portal due following :

1- You need to create separate portlet for each portal page,
suppose you created angular-portlet-1, and you need to add on multiple portal pages then you need to set specific portal page (hard-coded) inside tag <base> tag on portlet.

So you can’t use this portlet with different pages,you need to duplicate your angular portlet code if you want to add on multiple portal pages through set pages paths inside <base> tag.

2- WebSphere portal URL parameters will truncated which kept WebSphere portal behaviors, from my opinion i think this is fetal error, because WebSphere portal keeping its behavior on this encrypted parameters. (i.e. IPC, Portlet mode, ..etc)

3- You can’t create portal page for specific component inside portlet, you need to switch through components using links inside page or directly from URL address bar. Because portal theme iterate on portal pages only, its can’t iterate though angular component unless your hard-coded components URIs.

4- You can’t add two angular portlets in same page, you will get ‘Error: Zone already loaded’.

5- Now WebSphere portal act as Tomcat !!!
Yes if you going to use WPS to host angular portlets so why you need to purchase licence ?
Even you have content, you can use free-tools, or use WCM engine only and integrate though WCM rest services.

Angular 2.x issues:

6- For important application, i think its not recommend to build your business logic using Typescript, because all those scripts will transfer to client browser, then he can reverse engineering, also JavaScript its not reliable language to build important business such banking or government.

7- If you need to leverage your application and enhance performance, you need to utilize your application technology.
I think Angular-JS it very good option to use as front-end for your portlet because its working under portal umbrella not working as SPA.

8- Angular-2 export application in just four JS files, so in huge application these files sizes will be more than 10 MB, and maybe cause some issues with browsers. (I am not sure about this issue can cause an issue with browser or no)

Summary, I think selecting angular option based on your system, if you need to develop simple system you can use scrip-portlet with one component (no router-outlet), but if you have big system go with spring-portlets with Angular-JS asfront-end, then you can use Java and WPS power and benefits with fast performance from angular.


Thanks

No comments:

Post a Comment