Using Magritte objects in pier

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

Using Magritte objects in pier

NorbertHartl
Hi,

last week I did a new start on pier (ok, I do this every
couple of months :) ). I did an application in the late
2006 I'm now trying to ressurect. I developed myself an
external component tree that has a configuration for the
whole site. It has several display modi and makes heavily
use of Announcements to switch/show stuff.

Now I'm thinking that I could benefit by exchanging my
component tree with pier. This way it would be more
flexible and a lot of decorating html stuff could be
managed by pier.

In the project I also use magritte. I'm not very familiar
with pier so my questions might be very stupid.

- How do I embedded any magritte object on a page? In my
  code I just do anObject asComponent. Is there an easy
  way to just integrate objects on a page. It needs some
  tricks in order not to display all the time the same
  object. I think yo know what I mean

- If there is a good solution for the above is there a
  solution for displaying individual slots of an object?
  I mean to have access to an individual component class
  for an instance variable. The most difficult thing
  (while developing the project) was to layout the
  magritte forms. I would like to see something like
  +mySuperObject/@title+
  +mySuperObject/@text+
  to display the component classes of the object and
  dealing with the rest of the html the pier way.

There are more questions to come :)

Norbert


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

Re: Using Magritte objects in pier

Lukas Renggli
> - How do I embedded any magritte object on a page? In my
>  code I just do anObject asComponent. Is there an easy
>  way to just integrate objects on a page. It needs some
>  tricks in order not to display all the time the same
>  object. I think yo know what I mean

You can embed any Seaside component into Pier. In the case of a
Magritte component you might need to wrap it into a normal Seaside
component that returns true for #canBeRoot and that sets-up the
Magritte component.

Simply create an embedded link in the page like so: +magritte-form+.
Click on the link to add a component and select your component from
the list.

> - If there is a good solution for the above is there a
>  solution for displaying individual slots of an object?
>  I mean to have access to an individual component class
>  for an instance variable. The most difficult thing
>  (while developing the project) was to layout the
>  magritte forms. I would like to see something like
>  +mySuperObject/@title+
>  +mySuperObject/@text+
>  to display the component classes of the object and
>  dealing with the rest of the html the pier way.

Mhh ... links support parameters, but that use-case is currently not
implemented. Maybe you want to give a try and implement that yourself?

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch


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

Re: Using Magritte objects in pier

NorbertHartl
On Wed, 2009-02-25 at 10:07 +0100, Lukas Renggli wrote:

> > - How do I embedded any magritte object on a page? In my
> >  code I just do anObject asComponent. Is there an easy
> >  way to just integrate objects on a page. It needs some
> >  tricks in order not to display all the time the same
> >  object. I think yo know what I mean
>
> You can embed any Seaside component into Pier. In the case of a
> Magritte component you might need to wrap it into a normal Seaside
> component that returns true for #canBeRoot and that sets-up the
> Magritte component.
>
> Simply create an embedded link in the page like so: +magritte-form+.
> Click on the link to add a component and select your component from
> the list.
>
Ok, thanks, I expected that. It is not big of a problem. With an
additional component I can set up the announcements as well. It just
makes the following approach a little more complicated.

> > - If there is a good solution for the above is there a
> >  solution for displaying individual slots of an object?
> >  I mean to have access to an individual component class
> >  for an instance variable. The most difficult thing
> >  (while developing the project) was to layout the
> >  magritte forms. I would like to see something like
> >  +mySuperObject/@title+
> >  +mySuperObject/@text+
> >  to display the component classes of the object and
> >  dealing with the rest of the html the pier way.
>
> Mhh ... links support parameters, but that use-case is currently not
> implemented. Maybe you want to give a try and implement that yourself?
>
Yes, I'll give it a try. I need to know pier anyway if I want to use
it. It is just that I had a very hard time to resolve even simple
things in pier. I can accept the "structure is everything" thingy but
most of this is than "the structure in your brain" and that is hard to
follow. I scan again the papers I collected about magritte and pier over
the years. At the moment it is an infinite learning curve (the structure
seems to be a graph :) ).

thanks so far,

Norbert




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

Re: Using Magritte objects in pier

stéphane ducasse-2
If you can report what you found difficult it would be great.
because pier should improve on that level

Stef
On Feb 25, 2009, at 11:33 AM, Norbert Hartl wrote:

