Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Susan Young
Service Builder and Expando API
30 marzo 2012 17.39
Risposta

Susan Young

Punteggio: New Member

Messaggi: 17

Data di Iscrizione: 24 gennaio 2012

Messaggi recenti

Hi,

I have a very basic question regarding the advantages and disadvantages of using either the Service Builder or Expando API to stand up database tables for a survey portlet. I'm developing for Liferay 5.2.3 currently but looking to upgrade to 6.1 in the near future (we're currently held to 5.2.3 because of an app dependency).

I'm creating a portlet that collects information about potential use cases for a service portal. The portal is currently in prototype.

Examples of some of the fields include:

- Request: first name, last name, email address
- Use case details: purpose, use case description, objectives

... any many more. In all there are about 40 fields on the form today. Intent is that the survey form should be able to be completed by anyone, including guests.

My question is what would be the best approach to use to instantiating the database fields for the survey portlet - should I use Service Builder or the Expando API? It's possible we may need to add or delete fields at a later date. Is there an advantage to one approach over the other in 5.2.3?

The intent is to store the survey fields in the database and also submit the form fields to a portal administrator via email.

I've taken a brief look at the webform portal, although I haven't had any success getting it to install under 5.2.3. I note that it uses the Expando API but I've also seen many form examples that leverage the Service Builder.

I'd be grateful for any insights or experience with either approach -

Many thanks,

Susan
David H Nebinger
RE: Service Builder and Expando API
30 marzo 2012 17.49
Risposta

David H Nebinger

Community Moderator

Punteggio: Liferay Legend

Messaggi: 11787

Data di Iscrizione: 1 settembre 2006

Messaggi recenti

Expando should only be used to expand upon existing entities, i.e. adding values to bind to a user for example.

What you're describing would be best handled using ServiceBuilder in that you are not really extending an existing entity, you're creating brand new entities.
Susan Young
RE: Service Builder and Expando API
30 marzo 2012 18.14
Risposta

Susan Young

Punteggio: New Member

Messaggi: 17

Data di Iscrizione: 24 gennaio 2012

Messaggi recenti

Thanks David for your answer - that makes sense to me.

Susan
Hitoshi Ozawa
RE: Service Builder and Expando API
30 marzo 2012 20.20
Risposta

Hitoshi Ozawa

Punteggio: Liferay Legend

Messaggi: 7949

Data di Iscrizione: 23 marzo 2010

Messaggi recenti

It's possible we may need to add or delete fields at a later date.


You'll probably do best if you use service builder to defined your survey entity with incorporate concept of expando in it so you'll be able to add and delete fields later.
Entities defined by service builder is static so you'll probably want to design it in such a way that one table contains static entity definitions while the other contains
entities definitions that may be deleted.
Susan Young
RE: Service Builder and Expando API
31 marzo 2012 8.19
Risposta

Susan Young

Punteggio: New Member

Messaggi: 17

Data di Iscrizione: 24 gennaio 2012

Messaggi recenti

Thank you for your reply. Yes, that's one of the reasons I called out the fact that we might need to add and delete fields because from the reading I've done this didn't look like something that could be done with Service builder.

Many thanks,

Susan
Rafa Quinonero
RE: Service Builder and Expando API
16 luglio 2012 6.15
Risposta

Rafa Quinonero

Punteggio: Junior Member

Messaggi: 37

Data di Iscrizione: 22 marzo 2012

Messaggi recenti

Hitoshi Ozawa:
It's possible we may need to add or delete fields at a later date.


You'll probably do best if you use service builder to defined your survey entity with incorporate concept of expando in it so you'll be able to add and delete fields later.
Entities defined by service builder is static so you'll probably want to design it in such a way that one table contains static entity definitions while the other contains
entities definitions that may be deleted.


Hi all,

I'd like to show some custom fields when creating new Organizations, but I don't want all of them to be in the Custom Fields Tab. I'd like to show some of them in the Details tab, and in addresses, websites tab, etc.

To add new fields to the organization entity is not a problem, but how to show them in different tabs?

Thank you very much.
Hitoshi Ozawa
RE: Service Builder and Expando API
16 luglio 2012 6.20
Risposta

Hitoshi Ozawa

Punteggio: Liferay Legend

Messaggi: 7949

Data di Iscrizione: 23 marzo 2010

Messaggi recenti

Sorry but I can't understand how your question is related to the topic of this thread. If you have a new question, please create a new thread.
Rafa Quinonero
RE: Service Builder and Expando API
16 luglio 2012 6.22
Risposta

Rafa Quinonero

Punteggio: Junior Member

Messaggi: 37

Data di Iscrizione: 22 marzo 2012

Messaggi recenti

Hitoshi Ozawa:
Sorry but I can't understand how your question is related to the topic of this thread. If you have a new question, please create a new thread.


Because I was thinking also in a way like a Service Builder with Expando fields on it. Maybe a new Entity Customer, related to the already existing entity Organization with some hook to modify the functionality. Does it make sense?
Hitoshi Ozawa
RE: Service Builder and Expando API
16 luglio 2012 6.27
Risposta

Hitoshi Ozawa

Punteggio: Liferay Legend

Messaggi: 7949

Data di Iscrizione: 23 marzo 2010

Messaggi recenti

Sorry Rafa but this thread has been resolved. If the replies doesn't answer your question, it probably means you have a new question and that you'll probably do better if you create a new thread.
Rafa Quinonero
RE: Service Builder and Expando API
16 luglio 2012 6.28
Risposta

Rafa Quinonero

Punteggio: Junior Member

Messaggi: 37

Data di Iscrizione: 22 marzo 2012

Messaggi recenti

Hitoshi Ozawa:
Sorry Rafa but this thread has been resolved. If the replies doesn't answer your question, it probably means you have a new question and that you'll probably do better if you create a new thread.



Ok, I do. Thanks.