SlideShare a Scribd company logo
1
Make coder’s life easier
strategy pattern using Grapes Bundle
Jana	III	Sobieskiego	2,	40-082	Katowice
Poland
2
Michał ”Mike” Kocztorz
Team Lead Software Development
@msales
About me
michal.kocztorz@msales.com
Studied in Silesian Institute of Technology in Gliwice
In IT for more than 10 years
Since IE6 was a modern browser
Interested in WEB
Good architecture and clear code
Searching for best practices
I play some acoustic guitar (4 fun only)
I love travels
I’m a husband and a father
3
Basic information (I promise!)
Strategy Pattern
1 Dependency Injection with tagged services.
Symfony – anything helpful there?
2
What do we have out of the box
Strategy in Symfony
3
Strategy using Grapes Bundle
4
Make coder’s life easier
Strategy pattern using GrapesBundle
There is more…
Grapes Bundle extras
5 How we use GrapesBundle in msales
Our use cases
6
4
Why talk about something as obvious as strategy pattern
Is there any need for this?
Mariusz Gil @ Boiling Frogs Conference https://youtu.be/_n0s_8JuexI Back to forgotten roots
5
Basic information (I promise!)
Strategy Pattern
6
Recipe for Strategy
In a few simple steps
The Strategy pattern is to be used where you want to
choose the algorithm to use at runtime
When to use strategy?
7
Define the Interface
Define a family of algorythms
Implement the interface in several classes
Encapsulate each one
Code against the Interface, not the implementations.
Make them interchangeable
Recipe for Strategy
In a few simple steps
8
Dependency Injection with tagged services.
Symfony – helpful features
9
Symfony’s generic way of grouping services
Tagged services
http://symfony.com/doc/current/service_container/tags.html
In Symfony documentation the example we will be using is mostly implementing Chain of
Responsibility pattern. But it’s also good example to use Strategy.
Tagged Services
How to work with Service Tags
1
0
Tagged Services
How to work with Service Tags
In the same way that a blog post on the web might be tagged with things such
as "Symfony" or "PHP", services configured in your container can also be
tagged. In the service container, a tag implies that the service is meant to be
used for a specific purpose.
“ “
Tags on their own don't actually alter the functionality of your services in any way.
But if you choose to, you can ask a container builder for a list of all services that
were tagged with some specific tag. This is useful in compiler passes where you can
find these services and use or modify them in some specific way.
“ “
http://symfony.com/doc/current/service_container/tags.html
1
1
Tagged Services
How to work with Service Tags
http://symfony.com/doc/current/service_container/tags.html
1
2
Strategy in Symfony
http://symfony.com/doc/current/service_container/tags.html
What do we have out of the box
1
3
Register the compiler pass
Inform Symfony about new compiler pass.
Step 5
Prepare interface and the classes that implement your strategy
We will have interface that we will code against and some concrete
implementations.
Step 1
Prepare the service definitions and tag them
We need to add service definitions. Then we need to tag the services and
add aliases to be able to choose one.
Step 2
Strategy in Symfony
What do we have out of the box
Prepare the compiler pass
Add meaning to the tags we just created on the services.
Step 4
Build a class that will help us selecting the implementation
This class will help in choosing the implementation by alias
Step 3
1
4
Prepare interface and the classes that implement your strategy
We will have interface that we will code against and some concrete
implementations.
Step 1
Strategy in Symfony
What do we have out of the box
http://apigen.juzna.cz/doc/swiftmailer/swiftmailer
1
5
Prepare the service definitions and tag them
We need to add service definitions. Then we need to tag the services and
add aliases to be able to choose one.
Step 2
Strategy in Symfony
What do we have out of the box
http://symfony.com/doc/current/service_container/tags.html
1
6
Build a class that will help us selecting the implementation
This class will help in choosing the implementation by alias
Step 3
Strategy in Symfony
What do we have out of the box
http://symfony.com/doc/current/service_container/tags.html
1
7
Prepare the compiler pass
Add meaning to the tags we just created on the services.
Step 4
Strategy in Symfony
What do we have out of the box
http://symfony.com/doc/current/service_container/tags.html
1
8
Register the compiler pass
Inform Symfony about new compiler pass.
Step 5
Strategy in Symfony
What do we have out of the box
http://symfony.com/doc/current/service_container/tags.html
1
9
Register the compiler pass
Inform Symfony about new compiler pass.
Step 5
Prepare interface and the classes that implement your strategy
We will have interface that we will code against and some concrete
implementations.
Step 1
Prepare the service definitions and tag them
We need to add service definitions. Then we need to tag the services and
add aliases to be able to choose one.
Step 2
Strategy in Symfony
What do we have out of the box
Prepare the compiler pass
Add meaning to the tags we just created on the services.
Step 4
Build a class that will help us selecting the implementation
This class will help in choosing the implementation by alias
Step 3
What is wrong in this picture?
2
0
Register the compiler pass
Inform Symfony about new compiler pass.
Step 5
Prepare interface and the classes that implement your strategy
We will have interface that we will code against and some concrete
implementations.
Step 1
Prepare the service definitions and tag them
We need to add service definitions. Then we need to tag the services and
add aliases to be able to choose one.
Step 2
Strategy in Symfony
What do we have out of the box
Prepare the compiler pass
Add meaning to the tags we just created on the services.
Step 4
Build a class that will help us selecting the implementation
This class will help in choosing the implementation by alias
Step 3
What is wrong in this picture?
2
1
Strategy using Grapes Bundle
2
2
Strategy using Grapes Bundle
What is provided by Grapes Bundle?
Everything that is just additional work to use Strategy Pattern gets
automated. Developer no longer needs to focus on the mechanics of
how it’s implemented.
Helps removing all the repetitive code
In simplest case, after preparing the implementations of the algorithms
its all down to appropriate service definitions.
Defining new Strategy boils down to adding configuration
Like defaults or grouped service provider.
Provides some additional functionality
2
3
Strategy using Grapes Bundle
What is provided by Grapes Bundle?
2
4
Prepare interface and the classes that implement your strategy
We will have interface that we will code against and some concrete
implementations.
Step 1
http://apigen.juzna.cz/doc/swiftmailer/swiftmailer
Strategy using Grapes Bundle
Comparison with original implementation
No changes on this step
2
5
Prepare the service definitions and tag them
We need to add service definitions. Then we need to tag the services and
add aliases to be able to choose one.
Step 2
Strategy using Grapes Bundle
No changes on this step
Comparison with original implementation
2
6
Strategy using Grapes Bundle Build a class that will help us selecting the implementation
This class will help in choosing the implementation by alias
Step 3
Comparison with original implementation
2
7
Strategy using Grapes Bundle
In Grapes there is ServiceProvider
class implemented and appropriate
abstract service definition exists.
Lets create new strategy and register another
Grapes Service Provider for it.
Lets find all services tagged with this tag name and
register those services as implementations of
strategy algorithm in this Grapes Service Provider.
Add service definition that will help us selecting the implementation
Service transport.strategy will help in choosing the implementation from
services tagged by app.mail_transport
Step 3
Comparison with original implementation
2
8
Prepare the compiler pass
Add meaning to the tags we just created on the services.
Step 4
Step not needed
Done automatically by GrapesBundle
Strategy using Grapes Bundle
Comparison with original implementation
2
9
Register the compiler pass
Inform Symfony about new compiler pass.
Step 5
Step not needed
Done automatically by GrapesBundle
Strategy using Grapes Bundle
Comparison with original implementation
3
0
Strategy using Grapes Bundle
Comparison with original implementation
Use the Service Provider object to select the
transport algorithm on runtime.
3
1
Strategy using Grapes Bundle
Comparison with original implementation
3
2
Service implementing concrete implementation is
instantiated upon first request
Instantiating concreate implementation
Strategy using Grapes Bundle
Final note
3
3
There is more…
Grapes Bundle extras
3
4
Default service
Grapes Bundle extras
3
5
Grapes Bundle extras
Default service returned by Service Provider
Case	A
Case	B
Case	C
Case	D
Case	E
Case	F
Implementation	A
Implementation	B
Implementation	B
Implementation	C
Implementation	B
Implementation	B
3
6
Grapes Bundle extras
Default service returned by Service Provider
Case	A
Case	B
Case	C
Case	D
Case	E
Case	F
Implementation	A
Implementation	B
Implementation	B
Implementation	C
Implementation	B
Implementation	B
Case	G Implementation	B
3
7
Grapes Bundle extras
Default service returned by Service Provider
Case	A
Case	B
Case	C
Case	D
Case	E
Case	F
Implementation	A
Implementation	B
Implementation	B
Implementation	C
Implementation	B
Implementation	B
Case	G Implementation	B
3
8
Configurable alias attribute
Grapes Bundle extras
3
9
Grapes Bundle extras
Replacing alias with custom tag attribute
4
0
Grouped Service Provider
Grapes Bundle extras
4
1
Grapes Bundle extras
Grouped Service Provider
4
2
Case	A
Case	B
Case	C
Grapes Bundle extras
Grouped Service Provider
Implementation	A Implementation	B Implementation	C
Implementation	D Implementation	E
no	implementations
Let’s try with example
4
3
Monitor	Subsystem	C
Grapes Bundle extras
Monitoring the system using Grouped Service Provider
Monitor	Subsystem	A
Monitor	Subsystem	B
Metric	A-1 Metric	A-2 Metric	A-3
Metric	B-1 Metric	B-2
no	implementations
Task: periodically monitor status
Ok, this last case is not great for this example J
4
4
How we use Grapes Bundle in msales
Our use cases
4
5
Already tested heavily on production system
Already used in 2 systems
Hours of dev work saved.
More than 40 usages
Our use cases
How does Grapes Bundle help us in our systems
As an example of next candidate of code for public release
Msales Forms Bundle
4
6
Our use cases
Select	2
Grouped Service Provider
front back
search term, content type
“Mike”, “person”
Service	Provider:	
Custom	data	repository
response in generic json
format
get implementation: alias = content type
alias = “person”
Custom	data	repository	
for	“person”
Generic	select	2	data	
action
return data repository by content type
return “person” repository
get list by search term
search term= “Mike”
return dataset
4
7
Our use cases
Select	2
Grouped Service Provider
front back
search term, content type
“Mike”, “person”
Service	Provider:	
Custom	data	repository
response in generic json
format
get implementation: alias = content type
alias = “person”
Custom	data	repository	
for	“person”
Generic	select	2	data	
action
return data repository by content type
return “person” repository
get list by search term
search term= “Mike”
return dataset
generic only this part needs
implementing
4
8
Questions?
4
9
Thanks for your attention!
msales Poland Sp. z o.o.
Jana III Sobieskiego 2, 40-082 Katowice
Poland
info.pl@msales.com www.msales.com +48 32 630 40 76
5
0
A picture is worth a thousand words
Who doesn’t, right? J
By the way, we’re hiring!

