Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

Need to identify compilable strategy

#4

A good templating system needs to be compilable. The current prototype compiles the template live each time, it should be possible to improve this early on.

This is not so much the case as optimize later as make certain the basic framework will be production ready.

Reported by Nicholas Faiz · May 20th, 2009 @ 03:25 PM

State: resolved
Milestone: none
Assigned to: Nicholas Faiz Nicholas Faiz

Activity

  1. Nicholas Faiz
    Nicholas Faiz

    For example, a haml document

    ok
    = @foo
    done
    
    - if @foo
      = Time.now
    - else
      there's no time like the present
    

    compiles to this str, which is reflected as a method on the action_view object, and reused unless the template's timestamp is newer than the methods.

    extend Haml::Helpers;_hamlout = @haml_buffer = Haml::Buffer.new(@haml_buffer, {:attr_wrapper=>"'", :format=>:xhtml, :autoclose=>["meta", "img", "link", "br", "hr", "input", "area", "param", "col", "base"], :preserve=>["textarea", "pre"], :ugly=>false});_erbout = _hamlout.buffer;__in_erb_template = true;;
    _hamlout.push_text("ok\n");haml_temp =  @foo;
    haml_temp = _hamlout.push_script(haml_temp, false, false, false, false, false);
    
    _hamlout.push_text("done\n"); if @foo;
    haml_temp =  Time.now;
    haml_temp = _hamlout.push_script(haml_temp, false, false, false, false, false); else;
    
    _hamlout.push_text("there's no time like the present\n");end;
    @haml_buffer = @haml_buffer.upper;_erbout;
    
    

    So, presumably the renshi parser should do something similar.

    May 20th, 2009 @ 03:34 PM

  2. Nicholas Faiz
    Nicholas Faiz

    The problem with doing this, though, is that it means writing the template parser specifically for the Rails platform. I wonder how haml handles Sinatra integration?

    May 20th, 2009 @ 03:57 PM

  3. Nicholas Faiz
    Nicholas Faiz

    Done for statements and conditional expressions.

    June 2nd, 2009 @ 09:30 PM

  4. Nicholas Faiz
    Nicholas Faiz
    • State changed from new to resolved

    June 2nd, 2009 @ 09:30 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.