Hi, am i right, that Flow is not a good solution if SEO is important?
For example to create a webshop.
Does anyone has experience with it? My applications in Vaadin are only “internal” apps so no need for SEO currently, but this question came up if Vaadin could be usable to create a webstore. Technically i bet it would work, even if the hosting is good enough it will run with a lot of users.
Long answer short: Vaadin is not the right fit for a SEO requiring Web Shop. While their might be workarounds or other hacks available. It’s just not fit for it. Admin Backend for the shop? Definitely. Frontend? No. Web Shop / Application without SEO? Yes
For example Google indexes Vaadin apps and other SPA’s “just fine”, but AFAIK, they still punish them in the ranking. Example to a public facing part of of my hobby apps via Google, this has nothing done for SEO as it is not relevant for it (competition web pages typically link to it directly). Other search engines might not be that good.
“Proper” SEO can be built into SPA apps like Vaadin/React etc, but it can often lead to situation that benefits of the SEO approach and libraries are eaten.
For Vaadin Flow it is now easier to build various SEO hints and social media preview metadata without libraries like the linked Volga add-on (for Vaadin7/8). Some generic helper might thus make sense.
Thus, my hints are pretty much the same as Knoobies, but bit different weighting: if SEO is essential for your success (like there are competing web stores), I’d build the product lists and searches with some traditional web framework that produces raw HTML on the server (like Spring MCV + Thymeleaf). Then parts like “shopping cart” and checkout can utilize more advanced SPA frameworks like Vaadin. Also note that good SEO is not just picking the right tech stack.
If “decent SEO” is enough, SPA based public front-end can be an alternative, but be prepared to do some extra efforts/compromises in the UI.
As an addenum: if you’re building a non-trivial web shop, you might as well look into SAAS services like Shopify which will cost you some money but could save a lot of time and most likely will get you a better result than what you can build yourself easily.
I ran into the same issue and ended up using server-side rendering to serve pre-rendered HTML for bots while keeping the regular app for users. Worked well for SEO indexing.
The HtmlHeaderController is not doing full page rendering (Googlebot at least renders SPAs just fine) but just making sure that the static headers match the content.
Btw, the “SEO” is not only for search engines. There are reasons to do similar things for the preview-functionality of messaging and social media apps like Whatsapp, Slack, etc.