alfresco-sdk icon indicating copy to clipboard operation
alfresco-sdk copied to clipboard

Let's delete all of the sample cruft

Open jpotts opened this issue 7 years ago • 10 comments

The amount of sample files has increased significantly in SDK 3.0.0.

If these files are here to help beginners, this is a bad place for them. We could instead establish a separate "sample project" archetype or something.

If these files are here to support testing of the SDK, could we at least trim them back?

I use the archetype every time I create a new project, which is quite often. I was mildly annoyed by having to delete the sample Java beans before SDK 3.0.0. Now the effort it takes to get rid of all the sample cruft is a lot greater.

I'm happy to do the work of cleaning this up if I know you'll accept the pull request.

jpotts avatar Apr 24 '17 14:04 jpotts

And what is worst, if you don't know about them, or forget about them, you will end up having things you don't really need.

I agree on @jpotts idea about having a separated archetype for sample.

douglascrp avatar Apr 24 '17 15:04 douglascrp

+1

ladenberger avatar Apr 27 '17 09:04 ladenberger

+1

Lukas Ladenberger [email protected] schrieb am Do., 27. Apr. 2017 um 11:09 Uhr:

+1

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Alfresco/alfresco-sdk/issues/462#issuecomment-297658213, or mute the thread https://github.com/notifications/unsubscribe-auth/ADsVZUGncvPRvFd3Fo69Rlj7Skzbzd99ks5r0FtJgaJpZM4NGRxh .

jgoldhammer avatar Apr 27 '17 19:04 jgoldhammer

Yeoman generator has this as an option. Now I need to add SDK 3 support ;)

binduwavell avatar May 07 '17 13:05 binduwavell

Thanks for the feedback, and the offer to help clean it up.

I agree that it's about time we address this, however we need to consider an approach where people can still get a sample project up and running. One common question or concern is "Where do I put my stuff?" - having the sample code and config addresses this.

This could easily be dealt with leveraging the Yeoman generator, or simply get the alfresco-sdk-samples project updated, or just build a zip file with everything and update it on every release.

The major issue I see here is that both Git and Maven Archetypes are notorious for handling empty directories. We may end up having to have at least one file per directory to ensure the directory structure will be created when generating a new project.

With all that being said, I'm giving a +1 to this, however I am not sure we can do this in the 3.0 release as it would efficiently introduce breaking changes - but it is a bit in a grey area.

ohej avatar Jun 23 '17 09:06 ohej

I don't see how this could be considered a breaking change.

On Fri, Jun 23, 2017 at 4:18 AM, Ole Hejlskov [email protected] wrote:

Thanks for the feedback, and the offer to help clean it up.

I agree that it's about time we address this, however we need to consider an approach where people can still get a sample project up and running. One common question or concern is "Where do I put my stuff?" - having the sample code and config addresses this.

This could easily be dealt with leveraging the Yeoman generator, or simply get the alfresco-sdk-samples project updated, or just build a zip file with everything and update it on every release.

The major issue I see here is that both Git and Maven Archetypes are notorious for handling empty directories. We may end up having to have at least one file per directory to ensure the directory structure will be created when generating a new project.

With all that being said, I'm giving a +1 to this, however I am not sure we can do this in the 3.0 release as it would efficiently introduce breaking changes - but it is a bit in a grey area.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Alfresco/alfresco-sdk/issues/462#issuecomment-310616460, or mute the thread https://github.com/notifications/unsubscribe-auth/ABz-22Ge2nhRXiPq7-WoGXAYJij_PTpiks5sG4L7gaJpZM4NGRxh .

jpotts avatar Jun 23 '17 22:06 jpotts

I just helped another new Alfresco SDK user learn how to comb through his SDK project deleting sample files. So I popped in to see where we are on this.

I do like that the Yeoman generator has this option and that tool is useful, but there are people who would be reluctant to add node and npm to their build stack only for this.

Looks like we have a bunch of +1's and no one saying this should not be done. So how about it?

jpotts avatar Apr 20 '18 21:04 jpotts

Don't need node and npm in build stack, only on dev machine when you create project.

binduwavell avatar Jan 29 '19 15:01 binduwavell

Why did this get closed? Are you deleting all the sample cruft from the SDK?

jpotts avatar Sep 09 '21 19:09 jpotts

Thank you @jpotts, it got closed by mistake along with other old/stale issues as part of a housekeeping operation.

Let's reopen it, it makes sense and it might be addressed at a certain point.

andrea-ligios avatar Sep 10 '21 08:09 andrea-ligios