More Related Content

PPTX
Wpf4 july2010
PPTX
Do (10x) more with extensions
PDF
Creating a workflow with Azure Logic and API Apps
PDF
Architecture Patterns with Python 1st Edition Harry Percival
PPTX
Global Exception Handling Custom Error Connector In MuleSoft
PPTX
1-_Introduction_To_Django_Model_and_Database (1).pptx
ODP
Java Tech & Tools | OSGi Best Practices | Emily Jiang
PDF
Instant download Architecture Patterns with Python 1st Edition Harry Percival...
Wpf4 july2010
Do (10x) more with extensions
Creating a workflow with Azure Logic and API Apps
Architecture Patterns with Python 1st Edition Harry Percival
Global Exception Handling Custom Error Connector In MuleSoft
1-_Introduction_To_Django_Model_and_Database (1).pptx
Java Tech & Tools | OSGi Best Practices | Emily Jiang
Instant download Architecture Patterns with Python 1st Edition Harry Percival...

Similar to How to make a developer’s life easier – strategy pattern with the help of GrapesBundle (20)

PDF
The distinct advantages of using PHP-Symfony Framework
PDF
Create a PHP Library the right way
PPTX
Anypoint API Manager Custom Policies & Best Practices
PDF
Diving into VS 2015 Day2
PDF
Which Tools Are The Best For Symfony Projects_.pdf
PPT
Extending the Enterprise with MEF
PDF
#APIOps- Agile API Development powered by API Connect
PDF
Case study - Using OSGi within the salesforce.com Data Center Automation Init...
PDF
Which Tools Are The Best For Symfony Projects_.pdf
PPT
Benefits of the CodeIgniter Framework
PDF
ChatGPT and Beyond - Elevating DevOps Productivity
PDF
What do you need to know about g rpc on .net
PPTX
Devops interview questions 2 www.bigclasses.com
DOCX
Symfony framework-An overview and usability for web development
PPTX
Salesforce DevOps Course - Salesforce DevOps Online Training.pptx
PPTX
Integration testing.
DOCX
Introduction to the .NET Access Control Service
DOCX
Introduction to the .NET Access Control Service
PPTX
Patterns for automating API delivery. API conference
PDF
Salesforce cicd integration a quick guide
The distinct advantages of using PHP-Symfony Framework
Create a PHP Library the right way
Anypoint API Manager Custom Policies & Best Practices
Diving into VS 2015 Day2
Which Tools Are The Best For Symfony Projects_.pdf
Extending the Enterprise with MEF
#APIOps- Agile API Development powered by API Connect
Case study - Using OSGi within the salesforce.com Data Center Automation Init...
Which Tools Are The Best For Symfony Projects_.pdf
Benefits of the CodeIgniter Framework
ChatGPT and Beyond - Elevating DevOps Productivity
What do you need to know about g rpc on .net
Devops interview questions 2 www.bigclasses.com
Symfony framework-An overview and usability for web development
Salesforce DevOps Course - Salesforce DevOps Online Training.pptx
Integration testing.
Introduction to the .NET Access Control Service
Introduction to the .NET Access Control Service
Patterns for automating API delivery. API conference
Salesforce cicd integration a quick guide
Ad

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Approach and Philosophy of On baking technology
PPTX
sap open course for s4hana steps from ECC to s4
PPT
Teaching material agriculture food technology
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Electronic commerce courselecture one. Pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
cuic standard and advanced reporting.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Encapsulation_ Review paper, used for researhc scholars
Unlocking AI with Model Context Protocol (MCP)
Approach and Philosophy of On baking technology
sap open course for s4hana steps from ECC to s4
Teaching material agriculture food technology
The AUB Centre for AI in Media Proposal.docx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
20250228 LYD VKU AI Blended-Learning.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Electronic commerce courselecture one. Pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Network Security Unit 5.pdf for BCA BBA.
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Advanced methodologies resolving dimensionality complications for autism neur...
Spectral efficient network and resource selection model in 5G networks
Understanding_Digital_Forensics_Presentation.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
cuic standard and advanced reporting.pdf
Ad

