Einführung in den "Lean Stack" beim Donnerstalk im heimathafen Wiesbaden
SeedStack, the lean development stack
-
Upload
seedstack -
Category
Technology
-
view
390 -
download
2
Transcript of SeedStack, the lean development stack
![Page 1: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/1.jpg)
The lean development stackAdrien LAUER
SeedStack
![Page 2: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/2.jpg)
2 of 24
HistoryProject started late 2012
10+ years experience of frameworksCustomOpen-Source: mainly Spring
![Page 3: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/3.jpg)
3 of 24
GoalsBuild a common development stack
Shared across all business entitiesManufacturing / logistics / finance / sales / R&D / …
Being extensible
Enabling re-use
![Page 4: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/4.jpg)
4 of 24
OrganizationCore team at PSA Peugeot CitroënOther members at various locations
http://seedstack.orghttps://github.com/seedstackTwitter: @seedstackIRC: #seedstack on freenode
![Page 5: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/5.jpg)
5 of 24
Get presentation code samples at
https://github.com/adrienlauer/poss-samples
![Page 6: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/6.jpg)
6 of 24
Core valuesOpinion
A reference architecture for your apps
ModularitySingle responsibility principle
ExtensibilityOpen-Closed principle
![Page 7: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/7.jpg)
7 of 24
FoundationJavaSet of technologies to build backends
WebSet of technologies to build Web apps
BusinessDomain-Driven Design (DDD) approach
![Page 8: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/8.jpg)
8 of 24
FoundationJavaSet of technologies to build backends
WebSet of technologies to build Web apps
BusinessDomain-Driven Design (DDD) approach
![Page 9: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/9.jpg)
9 of 24
Java focusKernel + plugin architecture
One plugin per concernScalable
One global Guice injector
Unified configuration
Plugin discovery
Classpath scan Initialization
![Page 10: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/10.jpg)
10 of 24
Sample pluginpublic class MyPlugin extends AbstractPlugin { private final Set<Class<?>> annotatedClasses = new HashSet<>();
@Override public String name() { return "my-plugin"; }
@Override public Collection<ClasspathScanRequest> classpathScanRequests() { return classpathScanRequestBuilder().annotationType(Service.class).build(); }
@Override public InitState init(InitContext initContext) { annotatedClasses.addAll(initContext.scannedClassesByAnnotationClass().get(Service.class)); return InitState.INITIALIZED; }
@Override public Object nativeUnitModule() { return (Module) binder -> annotatedClasses.forEach(binder::bind); }}
![Page 11: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/11.jpg)
11 of 24
So we built the core…Contains the kernel
Provides basic featuresLaunchingConfigurationIoCService commandsDiagnostics
![Page 12: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/12.jpg)
12 of 24
Then we scaled up…10+ plugins
TestingSecurityTransactionsRESTMetrics / healthWeb…
Adding new technologies is quick and easy
All PSA requirements have been covered
50 satisfied projects over two years
![Page 13: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/13.jpg)
13 of 24
FoundationJavaSet of technologies to build REST backends
WebSet of technologies to build Web apps
BusinessDomain-Driven Design (DDD) approach
![Page 14: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/14.jpg)
14 of 24
Web focusLoader + fragments architecture
A fragment per concernComposable
Configure and initialize an SPA
Fragment download
Configuration computing Initialization
![Page 15: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/15.jpg)
15 of 24
Sample fragment{ "id": "demo", "name": "W20 POSS demo", "modules": { "user": "{demo}/modules/user" }, "i18n": { "en": [ "{demo}/i18n/messages-en.json" ], "fr": [ "{demo}/i18n/messages-fr.json" ] }, "routes": { "hello": { "template": "<div class=\"container\"><h1>Hello World!</h1></div>", "hidden": true }, "user": { "templateUrl": "{demo}/views/user.html", "controller": "UserController" } }}
![Page 16: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/16.jpg)
16 of 24
Main featuresBased on popular libraries
AngularJSRequireJS
Advanced enterprise features
Multi CSS frameworkBootstrapAngular material
Theming support2 Open-Source themes3 PSA proprietary themes
![Page 17: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/17.jpg)
17 of 24
FoundationJavaSet of technologies to build REST backends
WebSet of technologies to build Web apps
BusinessDomain-Driven Design (DDD) approach
![Page 18: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/18.jpg)
18 of 24
Level of involvement
Annotations
Interfaces
Base classes
![Page 19: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/19.jpg)
19 of 24
Building blocks
![Page 20: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/20.jpg)
20 of 24
Main featuresDDD semantic + injection
Easy-to-use default implementations
Smart DTO / domain mapping
Built-in identity generation strategies
![Page 21: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/21.jpg)
21 of 24
Sampleclass SaleServiceImpl implements SaleService { private final Repository<Seller, Long> sellerRepository; private final DomainRegistry domainRegistry;
@Inject public SaleServiceImpl(Repository<Seller, Long> sellerRepository, DomainRegistry domainRegistry) { this.sellerRepository = sellerRepository; this.domainRegistry = domainRegistry; }
@Override public void updateBonus(Order order, Long sellerId) { Seller seller = sellerRepository.load(sellerId); if (seller == null) { throw new IllegalArgumentException("Seller " + sellerId + " cannot be found"); }
BonusPolicy bonusPolicy = domainRegistry .getPolicy(BonusPolicy.class, seller.getBonusPolicy());
double orderBonus = bonusPolicy.computeBonus(order); seller.addToMonthlyBonus(orderBonus);
sellerRepository.save(seller); }}
![Page 22: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/22.jpg)
22 of 24
Extensibility20+ official add-ons
Audit, ElasticSearch, I18n, IO, JavaMail, JCache, JDBC, JMS, JPA, LDAP, MongoDB, Monitoring, Neo4J, Redis, Scheduling, Solr, Spring-bridge, Validation, W20-bridge, Web-Services, …
Open to third-partyhttp://seedstack.org/addons
PSA uses only 3 proprietary add-ons
![Page 23: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/23.jpg)
23 of 24
DistributionGlobal packaging of all modules
Each organization can roll its own distribution
Open-Source reference distribution released 3 times per year
16.4 16.7 16.11
![Page 24: SeedStack, the lean development stack](https://reader033.fdocuments.net/reader033/viewer/2022051707/58a764d71a28ab217e8b6765/html5/thumbnails/24.jpg)
24 of 24
Thank you!Website: http://seedstack.orgGitHub: https://github.com/seedstackIRC: #seedstack on freenode
Contributions welcome!Pull requestsDocumentation fixesIssues