Custom Portlet Development

15 messages Options
Embed this post
Permalink
Curtis Garman

Custom Portlet Development

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

For custom portlet development, does anyone know what the best practice is for developing portlets that use a database…should they use the portal database only or is it ok to create connections to multiple databases.  I’m asking from the standpoint of performance and number of connections needed. One obvious benefit of using a separate database for a portlet is that it isn’t tied to the portal and is thus unaffected by portal upgrades…any thoughts and/or ideas?

 

Curtis Garman

Web Programmer

Heartland Community College

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user
defeng ma

Re: Custom Portlet Development

Reply Threaded More More options
Print post
Permalink
It depends on what data you need for your portlet.

We are usually using portal database for any portlet if the data is
available inside the portal database. If not, we will create a JNDI data
source pool in tomcat server for the portlet so that the pool can be
shared by all portlets.

Defeng

IS Application Division
University of Edinburgh

Curtis Garman wrote:

> For custom portlet development, does anyone know what the best practice
> is for developing portlets that use a database…should they use the
> portal database only or is it ok to create connections to multiple
> databases.  I’m asking from the standpoint of performance and number of
> connections needed. One obvious benefit of using a separate database for
> a portlet is that it isn’t tied to the portal and is thus unaffected by
> portal upgrades…any thoughts and/or ideas?
>
>  
>
> Curtis Garman
>
> Web Programmer
>
> Heartland Community College
>
> --
>
> You are currently subscribed to [hidden email] as: [hidden email]
> To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user
>


--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


---
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user

Gary Weaver

Re: Custom Portlet Development

Reply Threaded More More options
Print post
Permalink
In reply to this post by Curtis Garman
Curtis,

uPortal upgrades shouldn't affect other tables beyond the uPortal table
in the same DB afaik, so it should be safe to keep them together.
Nothing in uPortal that I know of would do anything bad (like dropping
all tables in the schema). In fact, it is probably much easier for your
sanity as a uPortal admin to keep them together, because that way
backups and restores for uPortal and portlet data are in sync. Also you
could setup foreign key relationships between your data and the uPortal
data if you wanted. If you were afraid of your portlet messing up
uPortal tables, then you could keep it in a different schema/use a
different user that had only the rights they needed to everything it
touched, but the simplest (and less time-consuming) thing obviously is
to just keep it all together and use the same user. That said, it is
certainly not abnormal for your custom portlets to access other
databases- after all, a big selling point is that portals bring content
from various sources together in one spot.

HTH,
Gary


Curtis Garman wrote:

>
> For custom portlet development, does anyone know what the best
> practice is for developing portlets that use a database…should they
> use the portal database only or is it ok to create connections to
> multiple databases.  I’m asking from the standpoint of performance and
> number of connections needed. One obvious benefit of using a separate
> database for a portlet is that it isn’t tied to the portal and is thus
> unaffected by portal upgrades…any thoughts and/or ideas?
>
>  
>
> Curtis Garman
>
> Web Programmer
>
> Heartland Community College
>
> --
>
> You are currently subscribed to [hidden email] as: [hidden email]
> To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user


---
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user
Gary Weaver

Re: Custom Portlet Development

Reply Threaded More More options
Print post
Permalink
Oops. I meant uPortal tables not table. ;)


Gary Weaver wrote:

> Curtis,
>
> uPortal upgrades shouldn't affect other tables beyond the uPortal
> table in the same DB afaik, so it should be safe to keep them
> together. Nothing in uPortal that I know of would do anything bad
> (like dropping all tables in the schema). In fact, it is probably much
> easier for your sanity as a uPortal admin to keep them together,
> because that way backups and restores for uPortal and portlet data are
> in sync. Also you could setup foreign key relationships between your
> data and the uPortal data if you wanted. If you were afraid of your
> portlet messing up uPortal tables, then you could keep it in a
> different schema/use a different user that had only the rights they
> needed to everything it touched, but the simplest (and less
> time-consuming) thing obviously is to just keep it all together and
> use the same user. That said, it is certainly not abnormal for your
> custom portlets to access other databases- after all, a big selling
> point is that portals bring content from various sources together in
> one spot.
>
> HTH,
> Gary
>
>
> Curtis Garman wrote:
>>
>> For custom portlet development, does anyone know what the best
>> practice is for developing portlets that use a database…should they
>> use the portal database only or is it ok to create connections to
>> multiple databases.  I’m asking from the standpoint of performance
>> and number of connections needed. One obvious benefit of using a
>> separate database for a portlet is that it isn’t tied to the portal
>> and is thus unaffected by portal upgrades…any thoughts and/or ideas?
>>
>>  
>>
>> Curtis Garman
>>
>> Web Programmer
>>
>> Heartland Community College
>>
>> --
>>
>> You are currently subscribed to [hidden email] as:
>> [hidden email]
>> To unsubscribe, change settings or access archives, see
>> http://www.ja-sig.org/wiki/display/JSG/uportal-user
>
>
> --- You are currently subscribed to [hidden email] as:
> [hidden email]
> To unsubscribe, change settings or access archives, see
> http://www.ja-sig.org/wiki/display/JSG/uportal-user


---
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user
Curtis Garman

Re: Custom Portlet Development

Reply Threaded More More options
Print post
Permalink
Thanks for the input guys...one reason why i was asking is because we are bound to have portal database schema changes between major and even minor versions...so in that case you would need to move everything to a new database. I was also asking to see if anyone knew how much impact having multiple (possibly large) connection pools would have on tomcat.

Curtis

On Thu, Oct 1, 2009 at 8:30 AM, Gary Weaver <[hidden email]> wrote:
Oops. I meant uPortal tables not table. ;)


Gary Weaver wrote:
Curtis,

uPortal upgrades shouldn't affect other tables beyond the uPortal table in the same DB afaik, so it should be safe to keep them together. Nothing in uPortal that I know of would do anything bad (like dropping all tables in the schema). In fact, it is probably much easier for your sanity as a uPortal admin to keep them together, because that way backups and restores for uPortal and portlet data are in sync. Also you could setup foreign key relationships between your data and the uPortal data if you wanted. If you were afraid of your portlet messing up uPortal tables, then you could keep it in a different schema/use a different user that had only the rights they needed to everything it touched, but the simplest (and less time-consuming) thing obviously is to just keep it all together and use the same user. That said, it is certainly not abnormal for your custom portlets to access other databases- after all, a big selling point is that portals bring content from various sources together in one spot.

