On Tue, 25 Jun 2002, Tom Howe wrote:
> With the first example, you have the data in a structured format that can
> be then be handled in many fashions. It can be rendered to a webpage, a
> wap page or a business message. You can use different stylesheets to
> achieve different results, maybe you want your site displayed in multiple
> languages or for different countries or multiple branded versions of your
> site. All these features are easier to manage when the data is kept in a
> structured format. It takes a little extra typing to start with but the
> if you plan to expand how it is presented you may save yourself time and
> effort later on. Its a bit like the OO vs procedural coding arguement.
>
> Also remember that you can do exaclty what you have described below in the
> asp example in an AxKit XPathScript Stylesheet. So if you have a page that
> you dont feel will benefit from being described in XML, simply use a blank
> XML document and generate the whole page at the XSP level.
sorry I mean XPS (XPathscript), not XSP
>
> tom
>
> On Tue, 25 Jun 2002, Philip Mak wrote:
>
> > Hello,
> >
> > I'm an Apache::ASP (mod_perl) programmer. I'm checking out AxKit
> > because it looks interesting.
> >
> > One question I have is, how do you deal with all this typing? I was
> > reading the examples at http://axkit.org/docs/guide.dkb?section=4 and
> > it seems that when everything is an XML tag, there is a lot of typing
> > to be done.
> >
> > For example, take the following simple example of a webpage that has a
> > form which says "Enter your name", and submits to itself upon which it
> > redisplays the name entered:
> >
> > <xsp:page
> > xmlns:xsp="http://apache.org/xsp/core/v1"
> > xmlns:param="http://axkit.org/NS/xsp/param/v1"
> > language="Perl"
> > >
> > <page>
> > <xsp:logic>
> > if (<param:name/>) {
> > <xsp:content>
> > Your name is: <param:name/>
> > </xsp:content>
> > }
> > else {
> > <xsp:content>
> > <form>
> > Enter your name: <input type="text" name="name" />
> > <input type="submit"/>
> > </form>
> > </xsp:content>
> > }
> > </xsp:logic>
> > </page>
> > </xsp:page>
> >
> > That's 23 lines of code. If I were to do this in Apache::ASP with the
> > 'page' tag defined as an XMLSub, it would be only 11 lines, which is
> > about 50%!
> >
> > <page><%
> > my $name = $Request->Params('name');
> > if ($name) {
> > %>Your name is: <%=$name%><%
> > } else {
> > %><form>
> > Enter your name: <input type="text" name="name" />
> > <input type="submit" />
> > </form><%
> > }
> > %></page>
> >
> > I find the latter example to be much more readable and faster to code.
> >
> > Am I missing the point here?
> >
> > I read that one of the significant advantages of AxKit is total
> > separation of web design and code. However, on the websites that I
> > work on, I do both the web design and the code.
> >
> > Thoughts?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]