List Info

Thread: Haml for PHP (Symfony Framework)




Haml for PHP (Symfony Framework)
user name
2007-09-04 12:02:44
Guy,

I thought you might be interested (proud) 

http://trac.symfony-project.com/trac/wiki/sfHamlViewPl
ugin

Thank you for the good work on the Haml specs.

Regards,
Kiril

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Haml" group.
To post to this group, send email to hamlgooglegroups.com
To unsubscribe from this group, send email to
haml-unsubscribegooglegroups.com
For more options, visit this group at http://grou
ps.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Haml for PHP (Symfony Framework)
user name
2007-09-04 12:44:25
This looks really good! Wow, I can't believe there are *two*
PHP Haml
engines now!

The only issue I see is that technically this breaks the
spec

    %javascript
      function antispam(ext,domain,name) {
        document.write('<a href="mailto:' + name +
'' +
domain + '.'
+ ext + '">');
        document.write(name + '' + domain + '.' + ext +
'</a>');
      }

Nothing can be indented that doesn't mean something.
However, I don't
really take much issue with this existing in your version.
Its more
just the way our engine works.

You know, as I type this... its not part of the official
spec in my
brain. The only caveat is that once you start indenting
"plaintext"
you are totally out of being able to use Haml tags or
anything. It
must be a leaf node.

Aka,

    %javascript
      function antispam(ext,domain,name) {
        document.write('<a href="mailto:' + name +
'' +
domain + '.'
+ ext + '">');
        document.write(name + '' + domain + '.' + ext +
'</a>');
        %tag me
      }

That would break.

-hampton.

On 9/4/07, Kiril Angov <kupokomapagmail.com> wrote:
>
> Guy,
>
> I thought you might be interested (proud) 
>
> http://trac.symfony-project.com/trac/wiki/sfHamlViewPl
ugin
>
> Thank you for the good work on the Haml specs.
>
> Regards,
> Kiril
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Haml" group.
To post to this group, send email to hamlgooglegroups.com
To unsubscribe from this group, send email to
haml-unsubscribegooglegroups.com
For more options, visit this group at http://grou
ps.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Haml for PHP (Symfony Framework)
user name
2007-09-04 13:02:24
I really do not want to change the spec and when I did this
special tag 
for the %javascript, I must have been thinking about blocks.
So, as soon 
as I implement that part I will make sure that I remove the
support for 
that.

What I was trying to do is to make it as close as possible
(- the ruby 
specific stuff) and I will do my best to be able to just
send them to 
the ruby haml docs and help pages. Exactly for the same
reason I do not 
think the any PHP port needs it's own website and project
page because a 
simple download URL and a link to the Ruby Haml will suffice


Btw, I am using the PHP DOM builder and I was wondering why
you would 
not use such an approach rather than building the html piece
by piece? I 
can see the benefits but would it save you a lot of trouble
with 
indenting and stuff?

Kiril

Hampton wrote:
> This looks really good! Wow, I can't believe there are
*two* PHP Haml
> engines now!
>
> The only issue I see is that technically this breaks
the spec
>
>     %javascript
>       function antispam(ext,domain,name) {
>         document.write('<a href="mailto:' +
name + '' + domain + '.'
> + ext + '">');
>         document.write(name + '' + domain + '.' + ext +
'</a>');
>       }
>
> Nothing can be indented that doesn't mean something.
However, I don't
> really take much issue with this existing in your
version. Its more
> just the way our engine works.
>
> You know, as I type this... its not part of the
official spec in my
> brain. The only caveat is that once you start indenting
"plaintext"
> you are totally out of being able to use Haml tags or
anything. It
> must be a leaf node.
>
> Aka,
>
>     %javascript
>       function antispam(ext,domain,name) {
>         document.write('<a href="mailto:' +
name + '' + domain + '.'
> + ext + '">');
>         document.write(name + '' + domain + '.' + ext +
'</a>');
>         %tag me
>       }
>
> That would break.
>
> -hampton.
>
> On 9/4/07, Kiril Angov <kupokomapagmail.com> wrote:
>   
>> Guy,
>>
>> I thought you might be interested (proud) 
>>
>> http://trac.symfony-project.com/trac/wiki/sfHamlViewPl
ugin
>>
>> Thank you for the good work on the Haml specs.
>>
>> Regards,
>> Kiril
>>
>>     
>
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Haml" group.
To post to this group, send email to hamlgooglegroups.com
To unsubscribe from this group, send email to
haml-unsubscribegooglegroups.com
For more options, visit this group at http://grou
ps.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Haml for PHP (Symfony Framework)
user name
2007-09-04 15:13:10
Yeah, it would. But, its a speed issue for us. We can make
it go much
faster hand coded than abstracted with those tools.

Its why we kick markaby's bootay at speed. DOM building with
objects
is expensive and slow.

-hampton.

