Documentation for Sintags is really scarce, I personally refer people to unit test data files, which showcases sintags syntax converted PHP.
I've read statements somewhere in the site to the effect that it's possible to write entirely platform-portable views that will work in Rails or Akelos with no change necessary
This statement is false. Sintags is far from being a full Ruby interpreter. It would be nice to support as many idioms as possible to make it simpler for designers to manipulate erb and sintags views in the same way. Contributions on making this happen really welcomed.
I see form_for is defined, but I'm unclear on how to translate its usage in PHP (manually assigning a form builder object to a variable and calling helper methods of that object vs the Ruby-style block with pipe-delimited argument list)
This example is taken from the form_helper unit test.
<? $f = $form_helper->form_for('person', $person, array('url' => array('action' => 'update'))); ?>
<?=$f->text_field('person', 'name')?>
<?=$f->password_field('person','password')?>
This may seem trivial but I'm of the mind that if I have the option of porting things back and forth with as little fuss as possible, why not write views that way as a matter of practicality and treat it as a kind of safety net for my app should I choose to jump ship on one platform?
Sintags is not erb. Making views 100% compatible might be possible but requires a lot of contributions from those interested in having such a feature.
Other things in the erb of Akelos are that I can't print simple strings (<%= 'testing' %> or even variables (<%= test_var %>). I can only make calls to helpers, unless I'm mistaken.
Thats right, you have a cleaner way to do it in Sintags (it was its original purpose)
testing
{test_var}
See more details on basic Sintags
I'll certainly contribute updates to helper code to bring it more in line with current Rails helpers as I wrap my head around this more. I'll also contribute to documentation.
Great, we need contributions to help us improve Akelos for everyone.
Any links to existing, extensive documentation, particularly aimed at existing Rails devs who are well-versed in PHP, would be greatly appreciated as well!
Have a look into the tests, inline docs and the wiki.
Compiled views are no meant to be pretty :), but if you want to contribute that cosmetic change go ahead and submit your patch
1 to 5 of 5