On Jun 2, 4:16 pm, "Ben Jones" <[EMAIL PROTECTED]> wrote:
> Hi Ittay -
>
> > With wicket, the template is just
> > a regular HTML with attribute that identify snippets of HTML that need
> > to be dynamically created. Then, the backend code can substitute these
> > snippets, usually by reusing them, and injecting dynamic content.
>
> You can do this with Django templates as well. Just create your own tags.
yes, of course, but then it means the designer needs to use them,
plus, how do they exactly work?
in wicket, if i want to create a list of things, my html will look
something like this:
<span wicket:id = "comments">
<p>
<span wicket:id = "date">1/1/2004</span><br>
<span wicket:id = "text">Comment text goes here.</span>
</p>
</span>
and my code like this:
add(new ListView("comments", commentList)
{
public void populateItem(final ListItem listItem)
{
final Comment comment =
(Comment)listItem.getModelObject();
listItem.add(new Label("date",
comment.date.toString()));
listItem.add(new MultiLineLabel("text",
comment.text));
}
});
none of the above were created specifically for this use case, and the
html looks very natural
>
> > The
> > cool thing is that wicket templates contain no logic (nor loops or
> > conditions) and are valid HTML. So designers don't need to think in
> > logic and can design (and maintain) the templates in their favorite
> > HTML editor.
>
> Designers don't *have* to use logic in Django templates, and they can
> still be valid 100% valid HTML. It's also important to remember that
> Django's template engine is designed for much more than just HTML
> output.
oh, but wicket supports dynamic content, ajax, everything
>
> > Also, wicket promotes the use of components, so, for
> > example, to have a date picker, you just put in your HTML the input
> > box for the date and a span for the calendar icon and in your code
> > create a date picker class and pass it the ids to these two items and
> > that's it: the javascript is included, any necessary HTML is taken
> > care for you, etc.
>
> This is another example of what you can do with tags in Django templates.
>
yes, everything i can do in wicket, i can do in django. but everything
i can do in django i can do in php. but i guess you still find django
better, right? it's not a question of being able to do things, more
about readability and maintenance
> Have a good weekend!
> --
> -Ben
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---