What is the correct root object from which to build a new component?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

What is the correct root object from which to build a new component?

Andy Burnett
I suspect this is a very basic question.

I would like to use Pier as the basis of a group brainstorming system.  In order to do this, I need to build a new component that would have a small text entry box, and a list display holding all the entries.

It seems as though some other components have subclassed PRWidget, but not all of them. So, before I go shooting off down the wrong path, could someone explain if there is a best starting point?

Cheers
Andy

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: What is the correct root object from which to build a new component?

LawsonEnglish
> I suspect this is a very basic question.
>
> I would like to use Pier as the basis of a group brainstorming system.
>  In order to do this, I need to build a new component that would have
> a small text entry box, and a list display holding all the entries.
>
> It seems as though some other components have subclassed PRWidget, but
> not all of them. So, before I go shooting off down the wrong path,
> could someone explain if there is a best starting point?
>
> Cheers
> Andy
>

When you browse hierarchy on PRWidget, you see its a subclass of
MAComponent.  Browsing MAComponent it looks like all Pier components are
subclased off of PRWidget, so it just becomes a matter of deciding which
extra capabilities you want beyond what PRWIdget provides.


I'm often wrong, of course.


Lawson
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: What is the correct root object from which to build a new component?

NorbertHartl
In reply to this post by Andy Burnett

On 08.11.2010, at 02:51, Andy Burnett wrote:

> I suspect this is a very basic question.
>
> I would like to use Pier as the basis of a group brainstorming system.  In order to do this, I need to build a new component that would have a small text entry box, and a list display holding all the entries.
>
> It seems as though some other components have subclassed PRWidget, but not all of them. So, before I go shooting off down the wrong path, could someone explain if there is a best starting point?
>
Just a short extension to Lawsons mail. It depends what you need to do. Pier is a system based on Magritte and Seaside. And that is reflected in the object hierarchie. To be able to do just a web component you need to subclass WAComponent. This component has just a dependency on seaside and can be run without pier. If you subclass MAComponent you can make use of Magritte related stuff. But then you also need Magritte to able to run your component. And finally PRWidget eases your use in a pier environment. And again pier is your dependency then.

So if you only want to display a text box and a list that you define yourself than you should subclass WAComponent.

hope this helps,

Norbert



_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: What is the correct root object from which to build a new component?

Andy Burnett
In reply to this post by Andy Burnett

 
Just a short extension to Lawsons mail. It depends what you need to do. Pier is a system based on Magritte and Seaside. And that is reflected in the object hierarchie. To be able to do just a web component you need to subclass WAComponent. This component has just a dependency on seaside and can be run without pier. If you subclass MAComponent you can make use of Magritte related stuff. But then you also need Magritte to able to run your component. And finally PRWidget eases your use in a pier environment. And again pier is your dependency then.

So if you only want to display a text box and a list that you define yourself than you should subclass WAComponent.

hope this helps,

Thanks guys, that's very helpful.

I am hoping to build a component that can access various attributes in the pier, logged in username - just for example.  Would I be right in assuming that subclassing PRWidget is therefore my safest bet?  I realise that this means I have more to learn, but it seems like a worthwhile investment.

Cheers
Andy 


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki