SlideShare a Scribd company logo
1 of 25
Download to read offline
Objectify
Dependency Injection for
 Scala Web Applications
Learndot


Arthur Gonigberg
 arthur.gonigberg.com
What is
                       Objectify?



- Lightweight framework that integrates with Scalatra and helps you structure your web
application
- Inspired by James Gollick’s similarly named Ruby framework -- moving Ruby apps closer to
Java
Why Objectify?



- With Scalatra services were defined all over the place with posts/gets/puts etc all in various
files -- api definition all over the place
- Shared functionality and codification was done via inheritance

-   Codify how services are structured, and how they should function
-   Central definition of all paths, policies, responders -- all in one spot
-   Single responsibility for classes/separation of concerns
-   Injection without singletons
ui




                                                                         shared
                 model



                                       service


                                             io




- Any application can be broken down into these parts
- Each section is isolated, with clearly defined interfaces and therefore can be tested sanely
- Green arrow indicates dependencies going downwards -- ui only depends on svc etc..
Responders &
                                   Resolvers




                                                                       shared
                model



                                   Policies &
                                    Services

                                           io




- Objectify addresses these two segments and seeks to codify and separate their roles
- There are essentially only 4 types of classes to make here
Servlet
                       Policy                                        Request



                                                                    Resolver
                      Service



                    Responder




-   Inside Scalatra/Servlet request handling scope -- i.e. that thread
-   Parse request using resolvers for any particular injectables
-   Inject values by type/name into Policies and Services
-   If the policy fails, it goes to a policy responder
-   If all the policies are pass, execute service
-   Pass the service result to the responder and format the result
Why Scala is
                        Awesome!



-   Scala is really well suited to this
-   Higher order functions, implicits, closures etc. are amazing for building a DSL
-   Type safety allows you to maintain sanity when building and testing
-   Ability to rely on well-tested and widely-used frameworks from Java land
So how do we use
                it?



- Some code examples ahead
Basic Definition




- First, object declaration with two superclasses - the objectify adapter for scalatra and the
scalatra filter class for inserting into your app
- Next, the default resource definition - this is a conventional definition and the framework
will expect a service and responder class for each action type in the framework
- This can be overridden as you’ll see later
Conventional Classes




- This is just one of the actions the resource expects
- By default it expects a bunch (still under consideration) but definitely Index, Create, Show,
Update, Delete
- The relationships are typed and verified by the framework
Global policies,
 local policies
Policy Definitions




- Here there is a global policy that applies to all resources
- Also there is an example of adding policies to specific actions (on top of the global policy)
What about
                         Resolvers?



- The services and policies are pretty useless without access to the request in some capacity
- Reusable, single-responsibility classes that can be chained
Injecting Resolvers




- Here is the actual UsersIndexService from our application
- userOpt and courseIdOpt are injected at construction time
User Resolver




- the sessionSvc is injected by type rather than name (unlike previous slides)
- the Request Adapter is just a wrapper for a Scalatra request
- and the apply method takes the request and the sessionSvc (i.e. the cookie service) and
figures out the user
Simple Testing




- testing becomes very easy
- no need to worry about dependencies or huge acceptance tests
- creating mock injectables and pass them in to unit test the various components
Advanced Examples




- scalatra-like route definition, with variables -- specify only the actions you want
- upload public file, ignore global policy for specific action -- login/reset pw, ignore all
global policies
- can choose to pluralize or not to pluralize the route name - e.g. LoginCreateService vs
LoginsCreateService
Benefits of
                          Objectify



- how does it help us?
Simplicity



- it’s a very, very small framework -- less than 1000 lines of code
- there’s no magic, it doesn’t do anything complicated
Conciseness



- using the Scala DSL makes configuration very concise and easy but also allows for
complexity and customization at almost every level
- despite having more classes, they will all be very short and manageable
- small focused classes, means small focused tests
Simpler, shorter
                tests



- biggest advantage so far has been the dramatic speed increase in running the tests
- the unit tests are self explanatory and concise
Better
             Maintainability



- this is probably the biggest benefit
- since all the services, responders and policies are mostly decoupled you can be sure that
making a change in one service will not affect any other services -- most of the logic you
need to tweak will be in these services
- conventional structure promotes consistency so there is no guess work in figuring out the
behaviour of an API call
Going Forward



- first goal is open sourcing the framework
- this requires much better documentation and some code comments/cleanup
- no stability issues but also hasn’t been tested under a huge load -- need more production
usage
- support other web frameworks
Questions?



maybe demo if people are interested

More Related Content

Similar to Scala meetup - Objectify

Chris Phillips SCIM Mace-Dir Internet2 Fall Member Meeting Refresh
Chris Phillips SCIM Mace-Dir Internet2 Fall Member Meeting RefreshChris Phillips SCIM Mace-Dir Internet2 Fall Member Meeting Refresh
Chris Phillips SCIM Mace-Dir Internet2 Fall Member Meeting RefreshChris Phillips
 