HTH,
Gary


Curtis Garman wrote:

For custom portlet development, does anyone know what the best practice is for developing portlets that use a database…should they use the portal database only or is it ok to create connections to multiple databases.  I’m asking from the standpoint of performance and number of connections needed. One obvious benefit of using a separate database for a portlet is that it isn’t tied to the portal and is thus unaffected by portal upgrades…any thoughts and/or ideas?

 
Curtis Garman

Web Programmer

Heartland Community College

--

You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user


--- You are currently subscribed to [hidden email] as: [hidden email]

To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user


--- You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user
Gary Weaver

Re: Custom Portlet Development

Reply Threaded More More options
Print post
Permalink
Curtis,

Although you should have a development, test, and production
environment, each with their own DB, you could get by with 2
environments (one for dev, one for prod) and 2 DBs (one for dev, one for
prod), just in-general (not even considering an upgrade) to do portlet
development, etc. If you can have more than one server in test and prod,
you're even better off. (We have 3 in production currently.)

For upgrading, you'd first copy the production DB to the test DB and
practice the upgrade in test. Once you think you have it fully figured
out and documented/automated, I'd have the production DB copied to the
test DB once more and practice the upgrade at least once. Then when you
are ready, perform the upgrade in production. Considering what has been
said about the uP 2.5.3 -> 3.1.1 upgrade, I'm still a little hesitant
(but still plan to look into it soon). But, if (say) you are installing
3.1.1+ and you stay up-to-date with upgrades and get help on this list,
you should be ok. I know that isn't providing much detail and is kind of
basic stuff, but maybe it helps a little.

Tomcat deals with multiple connection pools quite well, and the sizes of
those pools are usually limited to how many connections you want to
allow it to have (and what the DB is configured to support, the
environment/resource, the load you expect, etc.). The concept of a pool
is that connections are reused, so you'll want to make sure that the
portlets are written so that they aren't overusing the DBs and aren't
keeping DB resources tied up if they don't need to be. If you have
questions about Tomcat, Java, JDBC, Hibernate, etc. and can't find that
info via Google, then subscribe to [hidden email] and ask
there. There are people there ready to help 24/7. (
http://tomcat.apache.org/lists.html )

Best of luck,

Gary


Curtis Garman wrote:

> Thanks for the input guys...one reason why i was asking is because we
> are bound to have portal database schema changes between major and
> even minor versions...so in that case you would need to move
> everything to a new database. I was also asking to see if anyone knew
> how much impact having multiple (possibly large) connection pools
> would have on tomcat.
>
> Curtis
>
> On Thu, Oct 1, 2009 at 8:30 AM, Gary Weaver <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Oops. I meant uPortal tables not table. ;)
>
>
>     Gary Weaver wrote:
>
>         Curtis,
>
>         uPortal upgrades shouldn't affect other tables beyond the
>         uPortal table in the same DB afaik, so it should be safe to
>         keep them together. Nothing in uPortal that I know of would do
>         anything bad (like dropping all tables in the schema). In
>         fact, it is probably much easier for your sanity as a uPortal
>         admin to keep them together, because that way backups and
>         restores for uPortal and portlet data are in sync. Also you
>         could setup foreign key relationships between your data and
>         the uPortal data if you wanted. If you were afraid of your
>         portlet messing up uPortal tables, then you could keep it in a
>         different schema/use a different user that had only the rights
>         they needed to everything it touched, but the simplest (and
>         less time-consuming) thing obviously is to just keep it all
>         together and use the same user. That said, it is certainly not
>         abnormal for your custom portlets to access other databases-
>         after all, a big selling point is that portals bring content
>         from various sources together in one spot.
>
>         HTH,
>         Gary
>
>
>         Curtis Garman wrote:
>
>
>             For custom portlet development, does anyone know what the
>             best practice is for developing portlets that use a
>             database…should they use the portal database only or is it
>             ok to create connections to multiple databases.  I’m
>             asking from the standpoint of performance and number of
>             connections needed. One obvious benefit of using a
>             separate database for a portlet is that it isn’t tied to
>             the portal and is thus unaffected by portal upgrades…any
>             thoughts and/or ideas?
>
>              
>             Curtis Garman
>
>             Web Programmer
>
>             Heartland Community College
>
>             --
>
>             You are currently subscribed to
>             [hidden email]
>             <mailto:[hidden email]> as:
>             [hidden email] <mailto:[hidden email]>
>             To unsubscribe, change settings or access archives, see
>             http://www.ja-sig.org/wiki/display/JSG/uportal-user
>
>
>
>         --- You are currently subscribed to
>         [hidden email]
>         <mailto:[hidden email]> as:
>         [hidden email] <mailto:[hidden email]>
>
>         To unsubscribe, change settings or access archives, see
>         http://www.ja-sig.org/wiki/display/JSG/uportal-user
>
>
>
>     --- You are currently subscribed to [hidden email]
>     <mailto:[hidden email]> as: [hidden email]
>     <mailto:[hidden email]>
>     To unsubscribe, change settings or access archives, see
>     http://www.ja-sig.org/wiki/display/JSG/uportal-user
>
>
> --
>
> You are currently subscribed to [hidden email] as: [hidden email]
> To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user


---
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user
Gary Weaver

Re: Custom Portlet Development

Reply Threaded More More options
Print post
Permalink
One more thing- if you have questions specific to portlet development
they should go to: [hidden email]

http://www.jasig.org/portlets/mailing-lists



Gary Weaver wrote:

