[Newbie] Confused about #registerAsApplication

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

[Newbie] Confused about #registerAsApplication

Bakki Kudva
Hi,

I have been reading that a new app which is subclassed from
WAComponent should be registered like
MyComponent registerAsApplication: 'foo'.
However when I see the examples like the Store or the Scriptaculous
SUAllTests apps I don't see this in their initialize methods(or
anywhere else in their components). Is this automatically done for
every subclass of WAComponent so it shows up in seaside/config?

Thanks for your help,

bakki
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: [Newbie] Confused about #registerAsApplication

Ramon Leon-5
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf
> Of Bakki Kudva
> Sent: Friday, August 18, 2006 12:27 PM
> To: seaside
> Subject: [Seaside] [Newbie] Confused about #registerAsApplication
>
> Hi,
>
> I have been reading that a new app which is subclassed from
> WAComponent should be registered like MyComponent
> registerAsApplication: 'foo'.
> However when I see the examples like the Store or the
> Scriptaculous SUAllTests apps I don't see this in their
> initialize methods(or anywhere else in their components). Is
> this automatically done for every subclass of WAComponent so
> it shows up in seaside/config?
>
> Thanks for your help,

No, registerAsApplication creates an entry in config, however, you can also
do it manually from config for any component that returns true from
canBeRoot on the class side.  So, registerAsApplication is not required,
it's a convenience method for automatically setting up a site when code is
loaded into the image.

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [Newbie] Confused about #registerAsApplication

Bakki Kudva
Thanks Ramon, That sheds more light on what I discovered in the class
methods. When browsing I was only looking into the instance methods.

-bakki

On 8/18/06, Ramon Leon <[hidden email]> wrote:

> > -----Original Message-----
> > From: [hidden email]
> > [mailto:[hidden email]] On Behalf
> > Of Bakki Kudva
> > Sent: Friday, August 18, 2006 12:27 PM
> > To: seaside
> > Subject: [Seaside] [Newbie] Confused about #registerAsApplication
> >
> > Hi,
> >
> > I have been reading that a new app which is subclassed from
> > WAComponent should be registered like MyComponent
> > registerAsApplication: 'foo'.
> > However when I see the examples like the Store or the
> > Scriptaculous SUAllTests apps I don't see this in their
> > initialize methods(or anywhere else in their components). Is
> > this automatically done for every subclass of WAComponent so
> > it shows up in seaside/config?
> >
> > Thanks for your help,
>
> No, registerAsApplication creates an entry in config, however, you can also
> do it manually from config for any component that returns true from
> canBeRoot on the class side.  So, registerAsApplication is not required,
> it's a convenience method for automatically setting up a site when code is
> loaded into the image.
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Pier question

Jason Johnson-3
In reply to this post by Ramon Leon-5
Hello group,

I am planning on converting a mostly static website to seaside and I
think Pier is the best way to do it (please let me know if there is some
other prefered way).

Now for my website, is it best practices to make a new application
somehow with the pier kernel, or should I just make a subtree within the
pier that is already setup and just point the web server to that subtree
part?

I tried just setting up a new app with all the same settings as the Pier
that is set up when you do the squeakmap install but then when I changed
the environment it showed up in both apps.

Thanks in advance,
Jason

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Pier question

Lukas Renggli
> Now for my website, is it best practices to make a new application
> somehow with the pier kernel, or should I just make a subtree within the
> pier that is already setup and just point the web server to that subtree
> part?

I would just use two different images. Setting up two kernels or using
two sub-trees should also work. The thing with the sub-trees probably
requires some adaptations to the Pier code to get the paths right.

> I tried just setting up a new app with all the same settings as the Pier
> that is set up when you do the squeakmap install but then when I changed
> the environment it showed up in both apps.

You can create individual environments in sub-trees of pier. An
environment is applied to its parent and all children of the parent
unless you define a new one.

Btw, there is also a special mailing-list dedicated to Magritte, Pier
and SmallWiki at:

http://www.iam.unibe.ch/mailman/listinfo/smallwiki

Cheers,
Lukas



>
> Thanks in advance,
> Jason
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside