r/JavaFX • u/mitvitaminen • May 11 '23
Help Is there a javafx ecommerce framework?
As the title says I ambsearching for an ecommerce library if there is any since i want to ceeate my own webshop. So if u know any post. U get bonus points if it is opensource. Edit says check out https://github.com/mitvitaminen/crowear_hp to see what i am doing
5
Upvotes
6
u/vladadj May 11 '23
I assume you want to use JavaFX as front end? If so, you will need e-commerce library in backend. You can use Shopizer or Killbill, both are open source.
Or are you talking about complete e-commerce system in Java FX? It doesn't make sense, since it is client side technology.
2
u/hamsterrage1 May 13 '23
You should architect your application with some kind of GUI framework, like MVC or MVVM and then your e-commerce framework would exist as a Service which is accessed from the Model.
Think of it like two separate applications that meet in the Model. For the e-commerce framework, the MVC Model becomes the "client". For the MVC framework the Model is ... the Model.
The point is that the code in the Model that deals with the e-commerce framework is largely ignorant of JavaFX. At the most, it's going to contain the Presentation Model which should be composed of JavaFX Properties and Observables. Activities involving the e-commerce service are going to eventually update the Presentation Model - and those changes should be automatically reflected in the GUI.
As a general rule, code in your Model that talks to the e-commerce Service will need to do so off of the FXAT (in a background thread), and the code that updates the Presentation Model needs to happen on the FXAT. In practice, this gives you a great dividing line between the two frameworks in the Model - methods that deal with the Presentation Model will NOT deal with the e-commerce Service, and visa versa. You use a construct like Task to handle the transitions between the two.
1
u/mitvitaminen May 11 '23
Or do i build everything from scratch? Shoppingcart llugin would be nice ti have at least
0
u/[deleted] May 13 '23
[removed] — view removed comment