On 9/4/07, Kiril Angov <kupokomapagmail.com> wrote:
>
> I really do not want to change the spec and when I did
this special tag
> for the %javascript, I must have been thinking about
blocks. So, as soon
> as I implement that part I will make sure that I remove
the support for
> that.
>
> What I was trying to do is to make it as close as
possible (- the ruby
> specific stuff) and I will do my best to be able to
just send them to
> the ruby haml docs and help pages. Exactly for the same
reason I do not
> think the any PHP port needs it's own website and
project page because a
> simple download URL and a link to the Ruby Haml will
suffice 
>
> Btw, I am using the PHP DOM builder and I was wondering
why you would
> not use such an approach rather than building the html
piece by piece? I
> can see the benefits but would it save you a lot of
trouble with
> indenting and stuff?
>
> Kiril
>
> Hampton wrote:
> > This looks really good! Wow, I can't believe there
are *two* PHP Haml
> > engines now!
> >
> > The only issue I see is that technically this
breaks the spec
> >
> >     %javascript
> >       function antispam(ext,domain,name) {
> >         document.write('<a href="mailto:'
+ name + '' + domain + '.'
> > + ext + '">');
> >         document.write(name + '' +
domain + '.' + ext + '</a>');
> >       }
> >
> > Nothing can be indented that doesn't mean
something. However, I don't
> > really take much issue with this existing in your
version. Its more
> > just the way our engine works.
> >
> > You know, as I type this... its not part of the
official spec in my
> > brain. The only caveat is that once you start
indenting "plaintext"
> > you are totally out of being able to use Haml tags
or anything. It
> > must be a leaf node.
> >
> > Aka,
> >
> >     %javascript
> >       function antispam(ext,domain,name) {
> >         document.write('<a href="mailto:'
+ name + '' + domain + '.'
> > + ext + '">');
> >         document.write(name + '' +
domain + '.' + ext + '</a>');
> >         %tag me
> >       }
> >
> > That would break.
> >
> > -hampton.
> >
> > On 9/4/07, Kiril Angov <kupokomapagmail.com> wrote:
> >
> >> Guy,
> >>
> >> I thought you might be interested (proud) 
> >>
> >> http://trac.symfony-project.com/trac/wiki/sfHamlViewPl
ugin
> >>
> >> Thank you for the good work on the Haml
specs.
> >>
> >> Regards,
> >> Kiril
> >>
> >>
> >
> > >
> >
> >
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Haml" group.
To post to this group, send email to hamlgooglegroups.com
To unsubscribe from this group, send email to
haml-unsubscribegooglegroups.com
For more options, visit this group at http://grou
ps.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Haml for PHP (Symfony Framework)
user name
2007-09-05 10:43:48
True that it is slower than building a string dynamically
 The
thing 
with the PHP port is that every Haml template is
"compiled" to html + 
php and this means that it runs as fast as a normal PHP
script will. And 
I do cache the generated compiled PHP files so the Haml
template is not 
regenerated unless changes (more like sass is done, right?).
Wouldn't 
something like this work for ROR + Haml, to compile the Haml
templates 
to ERB and thus having always the speed of ERB?

Kupo

Hampton wrote:
> Yeah, it would. But, its a speed issue for us. We can
make it go much
> faster hand coded than abstracted with those tools.
>
> Its why we kick markaby's bootay at speed. DOM building
with objects
> is expensive and slow.
>
> -hampton.
>
> On 9/4/07, Kiril Angov <kupokomapagmail.com> wrote:
>   
>> I really do not want to change the spec and when I
did this special tag
>> for the %javascript, I must have been thinking
about blocks. So, as soon
>> as I implement that part I will make sure that I
remove the support for
>> that.
>>
>> What I was trying to do is to make it as close as
possible (- the ruby
>> specific stuff) and I will do my best to be able to
just send them to
>> the ruby haml docs and help pages. Exactly for the
same reason I do not
>> think the any PHP port needs it's own website and
project page because a
>> simple download URL and a link to the Ruby Haml
will suffice 
>>
>> Btw, I am using the PHP DOM builder and I was
wondering why you would
>> not use such an approach rather than building the
html piece by piece? I
>> can see the benefits but would it save you a lot of
trouble with
>> indenting and stuff?
>>
>> Kiril
>>
>> Hampton wrote:
>>     
>>> This looks really good! Wow, I can't believe
there are *two* PHP Haml
>>> engines now!
>>>
>>> The only issue I see is that technically this
breaks the spec
>>>
>>>     %javascript
>>>       function antispam(ext,domain,name) {
>>>         document.write('<a
href="mailto:' + name + '' + domain + '.'
>>> + ext + '">');
>>>         document.write(name + '' +
domain + '.' + ext + '</a>');
>>>       }
>>>
>>> Nothing can be indented that doesn't mean
something. However, I don't
>>> really take much issue with this existing in
your version. Its more
>>> just the way our engine works.
>>>
>>> You know, as I type this... its not part of the
official spec in my
>>> brain. The only caveat is that once you start
indenting "plaintext"
>>> you are totally out of being able to use Haml
tags or anything. It
>>> must be a leaf node.
>>>
>>> Aka,
>>>
>>>     %javascript
>>>       function antispam(ext,domain,name) {
>>>         document.write('<a
href="mailto:' + name + '' + domain + '.'
>>> + ext + '">');
>>>         document.write(name + '' +
domain + '.' + ext + '</a>');
>>>         %tag me
>>>       }
>>>
>>> That would break.
>>>
>>> -hampton.
>>>
>>> On 9/4/07, Kiril Angov <kupokomapagmail.com> wrote:
>>>
>>>       
>>>> Guy,
>>>>
>>>> I thought you might be interested (proud)

