Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

[09:09:29 CDT(-0500)] <Arvids> hey, EricDalquist

[09:09:41 CDT(-0500)] <EricDalquist> good morning/evening Arvids

[09:09:49 CDT(-0500)] <Arvids> (smile)

[09:09:58 CDT(-0500)] <Arvids> I wanted to ask regarding AJAX portlets

[09:10:12 CDT(-0500)] <Arvids> is https://wiki.jasig.org/display/PLT/AJAX+in+a+Portlet still applicable to v4.0?

[09:10:37 CDT(-0500)] <Arvids> I'm trying to figure out the basic architecture for translation portlet

[09:10:38 CDT(-0500)] <EricDalquist> no, in 4.0 just use the Resource support in the portlet 2.0 spec

[09:10:55 CDT(-0500)] <Arvids> i've no experience with it (sad)

[09:10:55 CDT(-0500)] <EricDalquist> that approach will still work, since it is completely within the 1.0 spec

[09:11:12 CDT(-0500)] <EricDalquist> its pretty easy, let me find an exampl

[09:11:22 CDT(-0500)] <Arvids> that whould help me a lot

[09:11:49 CDT(-0500)] <EricDalquist> the calendar portlet does it: https://source.jasig.org/portlets/CalendarPortlet/trunk

[09:12:14 CDT(-0500)] <EricDalquist> finding specific files ....

[09:13:23 CDT(-0500)] <EricDalquist> so in this JSP: https://source.jasig.org/portlets/CalendarPortlet/trunk/src/main/webapp/WEB-INF/jsp/calendarWideView.jsp

[09:13:43 CDT(-0500)] <EricDalquist> look for the <portlet:resourceURL/> tag

[09:13:50 CDT(-0500)] <EricDalquist> that generates a URL that will result in a resource request

[09:14:10 CDT(-0500)] <EricDalquist> then here is the spring 3.0 annotated controller that handles the resource request: https://source.jasig.org/portlets/CalendarPortlet/trunk/src/main/java/org/jasig/portlet/calendar/mvc/controller/AjaxCalendarController.java

[09:14:25 CDT(-0500)] <EricDalquist> are you familiar at all with the resource request features of portlet 2.0?

[09:14:51 CDT(-0500)] <Arvids> just heard about them

[09:15:18 CDT(-0500)] <Arvids> Looks like i'll have another reading material (smile)

[09:15:19 CDT(-0500)] <EricDalquist> it essentially lets you make requests to a portlet where the portlet has complete control over the response

[09:15:41 CDT(-0500)] <Arvids> yes, that's what i was assuming

[09:15:42 CDT(-0500)] <EricDalquist> there is no portal rendered content, so you can return JSON, binary image date, etc...

[09:16:02 CDT(-0500)] <Arvids> ahh... well.. that's the key here

[09:16:06 CDT(-0500)] <EricDalquist> the big advantage of resource urls over that AJAX in a portlet approach from portlet 1.0 is fewer requests

[09:16:35 CDT(-0500)] <Arvids> how does that come?

[09:16:40 CDT(-0500)] <EricDalquist> the ajax in a 1.0 portlet approach results in a POST then 302 redirect to a servlet

[09:17:19 CDT(-0500)] <EricDalquist> the POST is done to an action URL so that the portlet can handle the request, it sets up the data to return and sticks it in the session then redirects to a servlet

[09:17:28 CDT(-0500)] <EricDalquist> and the servlet actually writes the data out from the session

[09:17:40 CDT(-0500)] <Arvids> yes, i'm familiar with that workflow

[09:17:42 CDT(-0500)] <EricDalquist> where as the resource approach is just a single request

[09:18:03 CDT(-0500)] <EricDalquist> the portal passes it on to the portlet for handling and simply returns whatever the portlet returns

[09:18:13 CDT(-0500)] <Arvids> ok

[09:18:40 CDT(-0500)] <EricDalquist> when athena was doing testing the removal of that redirect actually made a pretty significant change in performance of the portlet

[09:18:56 CDT(-0500)] <Arvids> sounds good

[09:19:21 CDT(-0500)] * athena looks up

[09:19:27 CDT(-0500)] <athena> hey Arvids (smile)

[09:19:32 CDT(-0500)] <Arvids> hey

[09:19:47 CDT(-0500)] <EricDalquist> just talking about resource requests for ajax versus the old post/redirect approach from portlet 1.0

[09:19:49 CDT(-0500)] <athena> and yes, definite performance boost from JSR-286 and eliminating 302 redirects

[09:19:51 CDT(-0500)] <athena> was kinda surprised

[09:19:53 CDT(-0500)] <Arvids> i believe it's very early morning for you, athena (smile)

[09:19:59 CDT(-0500)] <athena> 7:19am (tongue)

[09:20:07 CDT(-0500)] <athena> usually try and start at 7:30, up a bit early today

[09:20:10 CDT(-0500)] <athena> lots to do!

[09:20:14 CDT(-0500)] <athena> i'm sure it's late where you are

[09:20:30 CDT(-0500)] <Arvids> work time has finished 20 minutes ago (smile)

[09:20:59 CDT(-0500)] <Arvids> but I wanted to try my hand into developing that translator portlet

[09:21:35 CDT(-0500)] <Arvids> I'd like to see it as very dynamic so that user can choose a message to translate and immediately translate it

[09:21:43 CDT(-0500)] <athena> that'd be really fantastic

[09:21:50 CDT(-0500)] <Arvids> layout of portlet might be someething like this: https://imo.im/translate?lang_code=lv

[09:22:05 CDT(-0500)] <athena> that makes sense

[09:22:50 CDT(-0500)] <Arvids> hmm... i'll have to send a wireframe on dev list tomorrow

[09:23:07 CDT(-0500)] <EricDalquist> sounds great

[09:23:38 CDT(-0500)] <Arvids> and one more thing - i see no really big advantage of using flows in this portlet... is it okay if i'll use good old controllers?

[09:23:39 CDT(-0500)] <athena> awesome (smile)

[09:23:53 CDT(-0500)] <athena> yeah, i just use vanilla spring portletmvc for a lot of stuff

[09:24:12 CDT(-0500)] <athena> i think flows only make sense when you have something that's a multi-step form type process

[09:24:22 CDT(-0500)] <athena> for simpler stuff it just gets awkward

[09:24:27 CDT(-0500)] <Arvids> ok, it's just that i saw almost everything done using flows

[09:24:42 CDT(-0500)] * Arvids agrees

[09:24:45 CDT(-0500)] <athena> most of the stuff in uportal itself is so we can reuse subflows, etc.

[09:24:55 CDT(-0500)] <athena> but a lot of our portlets outside of uportal aren't

[09:24:58 CDT(-0500)] <Arvids> yeah, but that's mostly in administrative part

[09:25:04 CDT(-0500)] <athena> and we have some non-flow portlets in uportal too

[09:25:12 CDT(-0500)] <EricDalquist> I'm assuming this portlet would be part of the uPortal webapp

[09:25:18 CDT(-0500)] <Arvids> of course

[09:25:19 CDT(-0500)] <EricDalquist> but I'm fine with it being plain old spring mvc

[09:25:38 CDT(-0500)] <EricDalquist> since I don't believe the UI would be re-usable in other portlets

[09:25:41 CDT(-0500)] <athena> i guess the advantage of flows would be if it had a reason to reuse any of the existing webflows - other than that, doesn't seem like it'd help much

[09:25:43 CDT(-0500)] <athena> yeah

[09:25:56 CDT(-0500)] <EricDalquist> and if it is, it isn't terribly hard to rework a spring mvc portlet into a webflow portlet

[09:29:40 CDT(-0500)] <athena> quite true

[09:30:29 CDT(-0500)] <Arvids> I believe i won't make that portlet perfect, but we need a starting point

  • No labels