> Curtis,
>
> Although you should have a development, test, and production
> environment, each with their own DB, you could get by with 2
> environments (one for dev, one for prod) and 2 DBs (one for dev, one
> for prod), just in-general (not even considering an upgrade) to do
> portlet development, etc. If you can have more than one server in test
> and prod, you're even better off. (We have 3 in production currently.)
>
> For upgrading, you'd first copy the production DB to the test DB and
> practice the upgrade in test. Once you think you have it fully figured
> out and documented/automated, I'd have the production DB copied to the
> test DB once more and practice the upgrade at least once. Then when
> you are ready, perform the upgrade in production. Considering what has
> been said about the uP 2.5.3 -> 3.1.1 upgrade, I'm still a little
> hesitant (but still plan to look into it soon). But, if (say) you are
> installing 3.1.1+ and you stay up-to-date with upgrades and get help
> on this list, you should be ok. I know that isn't providing much
> detail and is kind of basic stuff, but maybe it helps a little.
>
> Tomcat deals with multiple connection pools quite well, and the sizes
> of those pools are usually limited to how many connections you want to
> allow it to have (and what the DB is configured to support, the
> environment/resource, the load you expect, etc.). The concept of a
> pool is that connections are reused, so you'll want to make sure that
> the portlets are written so that they aren't overusing the DBs and
> aren't keeping DB resources tied up if they don't need to be. If you
> have questions about Tomcat, Java, JDBC, Hibernate, etc. and can't
> find that info via Google, then subscribe to [hidden email]
> and ask there. There are people there ready to help 24/7. (
> http://tomcat.apache.org/lists.html )
>
> Best of luck,
>
> Gary
>
>
> Curtis Garman wrote:
>> Thanks for the input guys...one reason why i was asking is because we
>> are bound to have portal database schema changes between major and
>> even minor versions...so in that case you would need to move
>> everything to a new database. I was also asking to see if anyone knew
>> how much impact having multiple (possibly large) connection pools
>> would have on tomcat.
>>
>> Curtis
>>
>> On Thu, Oct 1, 2009 at 8:30 AM, Gary Weaver <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>     Oops. I meant uPortal tables not table. ;)
>>
>>
>>     Gary Weaver wrote:
>>
>>         Curtis,
>>
>>         uPortal upgrades shouldn't affect other tables beyond the
>>         uPortal table in the same DB afaik, so it should be safe to
>>         keep them together. Nothing in uPortal that I know of would do
>>         anything bad (like dropping all tables in the schema). In
>>         fact, it is probably much easier for your sanity as a uPortal
>>         admin to keep them together, because that way backups and
>>         restores for uPortal and portlet data are in sync. Also you
>>         could setup foreign key relationships between your data and
>>         the uPortal data if you wanted. If you were afraid of your
>>         portlet messing up uPortal tables, then you could keep it in a
>>         different schema/use a different user that had only the rights
>>         they needed to everything it touched, but the simplest (and
>>         less time-consuming) thing obviously is to just keep it all
>>         together and use the same user. That said, it is certainly not
>>         abnormal for your custom portlets to access other databases-
>>         after all, a big selling point is that portals bring content
>>         from various sources together in one spot.
>>
>>         HTH,
>>         Gary
>>
>>
>>         Curtis Garman wrote:
>>
>>
>>             For custom portlet development, does anyone know what the
>>             best practice is for developing portlets that use a
>>             database…should they use the portal database only or is it
>>             ok to create connections to multiple databases.  I’m
>>             asking from the standpoint of performance and number of
>>             connections needed. One obvious benefit of using a
>>             separate database for a portlet is that it isn’t tied to
>>             the portal and is thus unaffected by portal upgrades…any
>>             thoughts and/or ideas?
>>
>>                          Curtis Garman
>>
>>             Web Programmer
>>
>>             Heartland Community College
>>
>>             --
>>             You are currently subscribed to
>>             [hidden email]
>>             <mailto:[hidden email]> as:
>>             [hidden email] <mailto:[hidden email]>
>>             To unsubscribe, change settings or access archives, see
>>             http://www.ja-sig.org/wiki/display/JSG/uportal-user
>>
>>
>>
>>         --- You are currently subscribed to
>>         [hidden email]
>>         <mailto:[hidden email]> as:
>>         [hidden email] <mailto:[hidden email]>
>>
>>         To unsubscribe, change settings or access archives, see
>>         http://www.ja-sig.org/wiki/display/JSG/uportal-user
>>
>>
>>
>>     --- You are currently subscribed to [hidden email]
>>     <mailto:[hidden email]> as: [hidden email]
>>     <mailto:[hidden email]>
>>     To unsubscribe, change settings or access archives, see
>>     http://www.ja-sig.org/wiki/display/JSG/uportal-user
>>
>>
>> --
>>
>> You are currently subscribed to [hidden email] as:
>> [hidden email]
>> To unsubscribe, change settings or access archives, see
>> http://www.ja-sig.org/wiki/display/JSG/uportal-user
>
>
> --- You are currently subscribed to [hidden email] as:
> [hidden email]
> To unsubscribe, change settings or access archives, see
> http://www.ja-sig.org/wiki/display/JSG/uportal-user


---
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user
Paul Gazda

RE: Custom Portlet Development

Reply Threaded More More options
Print post
Permalink
In reply to this post by Curtis Garman
Some javascript/style in this post has been disabled (why?)

We connect to 5 databases in addition to PortalDB via portlets and channels. The databases are either related to 3rd party products or are accessed by applications besides uPortal. We are running with Tomcat 5.5.9 with max active threads in the separate pools ranging from 10 to 100. We have not had any throughput problems on the Tomcat side. Of course, the database servers have to be able to handle the volume.

 

Paul Gazda

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Curtis Garman
Sent: Thursday, October 01, 2009 3:00 PM
To: [hidden email]
Subject: Re: [uportal-user] Custom Portlet Development

 

Thanks for the input guys...one reason why i was asking is because we are bound to have portal database schema changes between major and even minor versions...so in that case you would need to move everything to a new database. I was also asking to see if anyone knew how much impact having multiple (possibly large) connection pools would have on tomcat.

Curtis

On Thu, Oct 1, 2009 at 8:30 AM, Gary Weaver <[hidden email]> wrote:

Oops. I meant uPortal tables not table. ;)


Gary Weaver wrote:

Curtis,

uPortal upgrades shouldn't affect other tables beyond the uPortal table in the same DB afaik, so it should be safe to keep them together. Nothing in uPortal that I know of would do anything bad (like dropping all tables in the schema). In fact, it is probably much easier for your sanity as a uPortal admin to keep them together, because that way backups and restores for uPortal and portlet data are in sync. Also you could setup foreign key relationships between your data and the uPortal data if you wanted. If you were afraid of your portlet messing up uPortal tables, then you could keep it in a different schema/use a different user that had only the rights they needed to everything it touched, but the simplest (and less time-consuming) thing obviously is to just keep it all together and use the same user. That said, it is certainly not abnormal for your custom portlets to access other databases- after all, a big selling point is that portals bring content from various sources together in one spot.

