Jump to content

The Wire Render Pattern


clsource
 Share

Recommended Posts

Hello friends,

I have been using the wireRenderFile() function a lot.

Since the inclusion of the wireRenderFile() method I made all my websites using this pattern.

This is a medium post that I made explaining it.

https://medium.com/@clsource/the-wire-render-pattern-806bf6d6097a?source=featured---------1

All the files will be uploaded here

https://github.com/NinjasCL/wire-render-pattern

:P

  • Like 18
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

 Share

×
×
  • Create New...