SOLID Principles and The Clean Architecture
SOLID Principles and The Clean ArchitectureSOLID Principles and The Clean Architecture
SOLID Principles and The Clean ArchitectureMohamed Galal
 
DesignPrinciples-and-DesignPatterns
DesignPrinciples-and-DesignPatternsDesignPrinciples-and-DesignPatterns
DesignPrinciples-and-DesignPatternsBasavaraj Patil
 
Software Architecture
Software ArchitectureSoftware Architecture
Software ArchitectureAhmed Misbah
 
Software_Architectures_from_SOA_to_MSA
Software_Architectures_from_SOA_to_MSASoftware_Architectures_from_SOA_to_MSA
Software_Architectures_from_SOA_to_MSAPeter Denev
 
Non-functional requirements
Non-functional requirements Non-functional requirements
Non-functional requirements Rohela Raouf
 
Entity Framework: To the Unit of Work Design Pattern and Beyond
Entity Framework: To the Unit of Work Design Pattern and BeyondEntity Framework: To the Unit of Work Design Pattern and Beyond
Entity Framework: To the Unit of Work Design Pattern and BeyondSteve Westgarth
 
Clean Code .Net Cheetsheets
Clean Code .Net CheetsheetsClean Code .Net Cheetsheets
Clean Code .Net CheetsheetsNikitaGoncharuk1
 
Struts 2-overview2
Struts 2-overview2Struts 2-overview2
Struts 2-overview2divzi1913
 
Struts 2-overview2
Struts 2-overview2Struts 2-overview2
Struts 2-overview2Long Nguyen
 
Business Rules Framework
Business Rules FrameworkBusiness Rules Framework
Business Rules Frameworkjoedigiovanni
 
"Up-Down Development & DSL-first approach", Владимир Мельник, DataArt
 "Up-Down Development & DSL-first approach", Владимир Мельник, DataArt "Up-Down Development & DSL-first approach", Владимир Мельник, DataArt
"Up-Down Development & DSL-first approach", Владимир Мельник, DataArtDataArt
 
Need Of Enterprise Integration
Need Of Enterprise IntegrationNeed Of Enterprise Integration
Need Of Enterprise Integrationkumar gaurav
 
Object Oriented Design SOLID Principles
Object Oriented Design SOLID PrinciplesObject Oriented Design SOLID Principles
Object Oriented Design SOLID Principlesrainynovember12
 

Similar to Scala meetup - Objectify (20)

Chris Phillips SCIM Mace-Dir Internet2 Fall Member Meeting Refresh
Chris Phillips SCIM Mace-Dir Internet2 Fall Member Meeting RefreshChris Phillips SCIM Mace-Dir Internet2 Fall Member Meeting Refresh
Chris Phillips SCIM Mace-Dir Internet2 Fall Member Meeting Refresh
 
SOLID Principles and The Clean Architecture
SOLID Principles and The Clean ArchitectureSOLID Principles and The Clean Architecture
SOLID Principles and The Clean Architecture
 
DesignPrinciples-and-DesignPatterns
DesignPrinciples-and-DesignPatternsDesignPrinciples-and-DesignPatterns
DesignPrinciples-and-DesignPatterns
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
 
Software_Architectures_from_SOA_to_MSA
Software_Architectures_from_SOA_to_MSASoftware_Architectures_from_SOA_to_MSA
Software_Architectures_from_SOA_to_MSA
 
Non-functional requirements
Non-functional requirements Non-functional requirements
Non-functional requirements
 
L06 Using Design Patterns
L06 Using Design PatternsL06 Using Design Patterns
L06 Using Design Patterns
 
Entity Framework: To the Unit of Work Design Pattern and Beyond
Entity Framework: To the Unit of Work Design Pattern and BeyondEntity Framework: To the Unit of Work Design Pattern and Beyond
Entity Framework: To the Unit of Work Design Pattern and Beyond
 
oracle
oracleoracle
oracle
 
Clean Code .Net Cheetsheets
Clean Code .Net CheetsheetsClean Code .Net Cheetsheets
Clean Code .Net Cheetsheets
 
Cs2305 programming paradigms lecturer notes
Cs2305   programming paradigms lecturer notesCs2305   programming paradigms lecturer notes
Cs2305 programming paradigms lecturer notes
 
Struts 2-overview2
Struts 2-overview2Struts 2-overview2
Struts 2-overview2
 
Struts 2-overview2
Struts 2-overview2Struts 2-overview2
Struts 2-overview2
 
OO Design Principles
OO Design PrinciplesOO Design Principles
OO Design Principles
 
Business Rules Framework
Business Rules FrameworkBusiness Rules Framework
Business Rules Framework
 
"Up-Down Development & DSL-first approach", Владимир Мельник, DataArt
 "Up-Down Development & DSL-first approach", Владимир Мельник, DataArt "Up-Down Development & DSL-first approach", Владимир Мельник, DataArt
