croxton / Stash

Stash allows you to stash text and snippets of code for reuse throughout your templates.
GNU General Public License v3.0
197 stars 20 forks source link

Production Version #39

Closed loren138 closed 11 years ago

loren138 commented 11 years ago

Am I correct in saying that their is no version suitable for production use between 2.1 and the current release? I would really like to use the stash embed for speed reasons, but that is only possible after 2.2.

mhair commented 11 years ago

I'm very interested in this as well. It's very hard to determine the production quality of the embed tag at the moment specifically, and the progress of stash in general. Hard to know if it can be relied upon. I think it would be helpful to the community to clarify that. It's an awesome leap forward as an EE development pattern, don't think there is any debate there.

croxton commented 11 years ago

I'm working towards a stable release point at 2.4.0, which is very close now. In terms of 'robustness' the dev branch is now almost certainly the more robust code base. Most of the new documented features have been added and what I'm mainly doing now is preparing the ground for a forthcoming stash-cache management add-on and implementing minor feature requests (such as the ability to embed different types of files).

Embeds- 2.3.8 will be released shortly that addresses an edge-case bug when using stash embeds with process='inline' in a particular combination with other embeds. Other than that bug, embeds have been working well for me in production for over a year. I wouldn't want to build a site without them.

To get the best out of Stash embeds requires some thought and experiment. While you can use them as a drop-in replacement for EE embeds, they need to be tuned to yield better performance. That means planning what you want to cache and how best to encapsulate and link your template code. If you encounter problems with stash embeds it's likely to be around implementation issues rather than the code itself. I do my best to help people with implementing patterns, but, as a new method of EE development, obviously there aren't a huge amount of practical examples out there.

Personally I would have no hesitation in embracing stash embeds, but then I wrote it! Ultimately the decision it is of course up to you and your level of experience.

mhair commented 11 years ago

Thanks Mark. This insight and mini-map helps a lot! I had been experimenting for some time before Christmas, finally getting some good results, when that project was put on hold. Planning on a restart very soon. The fact that it is a client project is what warranted my concern on the robustness, hence my question about using it in production code some time ago. I had experienced some bugs (code execution in comments for one, don't recall the other) and frustration in general getting it to work properly. But as you said, it just takes some experimentation, plus reading as many examples as you can find.