>>>>
>>>> http://trac.symfony-project.com/trac/wiki/sfHamlViewPl
ugin
>>>>
>>>> Thank you for the good work on the Haml
specs.
>>>>
>>>> Regards,
>>>> Kiril
>>>>
>>>>
>>>>         
>>>       
>>     
>
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Haml" group.
To post to this group, send email to hamlgooglegroups.com
To unsubscribe from this group, send email to
haml-unsubscribegooglegroups.com
For more options, visit this group at http://grou
ps.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Haml for PHP (Symfony Framework)
country flaguser name
United States
2007-09-05 12:33:50
The thing is that ERB isn't actually all that fast. I
believe at the 
moment Haml's only very slightly slower than (if not just as
fast as) an 
ERB template with the equivalent amount of
dynamically-generated code.

- Nathan

Kiril Angov wrote:
> True that it is slower than building a string
dynamically  The thing

> with the PHP port is that every Haml template is
"compiled" to html + 
> php and this means that it runs as fast as a normal PHP
script will. And 
> I do cache the generated compiled PHP files so the Haml
template is not 
> regenerated unless changes (more like sass is done,
right?). Wouldn't 
> something like this work for ROR + Haml, to compile the
Haml templates 
> to ERB and thus having always the speed of ERB?
>
> Kupo
>
> Hampton wrote:
>   
>> Yeah, it would. But, its a speed issue for us. We
can make it go much
>> faster hand coded than abstracted with those
tools.
>>
>> Its why we kick markaby's bootay at speed. DOM
building with objects
>> is expensive and slow.
>>
>> -hampton.
>>
>> On 9/4/07, Kiril Angov <kupokomapagmail.com> wrote:
>>   
>>     
>>> I really do not want to change the spec and
when I did this special tag
>>> for the %javascript, I must have been thinking
about blocks. So, as soon
>>> as I implement that part I will make sure that
I remove the support for
>>> that.
>>>
>>> What I was trying to do is to make it as close
as possible (- the ruby
>>> specific stuff) and I will do my best to be
able to just send them to
>>> the ruby haml docs and help pages. Exactly for
the same reason I do not
>>> think the any PHP port needs it's own website
and project page because a
>>> simple download URL and a link to the Ruby Haml
will suffice 
>>>
>>> Btw, I am using the PHP DOM builder and I was
wondering why you would
>>> not use such an approach rather than building
the html piece by piece? I
>>> can see the benefits but would it save you a
lot of trouble with
>>> indenting and stuff?
>>>
>>> Kiril
>>>
>>> Hampton wrote:
>>>     
>>>       
>>>> This looks really good! Wow, I can't
believe there are *two* PHP Haml
>>>> engines now!
>>>>
>>>> The only issue I see is that technically
this breaks the spec
>>>>
>>>>     %javascript
>>>>       function antispam(ext,domain,name) {
>>>>         document.write('<a
href="mailto:' + name + '' + domain + '.'
>>>> + ext + '">');
>>>>         document.write(name + '' +
domain + '.' + ext + '</a>');
>>>>       }
>>>>
>>>> Nothing can be indented that doesn't mean
something. However, I don't
>>>> really take much issue with this existing
in your version. Its more
>>>> just the way our engine works.
>>>>
>>>> You know, as I type this... its not part of
the official spec in my
>>>> brain. The only caveat is that once you
start indenting "plaintext"
>>>> you are totally out of being able to use
Haml tags or anything. It
>>>> must be a leaf node.
>>>>
>>>> Aka,
>>>>
>>>>     %javascript
>>>>       function antispam(ext,domain,name) {
>>>>         document.write('<a
href="mailto:' + name + '' + domain + '.'
>>>> + ext + '">');
>>>>         document.write(name + '' +
domain + '.' + ext + '</a>');
>>>>         %tag me
>>>>       }
>>>>
>>>> That would break.
>>>>
>>>> -hampton.
>>>>
>>>> On 9/4/07, Kiril Angov <kupokomapagmail.com> wrote:
>>>>
>>>>       
>>>>         
>>>>> Guy,
>>>>>
>>>>> I thought you might be interested
(proud) 
>>>>>
>>>>> http://trac.symfony-project.com/trac/wiki/sfHamlViewPl
ugin
>>>>>
>>>>> Thank you for the good work on the Haml
specs.
>>>>>
>>>>> Regards,
>>>>> Kiril
>>>>>
>>>>>
>>>>>         
>>>>>           
>>>>       
>>>>         
>>>     
>>>       
>>   
>>     
>
>
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Haml" group.
To post to this group, send email to hamlgooglegroups.com
To unsubscribe from this group, send email to
haml-unsubscribegooglegroups.com
For more options, visit this group at http://grou
ps.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )