logo       

Re: About a templating for **Static*** dummy web page: msg#00099

Subject: Re: About a templating for **Static*** dummy web page
Hi fellas!

Cees De Groot <cdegroot@xxxxxxxxx> wrote:
> Stephen Pair used to have a simple SSP package, I don't know where
> it's gone... Apart from that, HV2 is probably the easiest thing
> available, but not templating, it generates HTML in pretty much the
> same fashion as Seaside.
> 
> On 1/8/06, stephane ducasse <stephane.ducasse@xxxxxxx> wrote:
> > So I would like to know if there is a simple templating package for
> > ***purely static
> > dead with no objects plain HTML*** web pages.
> > Is HttpView2 such kind of beast?

HttpView2 is very simple and yes, IMHO it is such a beast - but it has
no included template mechanism currently. But hey - this is Smalltalk,
so it is a very small problem - and below is a link to a simple class
for templating.

With HV2 you would just do these things:

1. Create a subclass of HVTransientView.

2. Add a method called #default (in method category "urls" - important!)
and make it return something that responds to #asHttpResponse. In fact,
HTML in a String works just fine. You can use my MacroProcessor class if
you want to have something ASP-ish or whatever tickles your fancy. See:
http://squeak.krampe.se/MacroProc-gk.cs.gz

And then just do:

        MyClass startOn: <port>

Done. :)

For other "pages" just implement other methods in the method category
"urls" - their name is the URL, like #hello would be
http://localhost:<port>/hello

regards, Göran


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe