3

I really like Template Toolkit and like how it works with Catalyst, but I would like more 'web advanced' toolkit.

It could be just a package of *.tt files for Web objects like these: Selector, Selector_DateTime, Menu, Data_Table...

Is there something like that somewhere on the Web? If not, why not?

brian d foy
  • 129,424
  • 31
  • 207
  • 592
sebthebert
  • 12,196
  • 2
  • 26
  • 37
  • 1
    Exactly how would you see these working? – MkV Jul 24 '09 at 04:30
  • @james2vegas: when you need a form widget to select a date, you just say something like [% form_name=start_date; INCLUDE date_widget %] and everything else, including javascript validation, happens for you. – brian d foy Jul 24 '09 at 16:55
  • It's like having Template equivalent of Regexp::Common. A very decent idea. – aartist Nov 10 '09 at 02:51

3 Answers3

6

Are you looking to make your own templates, or use ones that were already developed by someone else? You can make your own components just fine with Template Toolkit, and you can easily insert other widgets you find into Template files.

I don't know of any ready-made packages that you can just download for common things that show up on web pages. It would be nice if someone spent the time to create some and make them available. I think people tend to make their own stuff that is exactly right for their problem, isn't necessarily refactored or well-architected, or a bit kludgey and embarrassing.

I have my own bits, such as templates for a country or state selection menu, but I also have to have some code to set the default. I don't particularly want to spend the time to make that useful to a general audience.

I understand what you want, agree with the value of it, and hope someone with the talent, time, and motivation runs with the idea. :)

brian d foy
  • 129,424
  • 31
  • 207
  • 592
  • Yes, that's exactly what I would like to say, thanks Brian ! :) Well, I don't really have talent, probably not enough time, but BIG motivation ! I will try to make something for the next weeks... – sebthebert Jul 25 '09 at 14:20
2

For form related stuff then have a look at HTML::FormHandler.

Its new but looks to be a promising module which integrates well with TT & DBIC.


For something far more encompassing then check out Reaction.

From its overview doc....

Reaction is a Catalyst extension providing you with:

  • Model mutations abstracted into Action objects.
  • Reflection to generate interface models using the Action objects from a DBIx::Class schema.
  • An abstract UI expression system based on view, skin, rendering context, widget and layout set.
  • Stylable via skins. Parts of the skins can be extended and flexibly from large down to very small parts.
  • Full separation of interface rendering structure and templating, making re-usable extensions even easier.

Read the UI, Viewport & Widget docs and see if it tickles your fancy ;-)

AndyG
  • 39,700
  • 8
  • 109
  • 143
draegtun
  • 22,441
  • 5
  • 48
  • 71
  • I didn't know Reaction. It seems to be really powerful, but probably too complicated for my needs and the time I have... +1 – sebthebert Jul 25 '09 at 14:54
  • Yes Reaction would require an hell of investment time to get into but it may produce good rewards at the end! Checkout the Reaction articles posted on www.catalyzed.org: http://www.catalyzed.org/mt/mt-search.fcgi?blog_id=1&tag=Reaction&limit=20 – draegtun Jul 25 '09 at 16:25
1

Look at Template::Plugin:: modules and especially at Template::Plugin::CGI .

Alexandr Ciornii
  • 7,346
  • 1
  • 25
  • 29
  • I think he wants higher level things that are pre-made. – brian d foy Jul 24 '09 at 16:46
  • Yes, I wanted higher level things, but I didn't know that module CGI could make the low level things... I think it's a good start anyway to make higher level things. +1 – sebthebert Jul 25 '09 at 14:55