Jump to content

Recommended Posts

Posted

Great write up thank you.

For 2 recents project i've also explored this kind of MVC-ish approach and it works quite well.

P.S : little typo spotted in this sentence "In Processwire you can organize your code the way it make most senSe..."!

  • Like 1
Posted

Great write up thank you.

For 2 recents project i've also explored this kind of MVC-ish approach and it works quite well.

P.S : little typo spotted in this sentence "In Processwire you can organize your code the way it make most senSe..."!

Thanks pal :)

Yeah it´s similar to MVC but its not.

Here´s a write up in spanish that explains (For Laravel) why not use MVC for web applications

https://styde.net/porque-laravel-no-es-mvc-y-tu-deberias-olvidarte-de-mvc/

Basically tells you that MVC can´t cover all the use cases that happens when you create web applications. So you need a flexible approach and use whatever you need to accomplish the job.

The Wire Render Pattern is flexible enough for you to arquitect a web structure easier to mantain and colaborate with other tools and ideas :)

Posted

I'm using a similar setup in my PW projects. The major difference is that I'm using Latte template language which takes it a step further by allowing master templates, overridable/extendable blocks, email templates, includes with variable passing, etc. Plus much cleaner code in view files, which alone would worth the switch :).

I like it just as much as I like PW, but having both at hand is the best. I've tried switching to Twig but I felt it less productive.

While I agree with Ryan that PW doesn't need a template language, using one can save a lot of time.

  • Like 1
Posted

What I use a lot is:

ob_start();
include('tralala.php');
$var = ob_get_clean();

This way tralala.php has access to all variable above ob_start(); (no need to pass it variables)

  • Like 1
Posted

I'm using a similar setup in my PW projects. The major difference is that I'm using Latte template language which takes it a step further by allowing master templates, overridable/extendable blocks, email templates, includes with variable passing, etc. Plus much cleaner code in view files, which alone would worth the switch :).

I once found this tutorial for using Latte with PW, it doesn't seem to have been posted to the forums yet: http://blog.rolandtoth.hu/post/115654747977/double-delight-processwire-with-latte

Posted

I need to rewrite that post because there are many improvements and simplifications in that process. My ultimate goal is to create a site profile (maybe a multilanguage one) with Latte.

  • Like 4
Posted

I have to re-write a half-ready WP site so I will make a simple skeleton for the site profile.

  • Like 1
×
×
  • Create New...