1 / 15

BoxSpring (draft)

BoxSpring (draft). Justin Edelson VP, Applications & Platforms MTV Networks Digital. What is BoxSpring. A set of enhancements to the Spring Framework. Why Does BoxSpring Exist?. Apply lessons learned from ATG Dynamo while enabling a migration strategy. Codify configuration methodology.

claus
Download Presentation

BoxSpring (draft)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. BoxSpring(draft) Justin Edelson VP, Applications & Platforms MTV Networks Digital

  2. What is BoxSpring • A set of enhancements to the Spring Framework.

  3. Why Does BoxSpring Exist? • Apply lessons learned from ATG Dynamo while enabling a migration strategy. • Codify configuration methodology. • Reduce lock contention issues associated with XML-based configuration (see Struts, Tiles, etc.)

  4. Core BoxSpring Enhancements • Pathed Bean Factories • Layered Configuration • GLOBAL Beans • JMX Exposure of Bean Factories • Path-Aware MVC Support

  5. Pathed Bean Factories • Out of the box, Spring bean factories are flat – all beans within a factory share a common namespace. • Various techniques have emerged, but these are ad hoc. • Box Spring codifies a namespacing technique based on file system paths. • The bean named /DataSources/readDataSource is defined in /DataSources/applicationContext.xml • These files/directories can be in the classpath, the file system, really anywhere Spring Resources can work. • Smaller XML files – less lock contention and easier to read.

  6. Layered Bean Configuration • In a typical application, some configuration properties are common between various deployment stages: dev, qa, testing, production, etc. • Default Spring configuration handling requires either recreating entire bean definitions per stage or the (awkward) use of property files. • Box Spring supports adding new property definitions in a stage-specific configuration files. • Special “operators” allow for addition or removal of items in collections.

  7. Paths and Layers in Action

  8. GLOBAL Beans • GLOBAL beans are similar to Spring parent beans – define a set of properties common across N number of beans. • The main difference – GLOBAL beans are automatic (and thus less error prone). • Want to define a property for every bean in your application? Create a GLOBAL bean in the root context.

  9. JMX Exposure of Bean Factories • Spring’s JMX support is focused on exposing individual beans for management. • This is important, but doesn’t address managing factories. • Nor does it allow you to inspect bean definitions at runtime. • And we wanted to apply the same path structure to JMX because lots of beans can lead to a messy JConsole.

  10. JMX – Browse Bean Factories

  11. JMX – View Bean Definition

  12. Path-Aware MVC Support • Pretty simple • /admin/users/list.html -> controller named list in /admin/users • Again – all about lock contention • Not always appropriate, so it’s easy to disable.

  13. BoxSpring-Enabled Libraries • BoxSpring-Enabled libraries include default set of configuration files in META-INF/spring. • This resource path is automatically scanned for configuration files when using BoxSpring webapp support classes. • Gets rid of includes (and name conflicts). • Layered configuration allows for defaults to be easily overridden.

  14. Box Spring Modules • BoxSpring Modules are packages containing default BoxSpring configuration for 3rd party projects. • First two: • Resteasy • Atlassian Crowd • More to come…

  15. Box Spring “Platform” • BoxSpring includes a BoxSpring-enabled library called BoxSpring Platform that includes: • A global Quartz scheduler • Config to expose the application context via JMX • Config to expose BoxSpring MVC support • More to come…

More Related