How to make a developer’s life easier – strategy pattern with the help of GrapesBundle

  • 1. 1 Make coder’s life easier strategy pattern using Grapes Bundle Jana III Sobieskiego 2, 40-082 Katowice Poland
  • 2. 2 Michał ”Mike” Kocztorz Team Lead Software Development @msales About me michal.kocztorz@msales.com Studied in Silesian Institute of Technology in Gliwice In IT for more than 10 years Since IE6 was a modern browser Interested in WEB Good architecture and clear code Searching for best practices I play some acoustic guitar (4 fun only) I love travels I’m a husband and a father
  • 3. 3 Basic information (I promise!) Strategy Pattern 1 Dependency Injection with tagged services. Symfony – anything helpful there? 2 What do we have out of the box Strategy in Symfony 3 Strategy using Grapes Bundle 4 Make coder’s life easier Strategy pattern using GrapesBundle There is more… Grapes Bundle extras 5 How we use GrapesBundle in msales Our use cases 6
  • 4. 4 Why talk about something as obvious as strategy pattern Is there any need for this? Mariusz Gil @ Boiling Frogs Conference https://youtu.be/_n0s_8JuexI Back to forgotten roots
  • 5. 5 Basic information (I promise!) Strategy Pattern
  • 6. 6 Recipe for Strategy In a few simple steps The Strategy pattern is to be used where you want to choose the algorithm to use at runtime When to use strategy?
  • 7. 7 Define the Interface Define a family of algorythms Implement the interface in several classes Encapsulate each one Code against the Interface, not the implementations. Make them interchangeable Recipe for Strategy In a few simple steps
  • 8. 8 Dependency Injection with tagged services. Symfony – helpful features
  • 9. 9 Symfony’s generic way of grouping services Tagged services http://symfony.com/doc/current/service_container/tags.html In Symfony documentation the example we will be using is mostly implementing Chain of Responsibility pattern. But it’s also good example to use Strategy. Tagged Services How to work with Service Tags
  • 10. 1 0 Tagged Services How to work with Service Tags In the same way that a blog post on the web might be tagged with things such as "Symfony" or "PHP", services configured in your container can also be tagged. In the service container, a tag implies that the service is meant to be used for a specific purpose. “ “ Tags on their own don't actually alter the functionality of your services in any way. But if you choose to, you can ask a container builder for a list of all services that were tagged with some specific tag. This is useful in compiler passes where you can find these services and use or modify them in some specific way. “ “ http://symfony.com/doc/current/service_container/tags.html
  • 11. 1 1 Tagged Services How to work with Service Tags http://symfony.com/doc/current/service_container/tags.html
  • 13. 1 3 Register the compiler pass Inform Symfony about new compiler pass. Step 5 Prepare interface and the classes that implement your strategy We will have interface that we will code against and some concrete implementations. Step 1 Prepare the service definitions and tag them We need to add service definitions. Then we need to tag the services and add aliases to be able to choose one. Step 2 Strategy in Symfony What do we have out of the box Prepare the compiler pass Add meaning to the tags we just created on the services. Step 4 Build a class that will help us selecting the implementation This class will help in choosing the implementation by alias Step 3
  • 14. 1 4 Prepare interface and the classes that implement your strategy We will have interface that we will code against and some concrete implementations. Step 1 Strategy in Symfony What do we have out of the box http://apigen.juzna.cz/doc/swiftmailer/swiftmailer
  • 15. 1 5 Prepare the service definitions and tag them We need to add service definitions. Then we need to tag the services and add aliases to be able to choose one. Step 2 Strategy in Symfony What do we have out of the box http://symfony.com/doc/current/service_container/tags.html
  • 16. 1 6 Build a class that will help us selecting the implementation This class will help in choosing the implementation by alias Step 3 Strategy in Symfony What do we have out of the box http://symfony.com/doc/current/service_container/tags.html
  • 17. 1 7 Prepare the compiler pass Add meaning to the tags we just created on the services. Step 4 Strategy in Symfony What do we have out of the box http://symfony.com/doc/current/service_container/tags.html
  • 18. 1 8 Register the compiler pass Inform Symfony about new compiler pass. Step 5 Strategy in Symfony What do we have out of the box http://symfony.com/doc/current/service_container/tags.html
  • 19. 1 9 Register the compiler pass Inform Symfony about new compiler pass. Step 5 Prepare interface and the classes that implement your strategy We will have interface that we will code against and some concrete implementations. Step 1 Prepare the service definitions and tag them We need to add service definitions. Then we need to tag the services and add aliases to be able to choose one. Step 2 Strategy in Symfony What do we have out of the box Prepare the compiler pass Add meaning to the tags we just created on the services. Step 4 Build a class that will help us selecting the implementation This class will help in choosing the implementation by alias Step 3 What is wrong in this picture?
  • 20. 2 0 Register the compiler pass Inform Symfony about new compiler pass. Step 5 Prepare interface and the classes that implement your strategy We will have interface that we will code against and some concrete implementations. Step 1 Prepare the service definitions and tag them We need to add service definitions. Then we need to tag the services and add aliases to be able to choose one. Step 2 Strategy in Symfony What do we have out of the box Prepare the compiler pass Add meaning to the tags we just created on the services. Step 4 Build a class that will help us selecting the implementation This class will help in choosing the implementation by alias Step 3 What is wrong in this picture?
  • 22. 2 2 Strategy using Grapes Bundle What is provided by Grapes Bundle? Everything that is just additional work to use Strategy Pattern gets automated. Developer no longer needs to focus on the mechanics of how it’s implemented. Helps removing all the repetitive code In simplest case, after preparing the implementations of the algorithms its all down to appropriate service definitions. Defining new Strategy boils down to adding configuration Like defaults or grouped service provider. Provides some additional functionality
  • 23. 2 3 Strategy using Grapes Bundle What is provided by Grapes Bundle?
  • 24. 2 4 Prepare interface and the classes that implement your strategy We will have interface that we will code against and some concrete implementations. Step 1 http://apigen.juzna.cz/doc/swiftmailer/swiftmailer Strategy using Grapes Bundle Comparison with original implementation No changes on this step
  • 25. 2 5 Prepare the service definitions and tag them We need to add service definitions. Then we need to tag the services and add aliases to be able to choose one. Step 2 Strategy using Grapes Bundle No changes on this step Comparison with original implementation
  • 26. 2 6 Strategy using Grapes Bundle Build a class that will help us selecting the implementation This class will help in choosing the implementation by alias Step 3 Comparison with original implementation
  • 27. 2 7 Strategy using Grapes Bundle In Grapes there is ServiceProvider class implemented and appropriate abstract service definition exists. Lets create new strategy and register another Grapes Service Provider for it. Lets find all services tagged with this tag name and register those services as implementations of strategy algorithm in this Grapes Service Provider. Add service definition that will help us selecting the implementation Service transport.strategy will help in choosing the implementation from services tagged by app.mail_transport Step 3 Comparison with original implementation
  • 28. 2 8 Prepare the compiler pass Add meaning to the tags we just created on the services. Step 4 Step not needed Done automatically by GrapesBundle Strategy using Grapes Bundle Comparison with original implementation
  • 29. 2 9 Register the compiler pass Inform Symfony about new compiler pass. Step 5 Step not needed Done automatically by GrapesBundle Strategy using Grapes Bundle Comparison with original implementation
  • 30. 3 0 Strategy using Grapes Bundle Comparison with original implementation Use the Service Provider object to select the transport algorithm on runtime.
  • 31. 3 1 Strategy using Grapes Bundle Comparison with original implementation
  • 32. 3 2 Service implementing concrete implementation is instantiated upon first request Instantiating concreate implementation Strategy using Grapes Bundle Final note
  • 35. 3 5 Grapes Bundle extras Default service returned by Service Provider Case A Case B Case C Case D Case E Case F Implementation A Implementation B Implementation B Implementation C Implementation B Implementation B
  • 36. 3 6 Grapes Bundle extras Default service returned by Service Provider Case A Case B Case C Case D Case E Case F Implementation A Implementation B Implementation B Implementation C Implementation B Implementation B Case G Implementation B
  • 37. 3 7 Grapes Bundle extras Default service returned by Service Provider Case A Case B Case C Case D Case E Case F Implementation A Implementation B Implementation B Implementation C Implementation B Implementation B Case G Implementation B
  • 39. 3 9 Grapes Bundle extras Replacing alias with custom tag attribute
  • 42. 4 2 Case A Case B Case C Grapes Bundle extras Grouped Service Provider Implementation A Implementation B Implementation C Implementation D Implementation E no implementations Let’s try with example
  • 43. 4 3 Monitor Subsystem C Grapes Bundle extras Monitoring the system using Grouped Service Provider Monitor Subsystem A Monitor Subsystem B Metric A-1 Metric A-2 Metric A-3 Metric B-1 Metric B-2 no implementations Task: periodically monitor status Ok, this last case is not great for this example J
  • 44. 4 4 How we use Grapes Bundle in msales Our use cases
  • 45. 4 5 Already tested heavily on production system Already used in 2 systems Hours of dev work saved. More than 40 usages Our use cases How does Grapes Bundle help us in our systems As an example of next candidate of code for public release Msales Forms Bundle
  • 46. 4 6 Our use cases Select 2 Grouped Service Provider front back search term, content type “Mike”, “person” Service Provider: Custom data repository response in generic json format get implementation: alias = content type alias = “person” Custom data repository for “person” Generic select 2 data action return data repository by content type return “person” repository get list by search term search term= “Mike” return dataset
  • 47. 4 7 Our use cases Select 2 Grouped Service Provider front back search term, content type “Mike”, “person” Service Provider: Custom data repository response in generic json format get implementation: alias = content type alias = “person” Custom data repository for “person” Generic select 2 data action return data repository by content type return “person” repository get list by search term search term= “Mike” return dataset generic only this part needs implementing
  • 49. 4 9 Thanks for your attention! msales Poland Sp. z o.o. Jana III Sobieskiego 2, 40-082 Katowice Poland info.pl@msales.com www.msales.com +48 32 630 40 76
  • 50. 5 0 A picture is worth a thousand words Who doesn’t, right? J By the way, we’re hiring!