HTH,
Gary


Curtis Garman wrote:


For custom portlet development, does anyone know what the best practice is for developing portlets that use a database…should they use the portal database only or is it ok to create connections to multiple databases.  I’m asking from the standpoint of performance and number of connections needed. One obvious benefit of using a separate database for a portlet is that it isn’t tied to the portal and is thus unaffected by portal upgrades…any thoughts and/or ideas?

 
Curtis Garman

Web Programmer

Heartland Community College

--

You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user

 

--- You are currently subscribed to [hidden email] as: [hidden email]


To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user



--- You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user

 

-- 

You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user
-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user
Curtis Garman

Re: Custom Portlet Development

Reply Threaded More More options
Print post
Permalink
In reply to this post by Gary Weaver
Thanks, I just signed up for the tomcat listserv too

On Fri, Oct 2, 2009 at 8:59 AM, Gary Weaver <[hidden email]> wrote:
Curtis,

Although you should have a development, test, and production environment, each with their own DB, you could get by with 2 environments (one for dev, one for prod) and 2 DBs (one for dev, one for prod), just in-general (not even considering an upgrade) to do portlet development, etc. If you can have more than one server in test and prod, you're even better off. (We have 3 in production currently.)

For upgrading, you'd first copy the production DB to the test DB and practice the upgrade in test. Once you think you have it fully figured out and documented/automated, I'd have the production DB copied to the test DB once more and practice the upgrade at least once. Then when you are ready, perform the upgrade in production. Considering what has been said about the uP 2.5.3 -> 3.1.1 upgrade, I'm still a little hesitant (but still plan to look into it soon). But, if (say) you are installing 3.1.1+ and you stay up-to-date with upgrades and get help on this list, you should be ok. I know that isn't providing much detail and is kind of basic stuff, but maybe it helps a little.

Tomcat deals with multiple connection pools quite well, and the sizes of those pools are usually limited to how many connections you want to allow it to have (and what the DB is configured to support, the environment/resource, the load you expect, etc.). The concept of a pool is that connections are reused, so you'll want to make sure that the portlets are written so that they aren't overusing the DBs and aren't keeping DB resources tied up if they don't need to be. If you have questions about Tomcat, Java, JDBC, Hibernate, etc. and can't find that info via Google, then subscribe to [hidden email] and ask there. There are people there ready to help 24/7. ( http://tomcat.apache.org/lists.html )

Best of luck,

Gary


Curtis Garman wrote:
Thanks for the input guys...one reason why i was asking is because we are bound to have portal database schema changes between major and even minor versions...so in that case you would need to move everything to a new database. I was also asking to see if anyone knew how much impact having multiple (possibly large) connection pools would have on tomcat.

Curtis

On Thu, Oct 1, 2009 at 8:30 AM, Gary Weaver <[hidden email] <mailto:[hidden email]>> wrote:

   Oops. I meant uPortal tables not table. ;)


   Gary Weaver wrote:

       Curtis,

       uPortal upgrades shouldn't affect other tables beyond the
       uPortal table in the same DB afaik, so it should be safe to
       keep them together. Nothing in uPortal that I know of would do
       anything bad (like dropping all tables in the schema). In
       fact, it is probably much easier for your sanity as a uPortal
       admin to keep them together, because that way backups and
       restores for uPortal and portlet data are in sync. Also you
       could setup foreign key relationships between your data and
       the uPortal data if you wanted. If you were afraid of your
       portlet messing up uPortal tables, then you could keep it in a
       different schema/use a different user that had only the rights
       they needed to everything it touched, but the simplest (and
       less time-consuming) thing obviously is to just keep it all
       together and use the same user. That said, it is certainly not
       abnormal for your custom portlets to access other databases-
       after all, a big selling point is that portals bring content
       from various sources together in one spot.

       HTH,
       Gary


       Curtis Garman wrote:


           For custom portlet development, does anyone know what the
           best practice is for developing portlets that use a
           database…should they use the portal database only or is it
           ok to create connections to multiple databases.  I’m
           asking from the standpoint of performance and number of
           connections needed. One obvious benefit of using a
           separate database for a portlet is that it isn’t tied to
           the portal and is thus unaffected by portal upgrades…any
           thoughts and/or ideas?

                       Curtis Garman

           Web Programmer

           Heartland Community College

           --
           You are currently subscribed to
           [hidden email]
           <mailto:[hidden email]> as:
           [hidden email] <mailto:[hidden email]>

           To unsubscribe, change settings or access archives, see
           http://www.ja-sig.org/wiki/display/JSG/uportal-user



       --- You are currently subscribed to
       [hidden email]
       <mailto:[hidden email]> as:
       [hidden email] <mailto:[hidden email]>


       To unsubscribe, change settings or access archives, see
       http://www.ja-sig.org/wiki/display/JSG/uportal-user



   --- You are currently subscribed to [hidden email]
   <mailto:[hidden email]> as: [hidden email]
   <mailto:[hidden email]>

   To unsubscribe, change settings or access archives, see
   http://www.ja-sig.org/wiki/display/JSG/uportal-user


--

You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user


--- You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user
Jason Shao (CampusEAI Consortium)

Re: Custom Portlet Development

Reply Threaded More More options
Print post
Permalink
In reply to this post by Curtis Garman
Curtis,

I¹d strongly recommend **not** having your portlets touch your portal
database - for many reasons, lifecycle separation, better isolation of
misbehaving components, keeping your code cross-platform, enhanced security
controls, etc.

It also in my experience makes developing/testing against mock data
environments or with sample data loads much easier.

Jason

On 9/30/09 6:35 PM, "Curtis Garman" <[hidden email]> wrote:

> For custom portlet development, does anyone know what the best practice is for
> developing portlets that use a databaseŠshould they use the portal database
> only or is it ok to create connections to multiple databases.  I¹m asking from
> the standpoint of performance and number of connections needed. One obvious
> benefit of using a separate database for a portlet is that it isn¹t tied to
> the portal and is thus unaffected by portal upgradesŠany thoughts and/or
> ideas?
>
> Curtis Garman
> Web Programmer
> Heartland Community College

