deepthinkit / patternlab-for-sling-demo

MIT License
9 stars 0 forks source link

Intended usage question #1

Open yan-kisen opened 5 years ago

yan-kisen commented 5 years ago

Very intriguing project.

I'm wondering about the actual usage of it when developing components.

Do you intend for AEM developers to add the .content.xml & dialog configurations inside of molecules/ & atoms/?

OR

Is the idea to separately create the typical project structure beneath apps/ and then create components which reference the pattern elements?

<sly data-sly-use.pattern="patternlab-demo/molecules/blocks/hero.html"
         data-sly-call="${pattern.hero @  link=hero.link, img=hero.img, headline=hero.headline}/>
kciecierski commented 5 years ago

Hi Yan,

Thanks for your interest in this project!

The idea for development is to separate pure HTML Template logic from typical AEM Backend logic like developing Sling Model. The FE part of the components can be then developed without the need to implement the backend part. With Pattern Lab for Sling you can mock the data using JSON files that is input for HTL templates for patterns and display them in Pattern Lab. You can then see how the component will look like even when you have not developed dialog and provided logic to inject it into HTL mark up. Regarding dialogs for molecules, atoms etc. it is up to you. You can use implement dialog parts required for patterns and then include them in the final components to increase dialogs reusage.

You can read more about the actual purpose of the project in the main repo for patternlab-for-sling:

https://github.com/deepthinkit/patternlab-for-sling

Best regards, Kamil