Html conventions

15 views
Skip to first unread message

Jeremy D. Miller

unread,
Jan 7, 2012, 6:16:33 PM1/7/12
to FubuMVC Develop
I'm finally trying to pull in the pull request on html conventions:  https://github.com/DarthFubuMVC/fubumvc/pull/158

I haven't put any effort into this code in over a year, so it's taking a bit to get back into things and understand how the new Form conventions will fit in.  Along the way I'm starting to get concerned that the TagGenerator/ITagGenerator interface and class is getting a bit bloated -- or definitely will fast when form element conventions and whatever else we think of starts to come along.


    public interface ITagGenerator
    {
        void SetModel(object model);
        void SetProfile(string profileName);
        HtmlTag LabelFor(ElementRequest request);
        HtmlTag InputFor(ElementRequest request);
        HtmlTag DisplayFor(ElementRequest request);
        string ElementPrefix { get; set; }
        string CurrentProfile { get; }
        ElementRequest GetRequest(Accessor accessor);

        HtmlTag BeforePartial(ElementRequest request);
        HtmlTag AfterPartial(ElementRequest request);
        HtmlTag AfterEachofPartial(ElementRequest request, int current, int count);
        HtmlTag BeforeEachofPartial(ElementRequest request, int current, int count);
    }

I'd kind of like to know if anyone is using the BeforePartial / AfterPartial things.  I *think* I'd like to start pulling this kind of stuff into separate services to avoid the bloat that I think is coming fast.  Any thoughts?

I think that came from the 9 Collective guys quite a while ago.


 
Jeremy D. Miller
The Shade Tree Developer
jeremy...@yahoo.com

Reply all
Reply to author
Forward
0 new messages