Thoughts please: Wheels Tags

21 views
Skip to first unread message

Andy Bellenie

unread,
Jul 13, 2012, 5:28:13 AM7/13/12
to ColdFusion on Wheels
What are everyone's opinions on using a tag library instead of functions for Wheels methods in the view?

e.g.

#linkTo(action="index")# becomes <w:linkTo action="index" />

and

#startFormTag(action="new")#
#textField(objectName="post", property="title")#
#submitTag(value="Save")#
#endFormTag()#

would be something like:

<w:form action="index">
<w:input type="text" objectName="post" property="title" />
<w:input type="submit" />
</w:form>


This would make it possible to create code highlighting extensions for text editors, and would look far cleaner inside html.

Only problems are a) it might be fractionally slower and b) would require the including of the tag library at the top of every view (thanks Adobe).

I'm thinking of making a plugin for this, but wanted community feedback first.

Andy
 

kapitaine

unread,
Jul 13, 2012, 6:31:02 AM7/13/12
to cfwh...@googlegroups.com
I like it! Those pound signs all get very messy after a while.

Either way, it's good to do, because it gives us options. And options are what make CF great. Can't see why anyone would be against this.

Cheers,
Michael.

tpet...@gmail.com

unread,
Jul 13, 2012, 8:46:26 AM7/13/12
to cfwh...@googlegroups.com
The Kewl thing about using tags is that you can mimic blocks so u can now have html mixed with the form helpers and still get the fintionality of a form builder. One of the problems i couldn't overcome wiyh my form builder was that by using a DSL, i couldn't mix regular html into the form without a putting it into a funcrion call. It made the form very messy to create.

Seriously, start on this now and I'll try to figure a way to get it into views automatically.

Chris Peters

unread,
Jul 13, 2012, 9:16:19 AM7/13/12
to cfwh...@googlegroups.com
I would love this! I'm assuming it may just be a secondary way of calling methods behind the scenes so that you could still override functionality in plugins, helpers, and controllers?


Andy
 

--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfwheels?hl=en.

Russ Johnson

unread,
Jul 13, 2012, 4:01:53 PM7/13/12
to cfwh...@googlegroups.com
I might be the only one but Im not a fan of tags. 

I can see where this might have some advantages though in using them similar to blocks like Tony mentioned. Im sure there are quite a few people that would utilize them if they were available though.

Russ Johnson
@russ_johnson
ru...@angry-fly.com
www.angry-fly.com


 

Simon Allard

unread,
Jul 13, 2012, 4:05:57 PM7/13/12
to cfwh...@googlegroups.com
You are not the only one Russ! ;)

A+

Simon
image001.gif
Reply all
Reply to author
Forward
0 new messages