Skip to content
This repository was archived by the owner on Mar 21, 2021. It is now read-only.

Feature Set, Vue CLI and some general question #1

Closed
atomfrede opened this issue Aug 17, 2018 · 28 comments
Closed

Feature Set, Vue CLI and some general question #1

atomfrede opened this issue Aug 17, 2018 · 28 comments
Labels
help wanted Extra attention is needed

Comments

@atomfrede
Copy link
Member

  • What features do we want to support?
  • Should we build upon vue-cli and if yes which feature do we select?
  • Do we want to use typescript or not?
  • How to start best? Doing a sample jhipster project without client and build vue(cli) based client on that?

What do you think?

@atomfrede atomfrede added the help wanted Extra attention is needed label Aug 17, 2018
@sahbi-ktifa
Copy link
Member

I created a sample jhipster project, redoing all components as Angular ones :

  • I used Axios as recommended by Vue documentation for http request
  • Vuelidate for form validation
  • VueI18n for dynamic translation
  • VueCookie ans VueX to maintain app state
  • Webpack configurations were inherited from vue-cli but can clearly be enhanced
  • Finally, I did not used TypeScript but regular JavaScript

I should add my work on a fork to let you review it (of course, it's only a draft at the moment, and should be challenged). I'll do it asap.

@atomfrede
Copy link
Member Author

Sounds great. We are using a similar stack except VueX as we have quite small micro frontends so not much state management required. I would also go with plain javascript instead of typescript 👍

@gurbirdhillon
Copy link
Member

gurbirdhillon commented Aug 17, 2018

Here are my thoughts:

  • Vue-Cli is good as it can take care of lot of boiler plate setup.
  • VueX is nice to have but don't really essential.
  • I would also go with plain javascript instead of typescript (preferred by VueJs community)
  • Axios is also my fav for http request.

I also like @sahbi-ktifa ‘s setup.

@sendilkumarn
Copy link
Member

I like @sahbi-ktifa setup, it does cover most of our wanted features.

Vue-CLI is a good option, but based on our experiences / discussions / opinions with Angular CLI and CRA. Let us not take that.

👍 for JavaScript but Vue 3 will have a complete focus on TypeScript (so we will surely have a discussion that time whether we want to switch to that) - Just a heads up.

@deepu105
Copy link
Member

deepu105 commented Aug 18, 2018

I agree with most of it and let's start with what @sahbi-ktifa has. Let's go with what is most used in the Vue community. I think its good to start with VueX as most of the real-world use cases would end up needing some state management. If Vue CLI is useful let's use it but we also need to ensure that the Vue support closely follows Angular/React as well to avoid defragmentation.

Regarding TS vs JS, though I was not a fan of transpiling type systems, after using TS for almost a year I really like it (when used practically and not being a type nazi) its really helpful in code management/refactoring etc and I guess will help our community which is mainly back-end people. SO if possible I would like to stick to TS as we do the same for Angular and React. And as @sendilkumarn pointed out if Vue 3 is gonna focus on TS then as Hipsters we should start that already 😉
btw @sendilkumarn can you share some link on the news about TS focus on Vue?

@gurbirdhillon
Copy link
Member

Here is quick read/benefits for using vue-cl version 3.
https://medium.com/the-vue-point/vue-cli-3-0-is-here-c42bebe28fbb

@deepu105
Copy link
Member

In that case we could use Vue CLI with typescript

@hdurix
Copy link
Member

hdurix commented Aug 18, 2018

I currently work on a Vue.js application integrated with JHipster as well. Here are the technologies we chose:

  • Vue CLI (really useful and we didn't notice any limitation until now, webpack can still be configured for extra needs), it could be the good project to try to use a CLI and see what solution is best.
  • Typescript (it does work very well with Vue, expect it sometimes needs a few tweaks, especially for unit tests) & TSLint
  • Jest for unit tests (coverage is well integrated with Vue CLI, as opposed to mocha + chai solution / however some troubles with cache)
  • Cypress for e2e tests (no problem using it, it works like a charm)
  • Axios for HTTP requests

@atomfrede
Copy link
Member Author

+1 so Vue CLI with typescript, jest and cypress and tslint it is.

@deepu105
Copy link
Member

For e2e wouldnt it be easier to just use the protractor tests from the react client as I believe it can just work as it is without any major change

@hdurix
Copy link
Member

hdurix commented Aug 18, 2018

I agree with @deepu105, if the couple vue+protractor is working, we should use protractor instead of cypress.

@atomfrede
Copy link
Member Author

Let's see how it works. I would suggest lets start and maybe give cypress a try as it is the preferred solution in the vue community, so if it works we don't need to maintain special configuration for protractor (writing tests is imho easiert) and we can rely on the power of the vue community and it might attract more vue developers to contribute (maybe).

@deepu105
Copy link
Member

@atomfrede I was thinking of a quick win so that we can reuse the same templates from React instead of maintaining another set of templates. I was even thinking of moving all the e2e tests out and reusing the same for Angular and React since they are pretty much similar

@atomfrede
Copy link
Member Author

@deepu105 Yes makes totally sense. Maybe just let's get started and not too much thinking about what we use for e2e testing now and decide when we need to. There is much work we need to do before.

@Gnuk
Copy link
Contributor

Gnuk commented Aug 19, 2018

I work currently with @hdurix on a JHipster and Vue.js project.

We use all Vue.js features he said but also:

  • Pug templates because it's very succinct, so I think it's interesting to let people use it but not force them.
  • Separate Pug and TypeScript files on .vue components.
  • VueI18n for translations

We don't use style on the project because we create a pattern library but in this library, we use the preprocessor Sass with dart-sass wich is now the official implementation of Sass.

The webpack configuration exists since August 1, 2018 and it's planned on Vue CLI.

I think Sass is a good preprocessor but I think there could be an option to choose what we want like in Vue.cli. But if it's too complicated to add options on this part in a first version, I think it could be interesting to prefer Sass with SCSS syntax because it's CSS compatible.

We also use stylelint in addition as a CSS linter with SCSS config recommendation scss-config-recommendation.

About Cypress, I think it's really good because it's easy to use with response stubbing and protractor is not officially supported by Vue.js.

Overall, I think Vue.js is currently used differently between the community and It will be better if JHipster let the ability to keep a flexible Vue.js environment. I think it could be really interesting to open Vue.js project in Vue CLI using vue ui and debug using Vue.js devtools.

@Gnuk
Copy link
Contributor

Gnuk commented Aug 19, 2018

@deepu105 In the Vue.js #q-and-a Discord channel, you can read it:

evan Hier à 18:26
@George Vue core will be refactored to use TypeScript. In that process we also plan to improve general type-friendlyness of the APIs.
^ that's for v3

@deepu105
Copy link
Member

@Gnuk thanks for the info.

I think we shouldn't overcomplicate stuff. Lets stick to options that are available in JHipster to start with so the stack would be

  • VueJS written in Typescript
  • Jsx or html for templates
  • Vuex
  • Vue Router
  • Vue CLI
  • Axios
  • Vuei18n
  • Sass and css options (css can be later and Sass can be default for now)
  • Jest
  • Protractor if it works without any additional work else we can switch to Cypress
  • Tslint , prettier

@deepu105
Copy link
Member

First lets migrate the default monolith app to Vue so that the default options are supported to begin with. Once thats done we can start implementing additional options. Does everyone agree? If so we can create new tickets and decide who will do what.

@Gnuk
Copy link
Contributor

Gnuk commented Aug 19, 2018

Except I don't know how it's difficult to have both Tslint and prettier (cf this issue), i agree with it.

@sahbi-ktifa
Copy link
Member

I agree too.
Should I still make my work available as a blueprint even if it's only a start using JavaScript or should we rewrite it from scratch using TypeScript and all the above? If so, I'll wait for tickets 😉

@deepu105
Copy link
Member

deepu105 commented Aug 20, 2018 via email

@sendilkumarn
Copy link
Member

@sahbi-ktifa I too agree that we will start with js and then gradually move towards ts
I would say ver.1 can be in js and then change to ts later.

@jdubois
Copy link
Member

jdubois commented Aug 21, 2018

I totally agree with the stack proposed by @deepu105 - that way it is pretty close to what we already have with Angular and React, and we can hope to have some common code here. Besides, it's very important for our users, as they will be able to move from one stack to the other: that's one of our big selling points on the server side (for example, MongoDB and MySQL look really similar, so people can shift from one project to another easily), so I'd love to have the same on the client side.

In order to help you here, I would like to open $500 in bug bounties in September -> if you can create 5 "feature requests" from the stack here, I will give them the $100 label next month.

@deepu105
Copy link
Member

@jdubois thats a good idea. I'll create tickets and assign the label for the important parts at the beginning of September. Is that ok?

@jdubois
Copy link
Member

jdubois commented Aug 21, 2018

Yes please do.

@Gnuk
Copy link
Contributor

Gnuk commented Aug 27, 2018

There is a discussion to know how to have official Vue CLI documentation on integration with backend frameworks.

I think we could participate to this discussion with the Vue.js community to help them or propose a standard documentation to have Vue CLI with Spring Boot like we'll do with this feature.

What do you think about this suggestion ?

@jdubois
Copy link
Member

jdubois commented Aug 27, 2018

@Gnuk yes, definitely +1
VueJS looks like a much nicer project than Angular (I don't know for React), from what I see they are trying to work with third-party projects, and that's awesome. I'll answer on their thread.

@deepu105
Copy link
Member

deepu105 commented Sep 7, 2018

closing as its decided

@deepu105 deepu105 closed this as completed Sep 7, 2018
sahbi-ktifa pushed a commit that referenced this issue Jan 19, 2019
* issue #210 : use store values, instead of multiple api calls

* issue #210 : use store values, instead of multiple api calls

* issue #210 : PR review #1

* issue #210 : PR review #1
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

8 participants