Is a single page web-app suitable for portlet
i have a web application that is build as single page. Through one user session, it stores lots of DOM and JS objects on client side. So if browser refreshes my app, it starts from very beginning, except user sing-in, etc.
And i am looking forward for a way to migrate this application to portlet. I have experience with portlets but it was before AJAX era.
The problem is, although my app can live inside a portlet happily, other aspects of portal, like other portlets, portal pages, do ref开发者_如何学编程resh browser with their links.
Is there a standard (JSR) or non-standard way to handle this problem ?
Portlets should make no assumptions at all regarding the behavior of other portlets or the portlet container. So, strictly speaking, your application isn't suitable for a portlet container. That doesn't mean however, that it is impossible to work as such. Ask your self the following questions:
- Am I using the portlet in a container that I have full control over it or am I going to distribute it to others?
- In my environment, is it safe to assume that no other portlet in the page is going to refresh the page?
- Will users find it acceptable to have your application as the single portlet of the page? If yes, you could mandate that it is so.
Depending on the above answers you could determine yourself whether it is acceptable to use your application as a portlet.
精彩评论