apache zest
play

Apache Zest COP Composite Oriented Programming October 2 nd , 2015 - PowerPoint PPT Presentation

ApacheCon EU 2015 Apache Zest COP Composite Oriented Programming October 2 nd , 2015 Jiri Jetmar, CEO Smartnerds GmbH Paul Merlin, Title/Role here Agenda What is Apache Zest ? Zest Libraries & App Building Strategies


  1. ApacheCon EU 2015 Apache Zest COP – Composite Oriented Programming October 2 nd , 2015 Jiri Jetmar, CEO Smartnerds GmbH Paul Merlin, Title/Role here

  2. Agenda § What is Apache Zest ? § Zest Libraries & App Building Strategies § Sample App – Live Coding Session § Zest Community, Real World Apps & Outlook “Genius is one percent inspiration and ninety–nine percent perspiration.” Thomas A. Edison

  3. Apache Zest tm Fact Sheet :: History Apache Zest was born as Qi4j in 2007 § Founded by Richard Öberg (EJBoss, later JBoss) and Niclas Hedhman § Version 1.0, 1.1 and 1.2 in 2010 § Version 2.0 in 2013 § Since beginning of 2015 a “Gold” Apache Foundation Project // JJ § Current Version 2.1, 3.0 in 2015 with lots of new features § Born of Qi4j Version 3.0 Version 2.0 2 nd Gen Apache Zest 2007 2009 2010 2012 2013 2015 later 2015

  4. Apache Zest tm – It is about solving (business) problems :: (Re-) Usage of proven patterns Zest is nothing new. It is an logical next step based on existing and proved § patterns and ideas Zest is an Java implementation of the Composite Oriented Programming § (COP) pattern COP is a programming model that allows the creation of rich domain models § :: Business problem centric approach 1) Start with the business problem 2) Use the terminology from Domain Driven Design (DDD) 3) Allow developers to implement the Domain Model directly in code using that Terminology 4) Plug infrastructural building blocks that reflects the Proven and well-known needs and requirements patterns DI AOP DDD … Apache Zest Core COP COP fragments are used to composite Applications

  5. Apache Zest tm – What sort of problems to solve with Zest ? :: Rich Domain Models Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diamZest is an § Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam § Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam § :: High ratio of DM changes over time Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diamZest is an § Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam § Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam § :: Transactional, integrative and API centric Applications Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diamZest is an § Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam § Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam §

  6. Apache Zest tm & COP Overview :: COP in one sentence “Composite Oriented Programming allows developers to work with 'fragments', smaller than classes, and 'compose' fragments into larger 'composites' which acts like the regular objects.” Niclas Hedhman :: COP & Apache Zest The most basic element in Zest is the Composite § A Composite is created by composing a number of Fragments § Mixings are Fragments that can handle method invocations § Modifiers are Fragments that modify method invocations (Decorator § pattern) – Constraints, Concern, SideEffects

  7. Apache Zest tm Basic Fragments :: Fragments Composite (1) @ Constraint validates method arguments § Constraint Can have many Constraints per argument § Uses annotations to trigger § Cooperate with concern for failure actions § Concern @ Concerns intercept method calls § Allowed to modify arguments and i.) return values, § SideEffect ii.) return with calling in chain, iii.) throws exceptions Mixin (1) Mixin (n) @ SideEffects are called after a method call § has finished Property (1) Cannot change method arguments or return value § Property (n) Cannot throws exceptions § Association Can inspect exceptions and return values § May be asynchronous § Figure XX : Composite Fragments @ Mixins implements Composite interfaces § A Mixin may implement one interface, many § interfaces or just some methods May contain Composite state, such as Property and § Association instances May be Composite private – not exposed in § Composite interface

  8. Apache Zest tm Structure Composition :: Application Structure Layer Composites define the internals of objects § Explicit Composite meta types : Value, Entity, § Module Service and Transient Composites resides in Modules § Composite (1) Metatypes : Value, Composite (n) Modules can be grouped into Layers § Entity, Service and Transient One or more Layers per Application § Figure XX : Structure Composition Zero, one or more Modules per Layer § Visibility and dependency of Composites § between structures is controlled Declaration of Visibility of Composites § Dependency and Visibility Figure XX : Application Structering

  9. Agenda § What is Apache Zest ? § Apache Zest Libraries & App Building Strategies § Sample App – Live Coding Session § Zest Community, Real World Apps & Outlook “Genius is one percent inspiration and ninety–nine percent perspiration.” Thomas A. Edison

  10. Apache Zest tm Library ecosystem ( .. there is much more !) HATEOAS File / Memory REST API LevelDB Configuration Entity Store Neo4j Scheduling RIAK Metrics Apache Zest Core SQL Event Sourcing ElasticSearch Caching Entity Index RDF Scala integration Solr Functional Data API Migration Geospatial I/O Streaming Query API Re-Indexing

  11. Application Building – A bit „grey“ Theory Lorem ipsum dolor sit amet, consetetur Interaction ¡ sadipscing elitr, sed diam nonumy eirmod Model tempor invidunt ut labore et dolore Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod Channels tempor invidunt ut labore et dolore Lorem ipsum dolor sit amet, consetetur Service ¡ S (1) S (n) sadipscing elitr, sed diam nonumy eirmod Model tempor invidunt ut labore et dolore Todo.. Functional ¡ F (1) F (n) Model State ¡ ¡ Model Figure XX : Top-Down Application Model

  12. Application Building – ... How to do using Zest ! Clients Service ¡ REST API I Module REST API II Module Layer Domain ¡ Domain Model A Layer Infra. ¡ InMemory Store ElasticSearchIndex Layer Module Module WebJetty Module Config .. Module Layer Figure XX : Concrete Zest-based Application structure

  13. Agenda § What is Apache Zest ? § Zest Libraries & App Building Strategies § Sample App – Live Coding Session § Zest Community, Real World Apps & Outlook “Genius is one percent inspiration and ninety–nine percent perspiration.” Thomas A. Edison

  14. Sample App – Live Coding Session $ git clone https://github.com/xxx/xxxx.git

  15. Agenda § What is Apache Zest ? § Key Components, Building Blocks & Ecosystem § Sample App – Live Coding Session § Zest Community, Real World Apps & Outlook “Genius is one percent inspiration and ninety–nine percent perspiration.” Thomas A. Edison

  16. Apache Zest tm Community :: Community The current Zest developer community is rather small, but passionate individuals who are all convinced of Zest's merit and potential. Over the years there has been 28 code contributors in total, of which 8 have been considered Core Developers, i.e. allowed to make changes on the Core runtime on trunk without hand-holding. No access control was in place to enforce that, and a social contract worked very well . … so do not wait, JOIN us right now !! We are looking forward to..

  17. Who is using Apache Zest tm ? Productive http://smarpay.ch is a swiss company that offers mobile payment services in the vending business. Apache Zest is used to offer backoffice services like settlement and clearing for about 3k vending machines and about 350k mobile users. In development P* - http://dieparkuhr.de is a german Startup that offers services around the car parking business. Apache Zest is used for the entire backoffice with a large number of services like User-/Partner Management, Product Catalog, Reservation- & Scheduling System, Payment Services.

  18. Apache Zest tm Outlook :: Current Version is 2.1 First release of the Qi4j codebase under the ASF umbrella. Still uses org.qi4j.* § for backward compability. A number of feature added ( Complex Configuration Types, § NamedAssiciations, toValue() and toEntity() conversions) Bugfixings and cleanups § .. § :: Outlook for 3.0 (end of 2015) Full Java 8 Support (Lambda, Streaming API, ..) § GeoSpatial Queries § ... §

  19. Thank you ! See you at https://zest.apache.org ! J J

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend