Afficher un message
Vieux 21/06/2008, 17h08   #8
Robert Klemme
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Advice for pluggable architecture

On 20.06.2008 19:43, Robert Dober wrote:
> On Fri, Jun 20, 2008 at 5:13 PM, Robert Klemme
> <shortcutter@googlemail.com> wrote:
>> On 20 Jun., 16:29, Robert Dober <robert.do...@gmail.com> wrote:


>> You might actually discover that the toolset you have in mind is
>> actually Ruby's standard library because your requirements /
>> processing options are too different.


> Robert you just gave me the "simple" answer to what I really want, and
> you are absolutely right it is almost pure Ruby as it turns out to be
> a DSL.


That's great to see that I could be of any .

> Here is a simple example
>
> html do
> body do
> headline :level => 1, :text => "The Ultimate Solution To All
> Problems AKA 42"
> table :headers => true, :text => <<-EOT ### And this is the
> point I missed until I tried to answer your mail
> number meaning
> 1 one
> 42 yes
> EOT
> table :from_file => "some_cvs_file", :format => :cvs
> etc.etc.


I assume this generates a HTML page, doesn't it?

> and now I have just to write lots of tests and do uninteresting work
> like implementing them
> But I guess it will not be worth a project anymore, so many have
> written that kind of DSL already.
> And IIRC something like above is already implemented somewhere?


I believe class CGI has something similar. And you can even tell it
which HTML version to create.

http://ruby-doc.org/stdlib/libdoc/cg...asses/CGI.html

Kind regards

robert
  Réponse avec citation
 
Page generated in 0,89172 seconds with 9 queries