--
Jason Shao
Director of Product Development
CampusEAI Consortium
1940 East 6th Street, 11th Floor
Cleveland, OH 44114
Tel: 216.589.9626x249
Fax: 216.589.9639


Your input is important to improve upon our continuous efforts to service you better. Please e-mail my manager at [hidden email] with any feedback.

CONFIDENTIALITY NOTICE:
This e-mail together with any attachments is proprietary and confidential; intended for only the recipient(s) named above and may contain information that is privileged. You should not retain, copy or use this e-mail or any attachments for any purpose, or disclose all or any part of the contents to any person. Any views or opinions expressed in this e-mail are those of the author and do not represent those of CampusEAI Consortium or the Open Student Television Network. If you have received this e-mail in error, or are not the named recipient(s), you are hereby notified that any review, dissemination, distribution or copying of this communication is prohibited by the sender and to do so might constitute a violation of the Electronic Communications Privacy Act, 18 U.S.C. section 2510-2521. Please immediately notify the sender and delete this e-mail and any attachments from your computer. Warning: Although precautions have been taken to make sure no viruses are present in this e-mail, the companies cannot accept responsibility for any loss or damage that arise from the use of this e-mail or attachments.

---
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user

Gary Weaver

Re: Custom Portlet Development

Reply Threaded More More options
Print post
Permalink
Jason,

Agree with you on lifecycle separation, better isolation of misbehaving
components, keeping your code cross-platform, enhanced security
controls, as well as more easily loading test data, all as general
concepts of things being good ideas.

If the uPortal database stays in operation, is never changed, and the
main churn is around portlet development and rollbacks of portlet data,
I'm sure that it works great.

However, be aware that if you do have data stored for your portlet that
links to uPortal data (like user IDs for example) that the portlet data
might not be as isolated from the uPortal data as you might first think.
If you do a restore (rollback) of uPortal data without also doing a
restore (rollback) of every portlet's data, you could end up with data
integrity issues if anything in the portlet's DB is referring to data in
the other DB. And assuming that is correct, lifecycle separation might
not be as easy as it sounds.

As for misbehaving components and enhanced security, you could use a
different DB user to restrict access while the data is in the same DB (I
think that is what you are saying), however I've not run into a
situation yet where the portlet couldn't be trusted, personally. I'd
like to hear if you have an example of something that caused issues in
your experience. Not to say that it couldn't happen though, and it is a
good idea if it doesn't create too much more work and in-turn cause more
issues operationally later because of the (seemingly small at first but)
added complexity (over the long haul, operationally).

