dbehterev's avatar

Need tech. advise about technologies to choose and framework

Hello everybody. I'm stuck at what technology to choose to construct my next web app. Sorry for my language in advance, I'm not native English speaker.

Some days ago I built an web app based on Laravel backend framework and Vue as a basis for building frontend components. But I run into the main problem of Vue - SEO. Your VUE components are awesome, frontend JS is beatiful for manipulating DOM and so etc. I used VUE for downloading all necessary data from backend and after that I render that data on pages. But your pages are blind for web spiders like Yandex or Google because they can't interprets JS in right way (there are a lot of techiques to consolate it, but still frontend JS is like a rock for spiders). I use for some time paid prerender service to redirect to those pages that have a lot of frontend JS. But I don't like it, because it decreases time to render a content and its price.

I've spent some time for learning Node.JS and Nuxt.JS framework. Nuxt.JS is awesome, because it can natively work with Vue and it has builtin prerender, so your frontend components render all data, and rendered page showing on front side without any hassles for webspiders. But for Nuxt.JS you need additional web server on Node.JS like Express.JS in addition to web server for Laravel (Nginx), need some additional work to pair it with Laravel and of cause you get bulky JS libraties that client should download (more than 1 Mbytes - I don't think it is good way). I don't like to complicate things, because we get more faults in the future and difficulties to support all stuff.

So right now I again come back to only Laravel and attaching JS modules that will be help to view data on pages. For example, pagination will be get from backend without rendering it on client side in Vue component and some JS code will help to display data in more convenient way (for ex., search data in displayed table). But again, using JQuery as JS helpers on front side it is like a step back and makes me vomit. Pros and cons in this approach: the code becoming more polluted, but you could save some space on loaded JS modules (in case you will use plain JS that will deliberatelly attached on pages). But you need to make your own bicycle again, have a pain to manipulating DOM when in Vue you could do changes in 1 string of code.

Another approach as I've mentioned above - divide your app on two parts - one will be on Node.JS and you will get all power of prerendering heavy JS components on front end with fully plain code for web spiders. It is like an fresh air, because you could use any JS frameworks and components for rendering data. But the second part you need also support Laravel and also write code on backend side. What do you think guys, which approach is better? Or may be you could mention your stack that you use on real projects?

Another question is about Taiwind CSS framework. Sorry for that question, maybe I should start new thread for it, but anyway, could you tell me, why Jeffrey use tailwind? What is thing make people use that framework? You always should use a bunch of predefined CSS-classes to place your components in right position. The final css file even in production mode more than 600Kbytes. If you use VUE components you could always scoped CSS code to fix some behaviours of components that dictates your chosen framework (like Bulma or Materialize). And this code will be loaded only when component be rendered.

0 likes
3 replies
cookie_good's avatar

Laravel is a PHP framework. It provides a backend for JS frameworks like React and Vue and it ships with them. But if you make this Node, it's no longer Laravel.

dbehterev's avatar

The only thing that makes me use Node.JS - is SEO-oriented content. If I needn't SEO optimized pages, I will use only Laravel for rendering data. And again - we talk about modern approach, when you divide your content on blocks and each block has own CSS markup and own JS, that helps render content and adds functionality.

cookie_good's avatar

I admit, I usually work with non-public facing web apps. But there’s never been anything I couldn’t do with Laravel. I’m sure you can do SEO. that said, if you like node better, then do node.

Please or to participate in this conversation.