Hacker News new | past | comments | ask | show | jobs | submit login

Hi! I am a Frontend engineer at GitLab.

Our frontend application was originally built with Rails. When we added Vue, we did not refactor our entire code base.

This means that we've kept the existing server rendered pages. Once the page is rendered we build our vue app on top of it.

The reasons why we pass certain data through HTML is: 1 - Avoid duplication. Our endpoints and paths are still built in rails, by passing them through data attributes we keep only one single source of truth 2 - Passing data from the server to the Vue App Some data is not being sent through the API, but we still need to access it. For those cases we also use the data attributes.

We know that this is not ideal but it was a mid term solution that allowed us to quickly add Vue.

You can read more about our architecture with Vue in this blog post: https://about.gitlab.com/2017/06/29/gitlab-at-vue-conf/




Awesome, makes perfect sense :) I get why you guys have to do this now.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: