Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Jitender Dhiman
Either use single or multiple portlets?
January 17, 2013 6:31 AM
Answer

Jitender Dhiman

Rank: Junior Member

Posts: 29

Join Date: September 21, 2012

Recent Posts

Hi

I want to know that whether it is convenient to work on a single portlet or to have a multiple portlets on same page.

I have a website and i want to deploy it on liferay. Website has various parts showing various things.Like we can see video list and play them,read latest document ,etc ?
So i want to know is it better to use different portlets for all or use one portal and implement all things in that one portal.

If possible please explain also.
Prakash Khanchandani
RE: Either use single or multiple portlets?
January 17, 2013 7:49 AM
Answer

Prakash Khanchandani

Rank: Expert

Posts: 279

Join Date: February 10, 2011

Recent Posts

Jitender Dhiman:

I have a website and i want to deploy it on liferay.


Website to be deployed on Liferay?
Sorry, we can't deploy a whole website in liferay. Though we can deploy portlets. emoticon

Jitender Dhiman:

So i want to know is it better to use different portlets for all or use one portal and implement all things in that one portal.


You are saying "different portlets" and then saying "use one portal", what exactly do you mean to say.

Jitender Dhiman:

I want to know that whether it is convenient to work on a single portlet or to have a multiple portlets on same page.


Will try to answer this in a general way since was not able to understand your question clearly after this line.
It depends on the requirement and also on maintainability.
A single portlet should be used to show the same type of data. Though it can be configured to show different data of the same type for example; Multiple User directory portlet on a single page can be configured to show different Users List like one portlet would show Users of one country, other would show of a certain department etc.

Lets take an example of Documents & Media: Liferay has two portlets for this, 1) Documents & Media 2) Documents & Media Display

DM is for administration purpose (add/update/delete/move/add-repository/check-in etc) and DMD is for displaying the files and folders.
DM portlet can be put only once on a page, but DMD can be put multiple times on a single page and all the different DMD portlets would show different data based on the configuration but still they would only show Files and folders (same type) and not blogs or wikis ;)

Let me know if you have not understood my ramble, and I will try my best to do the needful
Jitender Dhiman
RE: Either use single or multiple portlets?
January 17, 2013 10:12 PM
Answer

Jitender Dhiman

Rank: Junior Member

Posts: 29

Join Date: September 21, 2012

Recent Posts

Thanks Prakash Khanchandani !!



Actually I am new to liferay and we are developing a portal for a company for internal use only .

I want to confirm few things like:
1. Can we use liferay's user management (add user, sign in,database ) in website also (for users login) or we have to develop our own login criteria .
2. How can we perform interportlet communication like update data in one portlet from another.
3. what is best for customized code: using hooks or ext.


Thanks in advance.
Prakash Khanchandani
RE: Either use single or multiple portlets?
January 18, 2013 3:25 AM
Answer

Prakash Khanchandani

Rank: Expert

Posts: 279

Join Date: February 10, 2011

Recent Posts

You are developing a Portal from scratch on liferay?
Or you already have a full fledged working Portal made in some other technology (like PHP, JSP/Servlets-J2EE, .NET) etc?

Jitender Dhiman:
Actually I am new to liferay

I would strongly suggest to go through the Liferay Developer Guide and also Liferay User guide, atleast the initial 4-5 sections.

Jitender Dhiman:
1. Can we use liferay's user management (add user, sign in,database ) in website also (for users login) or we have to develop our own login criteria.

If you can answer my two questions then it would be easier to answer this. Still I will assume and answer in short.

If building from scratch you can leverage Liferay's built-in mechanism.
If you already have a website, I don't know how you are planning to integrate it in liferay but you can't use default liferay's login within the code of your website. Though you can make your own module and use Liferay's DB table. [Caution: This is not a good idea to do since Liferay's DB can change with version release]

Jitender Dhiman:
2. How can we perform interportlet communication like update data in one portlet from another.

You can go through this Wiki article to get a hands-on IPC

Jitender Dhiman:
3. what is best for customized code: using hooks or ext.

Hooks are the preferred to customize liferay.
But in some cases EXT is used where Hooks can't be used, but starting from 6.1 almost 80% of the requirements can be done using hooks and plugins portlets.

P.S.: Please try to ask questions with a relaxed frame of mind rather than being in a hurry that way you would really help the community :-) Thanks
Jitender Dhiman
RE: Either use single or multiple portlets?
January 22, 2013 9:52 PM
Answer

Jitender Dhiman

Rank: Junior Member

Posts: 29

Join Date: September 21, 2012

Recent Posts

Thanks for raply Prakash,

But again question arises.... If we are developing our own code+db for usermanagement then what is the use of liferay.
Prakash Khanchandani
RE: Either use single or multiple portlets?
January 25, 2013 12:12 AM
Answer

Prakash Khanchandani

Rank: Expert

Posts: 279

Join Date: February 10, 2011

Recent Posts

If you already have a website and are thinking just by some configurations you should be able to use liferay's login mechanism and other liferay stuff, then it is simply not possible. Since Liferay itself is a website and is made up of individual portlets.

But if you want to use Liferay as your website and want to include custom code (i.e. develop portlets) than liferay gives you all the features like out-of-the-box login mechanism and integration with SSO, also authorization using liferay's permission system. And if you have developed custom portlets you can take help of Liferay's various APIs to develop faster.

Can you answer my previous two questions, so that I can better understand what you want to do:

Prakash Khanchandani:
You are developing a Portal from scratch on liferay?
Or you already have a full fledged working Portal made in some other technology (like PHP, JSP/Servlets-J2EE, .NET) etc


Thanks