SeedStack is a full-stack solution enabling teams to build great applications easily and efficiently. It includes the best Java/Web technologies and promotes an architecture that scales from one developer to vast organizations. It is simple for the newcomer yet powerful and extensible for the seasoned developer.
This presentation was shown at the Paris Open Source Summit 2015.
2. 2 of 24
History
Project started late 2012
10+ years experience of frameworks
Custom
Open-Source: mainly Spring
3. 3 of 24
Goals
Build a common development stack
Shared across all business entities
Manufacturing / logistics /
finance / sales / R&D / …
Being extensible
Enabling re-use
4. 4 of 24
Organization
Core team at PSA Peugeot Citroën
Other members at various locations
http://seedstack.org
https://github.com/seedstack
Twitter: @seedstack
IRC: #seedstack on freenode
5. 5 of 24
Get presentation code samples at
https://github.com/adrienlauer/poss-samples
6. 6 of 24
Core values
Opinion
A reference architecture for your apps
Modularity
Single responsibility principle
Extensibility
Open-Closed principle
7. 7 of 24
Foundation
Java
Set of technologies to build backends
Web
Set of technologies to build Web apps
Business
Domain-Driven Design (DDD) approach
8. 8 of 24
Foundation
Java
Set of technologies to build backends
Web
Set of technologies to build Web apps
Business
Domain-Driven Design (DDD) approach
9. 9 of 24
Java focus
Kernel + plugin architecture
One plugin per concern
Scalable
One global Guice injector
Unified configuration
Plugin
discovery
Classpath
scan
Initialization
10. 10 of 24
Sample plugin
public 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);
}
}
11. 11 of 24
So we built the core…
Contains the kernel
Provides basic features
Launching
Configuration
IoC
Service commands
Diagnostics
12. 12 of 24
Then we scaled up…
10+ plugins
Testing
Security
Transactions
REST
Metrics / health
Web
…
Adding new technologies is quick and easy
All PSA requirements have been covered
50 satisfied projects over two years
13. 13 of 24
Foundation
Java
Set of technologies to build REST backends
Web
Set of technologies to build Web apps
Business
Domain-Driven Design (DDD) approach
14. 14 of 24
Web focus
Loader + fragments architecture
A fragment per concern
Composable
Configure and initialize an SPA
Fragment
download
Configuration
computing
Initialization
16. 16 of 24
Main features
Based on popular libraries
AngularJS
RequireJS
Advanced enterprise features
Multi CSS framework
Bootstrap
Angular material
Theming support
2 Open-Source themes
3 PSA proprietary themes
17. 17 of 24
Foundation
Java
Set of technologies to build REST backends
Web
Set of technologies to build Web apps
Business
Domain-Driven Design (DDD) approach
18. 18 of 24
Level of involvement
Annotations
Interfaces
Base classes
20. 20 of 24
Main features
DDD semantic + injection
Easy-to-use default implementations
Smart DTO / domain mapping
Built-in identity generation strategies
21. 21 of 24
Sample
class 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);
}
}
22. 22 of 24
Extensibility
20+ 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-party
http://seedstack.org/addons
PSA uses only 3 proprietary add-ons
23. 23 of 24
Distribution
Global 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