As for the code being cross-platform, yes you should try not to rely on
data that is not uPortal specific if you plan on running it in Liferay
(etc.) in addition to uPortal, but from what I've seen most uPortal and
Liferay (just as an example) portlets have portal-specific
implementation (even those aspiring or even claiming to be JSR-168 or
286 compliant, like at least one that I saw on the Liferay side). For
most people's custom portlets, it might not be worth the time to write
something that is truly non-portal-implementation specific. In the end,
there would be many UI issues to work out with custom portlets if they
switched to a new portal implementation in their custom portlets, in
addition to those other things in the code that are
portal-implementation specific (unless you constantly test against newer
versions of the portals like your team probably does). I'm not saying
that people should just give up and not write portlets that work on
multiple platforms, but I'm just saying that I think you and your team
are probably one of the few doing it (to my dismay and I'm sure others'
as well- but that's life).

As for working with mock data, in your own development DB you could swap
out test data without the portlet data having to be in a different
database than the uPortal data, but I'm sure it is easier as you say to
just rollback fully separated data.

HTH,
Gary


Jason Shao (CampusEAI Consortium) wrote:

> Curtis,
>
> I¹d strongly recommend **not** having your portlets touch your portal
> database - for many reasons, lifecycle separation, better isolation of
> misbehaving components, keeping your code cross-platform, enhanced security
> controls, etc.
>
> It also in my experience makes developing/testing against mock data
> environments or with sample data loads much easier.
>
> Jason
>
> On 9/30/09 6:35 PM, "Curtis Garman" <[hidden email]> wrote:
>
>  
>> For custom portlet development, does anyone know what the best practice is for
>> developing portlets that use a databaseŠshould they use the portal database
>> only or is it ok to create connections to multiple databases.  I¹m asking from
>> the standpoint of performance and number of connections needed. One obvious
>> benefit of using a separate database for a portlet is that it isn¹t tied to
>> the portal and is thus unaffected by portal upgradesŠany thoughts and/or
>> ideas?
>>
>> Curtis Garman
>> Web Programmer
>> Heartland Community College
>>    
>
> --
> Jason Shao
> Director of Product Development
> CampusEAI Consortium
> 1940 East 6th Street, 11th Floor
> Cleveland, OH 44114
> Tel: 216.589.9626x249
> Fax: 216.589.9639
>
>
> Your input is important to improve upon our continuous efforts to service you better. Please e-mail my manager at [hidden email] with any feedback.
>
> CONFIDENTIALITY NOTICE:
> This e-mail together with any attachments is proprietary and confidential; intended for only the recipient(s) named above and may contain information that is privileged. You should not retain, copy or use this e-mail or any attachments for any purpose, or disclose all or any part of the contents to any person. Any views or opinions expressed in this e-mail are those of the author and do not represent those of CampusEAI Consortium or the Open Student Television Network. If you have received this e-mail in error, or are not the named recipient(s), you are hereby notified that any review, dissemination, distribution or copying of this communication is prohibited by the sender and to do so might constitute a violation of the Electronic Communications Privacy Act, 18 U.S.C. section 2510-2521. Please immediately notify the sender and delete this e-mail and any attachments from your computer. Warning: Although precautions have been taken to make sure no viruses are present in this e-mail, the companies cannot accept responsibility for any loss or damage that arise from the use of this e-mail or attachments.
>
> ---
> You are currently subscribed to [hidden email] as: [hidden email]
> To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user
>
>  



---
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user

Eric Dalquist

Re: Custom Portlet Development

Reply Threaded More More options
Print post
Permalink
In reply to this post by Jason Shao (CampusEAI Consortium)
Some javascript/style in this post has been disabled (why?)
For many of the same reasons Jason mentioned we have some separation. Our Oracle databases are run by a separate group and while our portal and portlets use the same database they are all in their own schemas. I would highly recommend at least this level of separation as it helps with backups, upgrades and migration allowing us to be sure that a single schema only affects a single application.

Gary Weaver wrote:
Jason,

Agree with you on lifecycle separation, better isolation of misbehaving 
components, keeping your code cross-platform, enhanced security 
controls, as well as more easily loading test data, all as general 
concepts of things being good ideas.

If the uPortal database stays in operation, is never changed, and the 
main churn is around portlet development and rollbacks of portlet data, 
I'm sure that it works great.

However, be aware that if you do have data stored for your portlet that 
links to uPortal data (like user IDs for example) that the portlet data 
might not be as isolated from the uPortal data as you might first think. 
If you do a restore (rollback) of uPortal data without also doing a 
restore (rollback) of every portlet's data, you could end up with data 
integrity issues if anything in the portlet's DB is referring to data in 
the other DB. And assuming that is correct, lifecycle separation might 
not be as easy as it sounds.

As for misbehaving components and enhanced security, you could use a 
different DB user to restrict access while the data is in the same DB (I 
think that is what you are saying), however I've not run into a 
situation yet where the portlet couldn't be trusted, personally. I'd 
like to hear if you have an example of something that caused issues in 
your experience. Not to say that it couldn't happen though, and it is a 
good idea if it doesn't create too much more work and in-turn cause more 
issues operationally later because of the (seemingly small at first but) 
added complexity (over the long haul, operationally).

As for the code being cross-platform, yes you should try not to rely on 
data that is not uPortal specific if you plan on running it in Liferay 
(etc.) in addition to uPortal, but from what I've seen most uPortal and 
Liferay (just as an example) portlets have portal-specific 
implementation (even those aspiring or even claiming to be JSR-168 or 
286 compliant, like at least one that I saw on the Liferay side). For 
most people's custom portlets, it might not be worth the time to write 
something that is truly non-portal-implementation specific. In the end, 
there would be many UI issues to work out with custom portlets if they 
switched to a new portal implementation in their custom portlets, in 
addition to those other things in the code that are 
portal-implementation specific (unless you constantly test against newer 
versions of the portals like your team probably does). I'm not saying 
that people should just give up and not write portlets that work on 
multiple platforms, but I'm just saying that I think you and your team 
are probably one of the few doing it (to my dismay and I'm sure others' 
as well- but that's life).

As for working with mock data, in your own development DB you could swap 
out test data without the portlet data having to be in a different 
database than the uPortal data, but I'm sure it is easier as you say to 
just rollback fully separated data.

HTH,
Gary


Jason Shao (CampusEAI Consortium) wrote:
  
Curtis,

I¹d strongly recommend **not** having your portlets touch your portal
database - for many reasons, lifecycle separation, better isolation of
misbehaving components, keeping your code cross-platform, enhanced security
controls, etc.

It also in my experience makes developing/testing against mock data
environments or with sample data loads much easier.

Jason

On 9/30/09 6:35 PM, "Curtis Garman" [hidden email] wrote:

  
    
For custom portlet development, does anyone know what the best practice is for
developing portlets that use a databaseŠshould they use the portal database
only or is it ok to create connections to multiple databases.  I¹m asking from
the standpoint of performance and number of connections needed. One obvious
benefit of using a separate database for a portlet is that it isn¹t tied to
the portal and is thus unaffected by portal upgradesŠany thoughts and/or
ideas?

Curtis Garman
Web Programmer
Heartland Community College
    
      
--
Jason Shao
Director of Product Development
CampusEAI Consortium
1940 East 6th Street, 11th Floor
Cleveland, OH 44114
Tel: 216.589.9626x249
Fax: 216.589.9639


Your input is important to improve upon our continuous efforts to service you better. Please e-mail my manager at [hidden email] with any feedback.

CONFIDENTIALITY NOTICE:
This e-mail together with any attachments is proprietary and confidential; intended for only the recipient(s) named above and may contain information that is privileged. You should not retain, copy or use this e-mail or any attachments for any purpose, or disclose all or any part of the contents to any person. Any views or opinions expressed in this e-mail are those of the author and do not represent those of CampusEAI Consortium or the Open Student Television Network. If you have received this e-mail in error, or are not the named recipient(s), you are hereby notified that any review, dissemination, distribution or copying of this communication is prohibited by the sender and to do so might constitute a violation of the Electronic Communications Privacy Act, 18 U.S.C. section 2510-2521. Please immediately notify the sender and delete this e-mail and any attachments from your computer. Warning: Although precautions have been taken to make sure no viruses are present in this e
-mail, the companies cannot accept responsibility for any loss or damage that arise from the use of this e-mail or attachments.

--- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user

  
    



--- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user

  


smime.p7s (4K) Download Attachment
Conan Cook

RE: Custom Portlet Development

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hi,

 

We use SQL Server databases, and have one database instance for the portal and one that is generally used by our portlets��� We access both using a Tomcat-managed connection pool via JND��  We also have a few applications that are obliged to access databases belonging to other areas of the university (e.g. We have a feedback portlet that populates a feedback database managed by a support team, who also receive feedback from other sources which is collated in this database) and these are also accessed in the same wa��  We find the pools are reasonably sized and as the number of databases we access have grown, we haven't seen a significant hit on Tomcat's resource usage��� From day one we've had two databases and it's never been an issue for us.

 

The area where it's probably the biggest pain is in housekeeping, as we have to comply with UK data protection legislation, which requires us to delete user data a certain time after they've left the university; as our housekeeping scripts run independently of Tomcat, they end up being a bit more complex as a result of accessing the disparate data sources, but it's by no means a big problem.

 

Hope this helps!

 

Conan Cook
Senior Applications Developer
Academic Technologies Group (ATG)
University of the West of England
Frenchay Campus
Bristol BS16 1QY

email: [hidden email]
telephone: 01173 281 053

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Eric Dalquist
Sent: 05 October 2009 16:21
To: [hidden email]
Subject: Re: [uportal-user] Custom Portlet Development

 

For many of the same reasons Jason mentioned we have some separation. Our Oracle databases are run by a separate group and while our portal and portlets use the same database they are all in their own schemas. I would highly recommend at least this level of separation as it helps with backups, upgrades and migration allowing us to be sure that a single schema only affects a single application.

Gary Weaver wrote:

Jason,
 
Agree with you on lifecycle separation, better isolation of misbehaving 
components, keeping your code cross-platform, enhanced security 
controls, as well as more easily loading test data, all as general 
concepts of things being good ideas.
 
If the uPortal database stays in operation, is never changed, and the 
main churn is around portlet development and rollbacks of portlet data, 
I'm sure that it works great.
 
However, be aware that if you do have data stored for your portlet that 
links to uPortal data (like user IDs for example) that the portlet data 
might not be as isolated from the uPortal data as you might first think. 
If you do a restore (rollback) of uPortal data without also doing a 
restore (rollback) of every portlet's data, you could end up with data 
integrity issues if anything in the portlet's DB is referring to data in 
the other DB. And assuming that is correct, lifecycle separation might 
not be as easy as it sounds.
 
As for misbehaving components and enhanced security, you could use a 
different DB user to restrict access while the data is in the same DB (I 
think that is what you are saying), however I've not run into a 
situation yet where the portlet couldn't be trusted, personally. I'd 
like to hear if you have an example of something that caused issues in 
your experience. Not to say that it couldn't happen though, and it is a 
good idea if it doesn't create too much more work and in-turn cause more 
issues operationally later because of the (seemingly small at first but) 
added complexity (over the long haul, operationally).
 
As for the code being cross-platform, yes you should try not to rely on 
data that is not uPortal specific if you plan on running it in Liferay 
(etc.) in addition to uPortal, but from what I've seen most uPortal and 
Liferay (just as an example) portlets have portal-specific 
implementation (even those aspiring or even claiming to be JSR-168 or 
286 compliant, like at least one that I saw on the Liferay side). For 
most people's custom portlets, it might not be worth the time to write 
something that is truly non-portal-implementation specific. In the end, 
there would be many UI issues to work out with custom portlets if they 
switched to a new portal implementation in their custom portlets, in 
addition to those other things in the code that are 
portal-implementation specific (unless you constantly test against newer 
versions of the portals like your team probably does). I'm not saying 
that people should just give up and not write portlets that work on 
multiple platforms, but I'm just saying that I think you and your team 
are probably one of the few doing it (to my dismay and I'm sure others' 
as well- but that's life).
 
As for working with mock data, in your own development DB you could swap 
out test data without the portlet data having to be in a different 
database than the uPortal data, but I'm sure it is easier as you say to 
just rollback fully separated data.
 
HTH,
Gary
 
 
Jason Shao (CampusEAI Consortium) wrote:
�� 
Curtis,
 
I��d strongly recommend **not** having your portlets touch your portal
database - for many reasons, lifecycle separation, better isolation of
misbehaving components, keeping your code cross-platform, enhanced security
controls, etc.
 
It also in my experience makes developing/testing against mock data
environments or with sample data loads much easier.
 
Jason
 
On 9/30/09 6:35 PM, "Curtis Garman" [hidden email] wrote:
 
�� 
For custom portlet development, does anyone know what the best practice is for
developing portlets that use a database��should they use the portal database
only or is it ok to create connections to multiple databases.�� ���m asking from
the standpoint of performance and number of connections needed. One obvious
benefit of using a separate database for a portlet is that it i��¹t tied to
the portal and is thus unaffected by portal upgrades��any thoughts and/or
ideas?
 
Curtis Garman
Web Programmer
Heartland Community College
������ 
--
Jason Shao
Director of Product Development
CampusEAI Consortium
1940 East 6th Street, 11th Floor
Cleveland, OH 44114
Tel: 216.589.9626x249
Fax: 216.589.9639
 
 
Your input is important to improve upon our continuous efforts to service you better. Please e-mail my manager at [hidden email] with any feedback.
 
CONFIDENTIALITY NOTICE:
This e-mail together with any attachments is proprietary and confidential; intended for only the recipient(s) named above and may contain information that is privileged. You should not retain, copy or use this e-mail or any attachments for any purpose, or disclose all or any part of the contents to any person. Any views or opinions expressed in this e-mail are those of the author and do not represent those of CampusEAI Consortium or the Open Student Television Network. If you have received this e-mail in error, or are not the named recipient(s), you are hereby notified that any review, dissemination, distribution or copying of this communication is prohibited by the sender and to do so might constitute a violation of the Electronic Communications Privacy Act, 18 U.S.C. section 2510-2521. Please immediately notify the sender and delete this e-mail and any attachments from your computer. Warning: Although precautions have been taken to make sure no viruses are present in this e
-mail, the companies cannot accept responsibility for any loss or damage that arise from the use of this e-mail or attachments.
 
--- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user
 
��������
 
 
 
--- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user
 

This incoming email to UWE has been independently scanned for viruses by McAfee anti-virus software and none were detected


This email was independently scanned for viruses by McAfee anti-virus software and none were found

-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user
Jen Bourey-2

Re: Custom Portlet Development

Reply Threaded More More options
Print post
Permalink
In reply to this post by Gary Weaver
Just to clarify a few issues . . . (comments inline)


On Mon, Oct 5, 2009 at 10:58 AM, Gary Weaver <[hidden email]> wrote:
However, be aware that if you do have data stored for your portlet that
links to uPortal data (like user IDs for example) that the portlet data
might not be as isolated from the uPortal data as you might first think.
If you do a restore (rollback) of uPortal data without also doing a
restore (rollback) of every portlet's data, you could end up with data
integrity issues if anything in the portlet's DB is referring to data in
the other DB. And assuming that is correct, lifecycle separation might
not be as easy as it sounds.

First of all, I'd strongly caution anyone against linking portlet data directly against uPortal IDs.  As of uPortal 3, most of the uPortal table IDs are unique, but are not necessarily consistent over time.  Moving forward, the update process for uPortal requires use of the import/export tool, which preserves fnames, but not primary key IDs.

 
As for the code being cross-platform, yes you should try not to rely on
data that is not uPortal specific if you plan on running it in Liferay
(etc.) in addition to uPortal, but from what I've seen most uPortal and
Liferay (just as an example) portlets have portal-specific
implementation (even those aspiring or even claiming to be JSR-168 or
286 compliant, like at least one that I saw on the Liferay side). For
most people's custom portlets, it might not be worth the time to write
something that is truly non-portal-implementation specific. In the end,
there would be many UI issues to work out with custom portlets if they
switched to a new portal implementation in their custom portlets, in
addition to those other things in the code that are
portal-implementation specific (unless you constantly test against newer
versions of the portals like your team probably does). I'm not saying
that people should just give up and not write portlets that work on
multiple platforms, but I'm just saying that I think you and your team
are probably one of the few doing it (to my dismay and I'm sure others'
as well- but that's life).

Most Jasig portlets take the JSR-168 spec seriously and do not have any portal-specific code.  I know that a number of Jasig portlets successfully run in both Pluto and in Liferay, and some are being used in Liferay in production.  Portlets may occasionally require particular JavaScript frameworks, but these are generally well-known and documented public libraries that may already exist in a different portal.  If they don't, they're generally easy to add. Of course, you're correct that Liferay portlets don't necessarily run in other portal containers.

I can of course sympathize with not wanting to go overboard ensuring your custom code will run on some other portal framework that you're never planning to adopt.  However, it's worth keeping in mind that coding your portlet against the specification helps ensure that it will continue to work across different versions of the same portal framework.

- Jen


--
Jen Bourey
-- 
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user
Gary Weaver

Re: Custom Portlet Development

Reply Threaded More More options
Print post
Permalink
Jen,

Thanks! Response inline...

Jen Bourey wrote:

> Just to clarify a few issues . . . (comments inline)
>
>
> On Mon, Oct 5, 2009 at 10:58 AM, Gary Weaver <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     However, be aware that if you do have data stored for your portlet
>     that
>     links to uPortal data (like user IDs for example) that the portlet
>     data
>     might not be as isolated from the uPortal data as you might first
>     think.
>     If you do a restore (rollback) of uPortal data without also doing a
>     restore (rollback) of every portlet's data, you could end up with data
>     integrity issues if anything in the portlet's DB is referring to
>     data in
>     the other DB. And assuming that is correct, lifecycle separation might
>     not be as easy as it sounds.
>
>
> First of all, I'd strongly caution anyone against linking portlet data
> directly against uPortal IDs.  As of uPortal 3, most of the uPortal
> table IDs are unique, but are not necessarily consistent over time.  
> Moving forward, the update process for uPortal requires use of the
> import/export tool, which preserves fnames, but not primary key IDs.

Just to note- I wasn't advocating tying anything to uPortal specific
implementation in portlet code. :) Just saying that any portlet-specific
user preference data stored in tables for portlets that aren't part of
uPortal have be tied back to the user.

If uPortal data is rolled back in the database, and those (recently
added) users go away, then any user preference data in tables belonging
to portlets that references those users (in any way) would be data not
be tied to the user to which it was intended. (And if you don't delete
that portlet's preferences data, another user with the same identifier
(even if not ID) got created, then that new user could have access to
the old user's preferences, and read their mail, etc.  However, the fact
that portlets would even need their own tables for user-specific
preferences is just a symptom a deficiency in the portlet API's
inability to adequately solve the needs of storing user-specific portlet
configuration/data.)

Similarly, rolling back a database containing portlet preference data
without rolling back the uPortal database would mean missing preferences
for users that were there before (and therefore possibly unhappy users,
possibly).

Thanks for the point about uPortal possibly considering changing the way
that users are stored over time and how the import/export tool works.
That is good to know!

>
>  
>
>     As for the code being cross-platform, yes you should try not to
>     rely on
>     data that is not uPortal specific if you plan on running it in Liferay
>     (etc.) in addition to uPortal, but from what I've seen most
>     uPortal and
>     Liferay (just as an example) portlets have portal-specific
>     implementation (even those aspiring or even claiming to be JSR-168 or
>     286 compliant, like at least one that I saw on the Liferay side). For
>     most people's custom portlets, it might not be worth the time to write
>     something that is truly non-portal-implementation specific. In the
>     end,
>     there would be many UI issues to work out with custom portlets if they
>     switched to a new portal implementation in their custom portlets, in
>     addition to those other things in the code that are
>     portal-implementation specific (unless you constantly test against
>     newer
>     versions of the portals like your team probably does). I'm not saying
>     that people should just give up and not write portlets that work on
>     multiple platforms, but I'm just saying that I think you and your team
>     are probably one of the few doing it (to my dismay and I'm sure
>     others'
>     as well- but that's life).
>
>
> Most Jasig portlets take the JSR-168 spec seriously and do not have
> any portal-specific code.  I know that a number of Jasig portlets
> successfully run in both Pluto and in Liferay, and some are being used
> in Liferay in production.  Portlets may occasionally require
> particular JavaScript frameworks, but these are generally well-known
> and documented public libraries that may already exist in a different
> portal.  If they don't, they're generally easy to add. Of course,
> you're correct that Liferay portlets don't necessarily run in other
> portal containers.

My beef is less with whether they will run or not but how they will look
once they are there, although I'm pretty sure that I've seen portlets on
the Liferay side that have Liferay specific code as you mentioned. If
you deploy a portlet and then have to manually set styles for a bunch of
controls and containers within the portlet in every skin you have, that
makes it a lot less friendly to portal admins (that usually aren't
experts in CSS styling much less specificity rules, etc.) to implement,
and it deters portlet skins from being shared among even the uPortal
community to any measurable extent. While uPortal supports the PLT.C
styles, not only are the styles in JSR-168 inadequate in
number/kind/description of use, but there is no clear and consistent way
either indicated in the JSR-168 spec nor in past discussion for a set of
standards that could be used to define styles outside of PLT.C styles
such that default CSS could be used in the portlets that could easily be
overriden in skins in a consistent way. I am aware that Fluid and those
in Jasig helping with uP have contributed much to try to eliminate this
issue as much as possible, but the fact is that styling and skinning
still has to be one of the biggest impediments (beyond things just "not
working" sometimes obviously ;) ) to the sharing of portlets. I for one
was much less enthused about developing portlets for the community when
I found out how much of a mess that was, and that it wasn't getting any
better with JSR-286 (in fact, if I remember correctly, PLT.C got worse-
in fact stuff like JSR-286 PLT.C.4 and PLT.C.5 having two different
classes for the same parts of tables just shows how much they considered
the importance of CSS, which is not something you can overlook in 2009
like you could in the early-mid 2000's).

Thanks!

Gary

---
You are currently subscribed to [hidden email] as: [hidden email]
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-user