> On Wed, 2009-02-25 at 10:07 +0100, Lukas Renggli wrote:
>>> - How do I embedded any magritte object on a page? In my
>>> code I just do anObject asComponent. Is there an easy
>>> way to just integrate objects on a page. It needs some
>>> tricks in order not to display all the time the same
>>> object. I think yo know what I mean
>>
>> You can embed any Seaside component into Pier. In the case of a
>> Magritte component you might need to wrap it into a normal Seaside
>> component that returns true for #canBeRoot and that sets-up the
>> Magritte component.
>>
>> Simply create an embedded link in the page like so: +magritte-form+.
>> Click on the link to add a component and select your component from
>> the list.
>>
> Ok, thanks, I expected that. It is not big of a problem. With an
> additional component I can set up the announcements as well. It just
> makes the following approach a little more complicated.
>
>>> - If there is a good solution for the above is there a
>>> solution for displaying individual slots of an object?
>>> I mean to have access to an individual component class
>>> for an instance variable. The most difficult thing
>>> (while developing the project) was to layout the
>>> magritte forms. I would like to see something like
>>> +mySuperObject/@title+
>>> +mySuperObject/@text+
>>> to display the component classes of the object and
>>> dealing with the rest of the html the pier way.
>>
>> Mhh ... links support parameters, but that use-case is currently not
>> implemented. Maybe you want to give a try and implement that  
>> yourself?
>>
> Yes, I'll give it a try. I need to know pier anyway if I want to use
> it. It is just that I had a very hard time to resolve even simple
> things in pier. I can accept the "structure is everything" thingy but
> most of this is than "the structure in your brain" and that is hard to
> follow. I scan again the papers I collected about magritte and pier  
> over
> the years. At the moment it is an infinite learning curve (the  
> structure
> seems to be a graph :) ).
>
> thanks so far,
>
> Norbert
>
>
>
>
> _______________________________________________
> SmallWiki, Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki


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

Re: Using Magritte objects in pier

Lukas Renggli
In reply to this post by NorbertHartl
> Yes, I'll give it a try. I need to know pier anyway if I want to use
> it. It is just that I had a very hard time to resolve even simple
> things in pier. I can accept the "structure is everything" thingy but
> most of this is than "the structure in your brain" and that is hard to
> follow. I scan again the papers I collected about magritte and pier over
> the years. At the moment it is an infinite learning curve

Personally I wouldn't try to build a complex model as subclasses of
structure, unless they have a clear mapping to a tree. For example the
subpages of a blog are posts and comments, the subpages of an issue
tracker as issues and comments, and the subpages of a shop are
categories and articles. In other cases it is most certainly easier to
embed an independent Seaside application into the website.

> (the structure seems to be a graph :) ).

That's true, but most important the structure and their children form
a tree, much like the directory and files on your harddisc. The graph
like structure comes from the fact that structures can link and embed
into each other, but that's just at the level of the document.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

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

Re: Using Magritte objects in pier

NorbertHartl
On Wed, 2009-02-25 at 19:10 +0100, Lukas Renggli wrote:

> > Yes, I'll give it a try. I need to know pier anyway if I want to use
> > it. It is just that I had a very hard time to resolve even simple
> > things in pier. I can accept the "structure is everything" thingy but
> > most of this is than "the structure in your brain" and that is hard to
> > follow. I scan again the papers I collected about magritte and pier over
> > the years. At the moment it is an infinite learning curve
>
> Personally I wouldn't try to build a complex model as subclasses of
> structure, unless they have a clear mapping to a tree. For example the
> subpages of a blog are posts and comments, the subpages of an issue
> tracker as issues and comments, and the subpages of a shop are
> categories and articles. In other cases it is most certainly easier to
> embed an independent Seaside application into the website.
>
That's what I'm trying to to do. I have loads of components to embed.
I just want to try to build the skeleton with pier and embed my
components into that. Some times (in the case of editors) it is good
to have not only pier _or_ component but to interfere both a little. So
you embed a component but layout the structure of the component with
the tools pier has.

For me there are at least two views on my site. The one is sitemap
specific where everything has a location. That's the tree pier is
providing. The other view would be more object/rest centric where
you request an object/content to be displayed and don't care where it
is displayed. I have this already as the description of an object knows
the preferred location where it likes to be displayed. And the location
is configured in a way that it displays the object/content.

For me the same thing is valid for the roles. The tree and look are
provided by the web designer. I'm just providing the business logic.
My structure lies underneath where only I can see it :)

> > (the structure seems to be a graph :) ).
>
> That's true, but most important the structure and their children form
> a tree, much like the directory and files on your harddisc. The graph
> like structure comes from the fact that structures can link and embed
> into each other, but that's just at the level of the document.
>
Yo, was meant as a joke. Just figuring out all the structure-children,
structure-environement stuff.

Norbert


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

Re: Using Magritte objects in pier

John McKeon
In reply to this post by Lukas Renggli


On Wed, Feb 25, 2009 at 4:07 AM, Lukas Renggli <[hidden email]> wrote:
You can embed any Seaside component into Pier. In the case of a
Magritte component you might need to wrap it into a normal Seaside
component that returns true for #canBeRoot and that sets-up the
Magritte component.

Simply create an embedded link in the page like so: +magritte-form+.
Click on the link to add a component and select your component from
the list.
 
That is just amazing.
 
John



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