Blade vs Antlers (from v3.3) #6189
Replies: 8 comments 24 replies
-
Yeah, I'd say it just depends on what you're more comfortable with. Before 3.3, you did lose out on quite a bit of functionality going with Blade but I don't believe that's the case at all. Maybe someone else with more Blade experience can comment though. |
Beta Was this translation helpful? Give feedback.
-
I am interested in this as well. DO all the same "antler" syntax work with blade as well? |
Beta Was this translation helpful? Give feedback.
-
I'm starting to wonder if removing Antlers might be better for statamic & the developers behind it.
|
Beta Was this translation helpful? Give feedback.
-
I completely agree with @Christophvh. The way I see it, Statamic could choose to maintain 0 templating engines, rather than 1. Obviously there is a sunk cost there (which of course was absolutely necessary to get the project running), but I really just don't think it is necessary anymore. I understand that many people prefer the antlers syntax to blade, but for those people (of which I am one), I would think it more worth Statamic's time to just maintain a twig integration, rather than a whole templating engine. With the example @jasonvarga gave {{ foo }}
{{ bar }}
{{ /foo }} while the syntax is leaner, it is less explicit about what is going on - does After working extensively with ExpressionEngine templates (which share a number of similarities with antlers), I've experienced the confusion around interpreting template code that I articulated above, as well as the frustration of working with a templating engine that struggled to keep up with modern templating features and keeping things documented well. Now there are many reasons for this in EE, but one is the simple fact that they have a small team with a whole CMS to maintain, so their templating engine and associated tooling can only get so much investment. Now, Statamic has done a remarkable job keeping up with Antlers so far (much better than EE did with their engine), but it doesn't change the fact that it's an added burden to a small team that could be spending their time solving new problems on the cms side (or even contributing to twig, if you really have the time), or the fact that even after the big antlers engine rewrite (which is a great improvement) twig is still slightly more feature robust. Bottom line - I get that having a "{{" based templating system is preferable to blade for many (and prefer it myself), but I would think it a more sustainable long term path to just maintain a twig integration, rather than maintain antlers. |
Beta Was this translation helpful? Give feedback.
-
For what it's worth. I ❤️ Antlers and prefer it over Twig and definitely Blade. The syntax is lean and super easy to learn. Jack has stated before that maintaining Antlers isn't even that much work (regex) and now John does a fantastic job with maintaining Runtime. Me and thousands of other people prefer Antlers and its simply part of the core product. I don't understand why anyone would want it removed so badly. Simply pick whatever suits your preference. Statamic already has the biggest feature set of any CMS I know plus it offers two templating languages. One tailored for devs, the other for frontenders / designers. |
Beta Was this translation helpful? Give feedback.
-
In my case, I build Laravel projects that may or may not use Statamic - A lot of my projects exist long before a CMS is required. So my templates are already written in Blade and utilise Blade components. I had a frustrating introduction to Statamic 3.0 because of my Blade requirements. Things are much better now at v3.3 but I can't help but wish that as much attention is given to Blade as it is to Antlers. For me, the most important thing is that my templating language works alongside the framework & development tools - Blade is powerful in this respect. Antlers make Statamic stuff easier but I find it makes Laravel stuff harder. I almost never see the need for an Antlers Modifier but I have ran into many Blade related problems. This argument will likely go on forever and intensify as more Laravel-first developers start using Statamic. I know Statamic has to stay loyal to Antlers so I guess the only option is that it will have to continue to support both engines. I do worry though that Antlers is holding back Blade and Blade is holding back Antlers, and that someday Statamic may go in the opposite direction, e.g. a focus on Antlers components or something. If your choice of templating engine is truly optional then maybe Statamic should separate itself from Antlers to some degree, otherwise important architectural decisions might be made from an Antlers perspective. Saying all this though, things are good now and long may that continue. Let me also say that Statamic is everything that I've always wanted a CMS to be and the developers have been top-notch with communication and improvements. I'm sure that Antlers is nice to work with. I might try to give it a proper go someday, but nevertheless I am tied to Blade, and so I feel like the argument for 100% Blade support is important. |
Beta Was this translation helpful? Give feedback.
-
Hey, I'm new here. I just thought I would chime in... I'm interested in using Spatie's Laravel Comment package (Livewire). I've had a heck-of-a-time getting it to work w/ Antlers. I fear that Antlers might give me some additional issues in the future. I think I prefer Blade at this point.... not sure yet though.... |
Beta Was this translation helpful? Give feedback.
-
Nothing wrong with mixing and matching.
… On Nov 4, 2022, at 10:51 AM, Ryan Mitchell ***@***.***> wrote:
Livewire definitely works better with blade
—
Reply to this email directly, view it on GitHub <#6189 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAAK5QZG26FC5BVDMX4J4ETWGUPGRANCNFSM5YPNK73A>.
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
-
TL;DR. Is it just a matter of preference at this point?
Blade now has better support in Statamic and Antlers got the missing features of Blade. I lean towards Blade because I think for some projects that are more integrated with Laravel, it makes more sense.
Or am I missing something? Are there some objective advantages of Antlers?
Beta Was this translation helpful? Give feedback.
All reactions