Re: Could it be possible to support configuring with *.cfg instead of *.zcml?
Dylan Jay <djay-n0pU0XVUApFWk0Htik3J/[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.devel |
|---|---|
| Message-ID | <CANyGbvf5Bpf7V6bpCKEOCKwnOF_7kirmZzMi-Ya8HBPcTnOFWQ@mail.gmail.com> |
Agree. We have to aim for an order of magnitude easier to overcome the effort of educating people of a new way to do something. On 24 Nov 2013 11:11, "Martin Aspeli" <[email protected]> wrote: > How is one more way of doing something with a different syntax to what is > in all existent documentation going to make anything any easier? ;-) > — > Sent from Mailbox <https://www.dropbox.com/mailbox> for iPhone > > > On Sat, Nov 23, 2013 at 9:43 PM, Asko Soukka <[email protected]> wrote: > >> Ahem, just continuing after accidental send: >> >> Asko Soukka wrote: >> > The benefit would be that add-on developer could write configure.cfg: >> > >> > [browser:page:uniquepostfix] >> > name = hello-world >> > for = * >> > class = .view.FooBar >> > permission = zope2.View >> > >> > instead of configure.zcml >> >> <configure >> xmlns="http://namespaces.zope.org/zope" >> xmlns:browser="http://namespaces.zope.org/browser"> >> >> <browser:page >> name="hello-world" >> for="*" >> class=".view.FooBar" >> permission="zope2.View" >> /> >> >> </configure> >> >> Cfg may not be significantly better than zcml, just not xml. >> >> What all issues would there be left to be solved? >> >> At least, cfg would be flatter. I have no idea, where directives inside >> directives are really needed, so I don't know can everything be >> implemented in cfgs. >> >> It should not difficult to support zcml:condition, so conditional >> sections could be solved into conditional include-directives. >> >> Cfg-sections would need to be unique, which would require something >> dummy after the directive name. >> >> Do we have any colliding namespaces, which would prevent fixing e.g. >> that browser to always mean http://namespaces.zope.org/browser >> >> Directives ZCMLs are executed in order. Forcing order with cfg would >> need something like "require = section:name" (like in puppet). >> >> > I made a very naive experiment: >> > >> > https://github.com/datakurre/collective.cfgconfig >> >> Cheers, >> Asko >> >> ------------------------------------------------------------------------------ >> >> Shape the Mobile Experience: Free Subscription >> Software experts and developers: Be at the forefront of tech innovation. >> Intel(R) Software Adrenaline delivers strategic insight and game-changing >> conversations that shape the rapidly evolving mobile landscape. Sign up >> now. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk >> _______________________________________________ >> Plone-developers mailing list >> Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org >> https://lists.sourceforge.net/lists/listinfo/plone-developers >> > > > > ------------------------------------------------------------------------------ > Shape the Mobile Experience: Free Subscription > Software experts and developers: Be at the forefront of tech innovation. > Intel(R) Software Adrenaline delivers strategic insight and game-changing > conversations that shape the rapidly evolving mobile landscape. Sign up > now. > http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk > _______________________________________________ > Plone-developers mailing list > Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/plone-developers > > ------------------------------------------------------------------------------ Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk _______________________________________________ Plone-developers mailing list Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/plone-developers