Well, that doesn't really answer my question on the advantages of the
widget system vs. a general template system (i.e., even if a template
system is available, would I have better results if I used the widget
system alone?), but since you mentioned it, can you provide a link to
documentation on how to do this? I haven't read *all* of the Wt
documentation yet, but thusfar I haven't seen anything that gives me the
possibility to embed C++ into native HTML with Wt. The closest I've
seen is A) putting various HTML snippets in an XML file and calling them
when desired (not the most graceful solution, as it makes inserting
dynamic content into that HTML a little more tricky), or B) printing the
HTML using a WText widget (not the most graceful solution, as it
requires extra coding to accomplish the same thing.)
What I'm more getting at is trying to figure out what the wt coders had
in mind when they set it up to work with the widget system, and why they
chose to do that instead of the template system. Was it simply an
effort to make web development more accessible to those who hadn't done
it before, or was there a specific goal in mind in using this format?
For me, it seems the template system is more appropriate because I'm
already very familiar with all the web design languages (html, CSS,
JavaScript, etc), but have never actually made a GUI system in C++, as
I've only used it in console-based implementations (such as
MUDs/text-based online games). This means I would feel more in control
of the layout of the site using a template system, and would have to do
very little learning, as I'm already familiar with both the form and
function aspects of that sort of approach. However, when this
alternative is available, I don't want to commit to the template-based
approach until I've heard the arguments for the other side. If there
are significant advantages to be had by the GUI approach, which aren't
readily apparent to me due to my lack of experience in that style of
programming, then I'd be willing to take the extra time to learn it,
rather than use the "quick and easy" path.
Sorry if I'm rambling a little or repeating myself. I've been up
working all night. I'm pretty tired and not entirely sure I'm being
coherent. Sorry to be such a bother! ^^;
And just so I'm sure we're on the same page... when I say template, I
mean something like this (using the syntax offered by tntnet):
----------
<html>
<head>
% string page_title="Example page";
<title><$ page_title $></title>
</head>
<body>
<{
int a=2;
int b=5;
int c=a+b;
string hello="Hello world!";
}>
<h1><$ hello $></h1><br />
<$ a $> + <$ b $> = <$ c $>. Isn't that something?
</body>
</html>
----------
Is that the same sort of template you're talking about? If so, I would
be very interested to know exactly how to do that with wt, although, as
I said, I would also still like to hear the arguments as to why NOT to
use such a system.
Thanks,
Shadowcat
mobi phil wrote:
Hello,
the topic was already discussed here, but it is not nonsense to
brainstorm time to time about the topic.
My answer would be, you may create templates and use wt. You have for
most of templating languages the posibility to add controls/widgets to
templates. Nobody stops you to write scripts inside template that
would connect the widgets.
the http://babelengine.org <http://babelengine.org/> project is
intending to compine all these....
regards
On Wed, Jul 8, 2009 at 11:05 PM, Shadowcat
<[email protected] <mailto:[email protected]>>
wrote:
Ok, first, let me say, this is more a question of comparing two
different approaches than of comparing two different frameworks. I
don't know how many of you are aware of tntnet's existence, but it's
a... competing? framework for using C++ in web design. The biggest
difference between tntnet and witty, and the one I want to explore, is
that it uses a template-based design (like PHP, Ruby on Rails, etc.)
rather than the GUI-based approach of witty. The reason that I'm
sending this message is that, as one more familiar with the tntnet
approach than the Wt approach for web design purposes, I'm having
trouble seeing the advantages of the GUI design. It seems to me that
the template design is faster, for one who already knows HTML, than
learning the Wt API. But, I've been reading some of the list
archives,
and I see a lot of you complain about the template design, but no one
has (as far as I've seen) elaborated on WHY the template design is
bad.
I do see one benefit to the GUI design - the ability to dynamically
change the properties of a given widget using (for example)
WWidget->setStyleClass(). I can definitely see the benefits of that,
but I'd like to know more on the pros and cons of GUI-based design for
web, as opposed to template design. And I want to know both "Why
is GUI
design good?" and "Why is template design bad?" For those who are
unfamiliar with tntnet, the code is also pre-compiled, just as
Wt's is,
so there's no overhead involved in the parsing - or if there is
overhead, it should exist only during the compile.
I see a lot of good things that I like about Wt - the ability to
deploy
under Apache as a FastCGI script, for one. I'd like to continue
exploring Wt as a possibility, but at current, I'm seeing the template
design as an easier option that will shorten development time, and
that
alone is making me lean toward tntnet even though I see the
capabilities, documentation, support, deployment options (I don't
believe tntnet can be deployed on win32), community, reputation,
history, amount of development, and so on, all seem to be better
on Wt's
end. So, basically, what I'm getting at is... convince me
otherwise! I
know everything I hear will be biased toward Wt, but that's a good
thing, because I want to hear arguments in Wt's favor; I'd rather use
Wt, if I can find a way to justify the perceived extra development
time
to my employer, or if I can be convinced that the development time
would
not, in fact, be that much longer.
Thanks!
Shadowcat
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited
time,
vendors submitting new applications to BlackBerry App World(TM)
will have
the opportunity to enter the BlackBerry Developer Challenge. See
full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
witty-interest mailing list
[email protected]
<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/witty-interest
--
rgrds,
mobi phil
being mobile, but including technology
http://mobiphil.com
------------------------------------------------------------------------
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
------------------------------------------------------------------------
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest