vue-shopping-clean-architecture icon indicating copy to clipboard operation
vue-shopping-clean-architecture copied to clipboard

Great Job!

Open st-schneider opened this issue 4 years ago • 5 comments

Just to let you know, I was searching for exact this kind of example with DDD, DI, RxJS ... with an ecommerce theme. I found this via https://daily.dev/ -> https://vuejsexamples.com/ Awesome job can't wait to explore the repo.

st-schneider avatar Feb 28 '20 08:02 st-schneider

Glad you find that helpful! I’m still exploring clean architecture and find that the division of use cases layer makes it easy to grab the idea of the system.

On the vue side, however, there is an issue when applying rxjs to vuex store. As you can see, to prevent a single subscription in action, I convert the observable to promise, but I think it might be better to use tap to handle side effects like update the state, and only actually subscribe inside components.

There're still many things to do but have fun exploring!

thanhchungbtc avatar Feb 29 '20 08:02 thanhchungbtc

I really like just reading the code and it is really awesome. Learned a lot already. https://github.com/vuejs/vuex-observable doesn't this solve the actions observable problem with vuex?

st-schneider avatar Mar 01 '20 02:03 st-schneider

Thank you for the link! Just checked and it's so cool! I'm new to rxjs so it might take some time, but I like the idea of using observable in the store and will try to implement it.

thanhchungbtc avatar Mar 01 '20 13:03 thanhchungbtc

I'm new to DDD and DI and rxjs :) I'm still looking for a good reason to use rxjs in the front end. So with all the libs in use, what is your bundle size for now?

st-schneider avatar Mar 01 '20 17:03 st-schneider

As you can see in the demo, the chunk size takes around 450KB, and ~140KB after gzipped. I think it's reasonable, but never try to compare with other solutions like react or angular though. The reason for using rxjs for me right now is that the ease of switching between http service and websocket, without affecting the app layers (including the store)

thanhchungbtc avatar Mar 01 '20 22:03 thanhchungbtc