"Up-Down Development & DSL-first approach", Владимир Мельник, DataArt
 
Need Of Enterprise Integration
Need Of Enterprise IntegrationNeed Of Enterprise Integration
Need Of Enterprise Integration
 
11th Salesforce Developer Group meeting in Bilbao
11th Salesforce Developer Group meeting in Bilbao11th Salesforce Developer Group meeting in Bilbao
11th Salesforce Developer Group meeting in Bilbao
 
Object Oriented Design SOLID Principles
Object Oriented Design SOLID PrinciplesObject Oriented Design SOLID Principles
Object Oriented Design SOLID Principles
 
Solid principles
Solid principlesSolid principles
Solid principles
 

Recently uploaded

Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Recently uploaded (20)

Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

Scala meetup - Objectify

  • 1. Objectify Dependency Injection for Scala Web Applications
  • 3. What is Objectify? - Lightweight framework that integrates with Scalatra and helps you structure your web application - Inspired by James Gollick’s similarly named Ruby framework -- moving Ruby apps closer to Java
  • 4. Why Objectify? - With Scalatra services were defined all over the place with posts/gets/puts etc all in various files -- api definition all over the place - Shared functionality and codification was done via inheritance - Codify how services are structured, and how they should function - Central definition of all paths, policies, responders -- all in one spot - Single responsibility for classes/separation of concerns - Injection without singletons
  • 5. ui shared model service io - Any application can be broken down into these parts - Each section is isolated, with clearly defined interfaces and therefore can be tested sanely - Green arrow indicates dependencies going downwards -- ui only depends on svc etc..
  • 6. Responders & Resolvers shared model Policies & Services io - Objectify addresses these two segments and seeks to codify and separate their roles - There are essentially only 4 types of classes to make here
  • 7. Servlet Policy Request Resolver Service Responder - Inside Scalatra/Servlet request handling scope -- i.e. that thread - Parse request using resolvers for any particular injectables - Inject values by type/name into Policies and Services - If the policy fails, it goes to a policy responder - If all the policies are pass, execute service - Pass the service result to the responder and format the result
  • 8. Why Scala is Awesome! - Scala is really well suited to this - Higher order functions, implicits, closures etc. are amazing for building a DSL - Type safety allows you to maintain sanity when building and testing - Ability to rely on well-tested and widely-used frameworks from Java land
  • 9. So how do we use it? - Some code examples ahead
  • 10. Basic Definition - First, object declaration with two superclasses - the objectify adapter for scalatra and the scalatra filter class for inserting into your app - Next, the default resource definition - this is a conventional definition and the framework will expect a service and responder class for each action type in the framework - This can be overridden as you’ll see later
  • 11. Conventional Classes - This is just one of the actions the resource expects - By default it expects a bunch (still under consideration) but definitely Index, Create, Show, Update, Delete - The relationships are typed and verified by the framework
  • 13. Policy Definitions - Here there is a global policy that applies to all resources - Also there is an example of adding policies to specific actions (on top of the global policy)
  • 14. What about Resolvers? - The services and policies are pretty useless without access to the request in some capacity - Reusable, single-responsibility classes that can be chained
  • 15. Injecting Resolvers - Here is the actual UsersIndexService from our application - userOpt and courseIdOpt are injected at construction time
  • 16. User Resolver - the sessionSvc is injected by type rather than name (unlike previous slides) - the Request Adapter is just a wrapper for a Scalatra request - and the apply method takes the request and the sessionSvc (i.e. the cookie service) and figures out the user
  • 17. Simple Testing - testing becomes very easy - no need to worry about dependencies or huge acceptance tests - creating mock injectables and pass them in to unit test the various components
  • 18. Advanced Examples - scalatra-like route definition, with variables -- specify only the actions you want - upload public file, ignore global policy for specific action -- login/reset pw, ignore all global policies - can choose to pluralize or not to pluralize the route name - e.g. LoginCreateService vs LoginsCreateService
  • 19. Benefits of Objectify - how does it help us?
  • 20. Simplicity - it’s a very, very small framework -- less than 1000 lines of code - there’s no magic, it doesn’t do anything complicated
  • 21. Conciseness - using the Scala DSL makes configuration very concise and easy but also allows for complexity and customization at almost every level - despite having more classes, they will all be very short and manageable - small focused classes, means small focused tests
  • 22. Simpler, shorter tests - biggest advantage so far has been the dramatic speed increase in running the tests - the unit tests are self explanatory and concise
  • 23. Better Maintainability - this is probably the biggest benefit - since all the services, responders and policies are mostly decoupled you can be sure that making a change in one service will not affect any other services -- most of the logic you need to tweak will be in these services - conventional structure promotes consistency so there is no guess work in figuring out the behaviour of an API call
  • 24. Going Forward - first goal is open sourcing the framework - this requires much better documentation and some code comments/cleanup - no stability issues but also hasn’t been tested under a huge load -- need more production usage - support other web frameworks
  • 25. Questions? maybe demo if people are interested