commercetools / commercetools-jvm-sdk

The e-commerce SDK from commercetools running on the Java virtual machine.
https://commercetools.github.io/commercetools-jvm-sdk/apidocs/index.html
Other
62 stars 40 forks source link

idea: a module to import sphere data #726

Closed schleichardt closed 8 years ago

schleichardt commented 9 years ago

So the idea is, you checkout a shop template, set credentials and then use sbt shell to import data, like example data for Donut, Sunrise, whatever.

No need to install another stack, like nodejs.

schleichardt commented 9 years ago

@hajoeichler @lauraluiz @nkuehn What do you think?

nkuehn commented 9 years ago

Well, I'm the wrong person to ask. My love for sbt is rather limited.

But even if I loved sbt: We already have a hard time maintaining and keeping the node based commandline importers up to date and complete, so I don't believe that trying to maintain a duplicate implementation without dedicated manpower will result in happy users.

schleichardt commented 9 years ago

I think it already requires a lot of steps to start with sphere and Java:

  1. create a merchant center account
  2. create a sphere project
  3. fork a template/demo, start from scratch
  4. install Java tooling like JDK 8 and Maven (sbt is directly available in the templates)
  5. enter credentials in a file/wizard/environment arg
  6. install nodejs stack
  7. import data
  8. deploy the shop

Especially for donut it would be so simple. The sbt stuff won't be much, the import stuff would be in Java and also could be separated from sbt. I would love to reduce the effort as much as possible. Often stuff is rated how easy you can start with it.

nkuehn commented 9 years ago

ah, maybe I got you wrong. If your goal is "just" the bootstrapping of a new, empty project and not the ongoing data import / export / synchronizations in a production project the idea may be feasible.

But I would not bind it to sbt but provide the functionality library-level, i.e. as some extension to the SDK so that non-sbt environments can use it, too.

schleichardt commented 9 years ago

Exactly.

It would be like sbt runMain io.sphere.donut.ImportMain and then it deletes the merchant center created default data and creates the one product type and product for Donut. So this is not very sbt specific to run a main method.

nkuehn commented 9 years ago

but then it should also set up the necessary minimal tax categories, shipping rates etc that are often forgotten and then break demos. :-)

2015-09-18 22:09 GMT+02:00 Michael Schleichardt notifications@github.com:

Exactly.

It would be like sbt runMain io.sphere.donut.ImportMain and then it deletes the merchant center created default data and creates the one product type and product for Donut. So this is not very sbt specific to run a main method.

— Reply to this email directly or view it on GitHub https://github.com/sphereio/sphere-jvm-sdk/issues/726#issuecomment-141553957 .

Nikolaus Kühn Partner Enablement Manager

nikolaus.kuehn@commercetools.com Phone: +49 172 2873 155 <+491722873155> Twitter: @nikolausku https://twitter.com/nikolausku Adams-Lehmann-Str. 44, 80797 München

[image: commercetools logo] http://www.commercetools.com/

Amtsgericht München, HRB 161496 Geschäftsführer: Denis Werner, Dirk Hörig, Dr. Robert Zores

www.commercetools.com http://www.commercetools.com/de/dmexco/

schleichardt commented 9 years ago

:+1:

hajoeichler commented 9 years ago

Sound like a nice idea to support this specific case. But my vision goes one step further. You just select a template by one click in the MC and everything should be done automagically from your list above. As this a rather future idea, I am fine with a reduce list for now for our demo shops. But therefore I would create specific tasks in the corresponding repos, or?

schleichardt commented 9 years ago

I like the mc idea because the other tech stacks like PHP would benefit from it, but then there is still open how to do this in a batch command for example for tests. So then this mc functionality should be one component which you can use with the node stack or docker.

hajoeichler commented 9 years ago

Good point. We need this functionality independent of the UI. You are right.

schleichardt commented 8 years ago

@lauraluiz @hajoeichler I think this would be great task to show some commercetools JVM SDK + Spring Batch code.

schleichardt commented 8 years ago

An optimistic estimation is 3 days to import categories (I already have for this code) and product types/products. I would directly program it in the Sunrise data repository.

schleichardt commented 8 years ago

we will track the progress here: https://github.com/sphereio/commercetools-sunrise-data