Skip to content

Commit c5d814b

Browse files
committed
add docs for split packages
1 parent 2e7a653 commit c5d814b

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
package com.commercetools.docs.meta;
3+
4+
/**
5+
* {@include.toc}
6+
* <h2>Optimizing package size</h2>
7+
*
8+
* <p>Optimizing the size of applications in a size constrained environment like AWS Lambda can
9+
* be challenging.</p>
10+
*
11+
* <h3>Using split packages</h3>
12+
*
13+
* <p>For an application which covers the whole business logic and may act as a backend
14+
* for frontend it's advised to use the <code>commercetools-sdk-api</code> package.</p>
15+
*
16+
* <p>When developing small function applications which will be used in a size constrained environment
17+
* the SDK offers packages split by their domain. Due to the connections between the different domains
18+
* the split is realized after compilation and doesn't reflect the whole dependency graph of all packages.
19+
* You will have to explicitly define the packages you intend to use.</p>
20+
*
21+
* <p>We provide an {@see <a href=https://github.com/commercetools/commercetools-sdk-java-v2/tree/main/examples/split-packages>example</a>} for using split packages</p>
22+
*
23+
* <p>The packages always start with the prefix <code>commercetools-sdk-java-api-models</code></p>
24+
*/
25+
public class SizeOptimization {
26+
}

src/main/javadoc/overview.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ <h2>Customization</h2>
7777
{@link com.commercetools.docs.meta.ClientTuning Client Tuning}
7878
{@include.toc com.commercetools.docs.meta.ClientTuning}
7979
</li>
80+
<li>
81+
{@link com.commercetools.docs.meta.SizeOptimization Optimizing package size}
82+
{@include.toc com.commercetools.docs.meta.SizeOptimization}
83+
</li>
8084
</ol>
8185
<h2>Other</h2>
8286
<ol>

0 commit comments

Comments
 (0)