Hi!

>
> I looked at the website, and didn't see an components, do you have any
> examples?

In Rum nearly everything is a component, because we wanted to be very
flexible:

E.g.:
class App(...):
    controllerfactory = Component('rum.controllerfactory',
default='default')
    repositoryfactory = Component("rum.repositoryfactory",
default='default')
    viewfactory = Component('rum.viewfactory', default='default')
    router = Component('rum.router', default='default')
    policy = Component('rum.policy', default='default')
    jsonencoder = Component('rum.jsonencoder', default='default')
    translator = Component('rum.translator', default='default')

This components are initialized and overriden like that in an .ini-
file.

    [rum.controllerfactory]
    default = rum:ControllerFactory

    [rum.repositoryfactory]
    default = rum:RepositoryFactory

    [rum.viewfactory]
    default = rum:ViewFactory

    [rum.jsonencoder]
    default = rum.json:JsonEncoder


One of the components, where I implemented quite early an alternative
was the "flashing component". The RUM app provided an default, but if
you wanted to embed your app into another, that might not be a suited
(as it has to integrated). By the way: Nowadays, the TgRum Flash
integrates nicely with TG2.


There are some toy examples in the tests (I just added a new one),
which make a little bit clearer, how it works.

http://bitbucket.org/brickenstein/rumcomponent/src/tip/rumcomponent/tests/test_component.py

Cheers,
Michael

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to