@ejemba                    epo.jemba@kametic.com                          Kametic  2013 

nuunframework

standard building blocks for java framework designers

who is "epo jemba" by day?

freelance

senior software and framework architect 

14 years of professional experience

♥♥♥ j ava ♥♥ go   devops   gnu&linux    ♥  html/js/css3

currently working  on a big java enterprise stack 
in a well known car french manufacturer

who is "epo jemba" by night

happy { husband , father of 2 sons } 

 nyctalope coder & owner of nuun framework

https://github.com/kametic/nuun-framework

CTO of  startup when time left

agenda

what problem does nuun solve ?
how nuun can help you design your own framework ?
how does nuun work ?
demo : create our own framework
q & a

what problem does nuun solve ?

as an it department or a professional programmer
good development  productivity saves money because ...
you manage
more and more applications
users ask you  
more and more features , quick
you manage
more and more technologies
you have to choose between
more and more it vendors



good productivity often is associated with frameworks, but ...

companies expect a framework that ...

allows rapid application development
proposes companies own  convention (over configuration)
integrates their i.t. constraints in term of security, infrastructure, ...
promotes best practices and maintainability
helps developers focus on business
allows features scalability without friction


COSTS REDUCTION

professionals expect a framework that...

is completely type safe (pure java, no xml)
is fully extensible
is configurable for their specifics needs
major frameworks is compatible with
can be hacked 
make developers happy !

FAST !


create our framework knowing that ...

each company is unique

that

all i.t. department needs are different

that

for users all features matter

o.m.g. this is impossible !




how nuunframework can help you design your own framework ?

without nuun


with nuun



nuun framework supplies building blocks to construct your own  conventions and constraints.


this is the 1st framework 
designed for framework .




how does nuun work ?

a kernel / plugin architecture


an open close principle incarnation that allows applications to be extended with no hurts

the kernel coordinates the lifecycle of the application 
and  has an overall view of it

he delegates to plugins more features centered tasks
they actually hold the  logic

kernel and plugin share a protocol around patterns : specifications and commands

core : the kernel in 3 components


plugin manager (service loader)
plugin discovery and activation

classpath scanner (reflections)
fine grained classpath analysis

inversion of control/jsr330 engine (guice)
provides the application object graph 

api : the plugins

are created by framework designers

they contain all the logic and lifecycle for a specific concern

they get data from kernel via commands of specifications

they provide the specific di submodule for that concern

plugins are well isolated and discoverable  

frameworks can then be seen as a coherent set of plugins

spi : dependency injection provider

used by the kernel
provided by 3rd party developers 

an interface that converts non guice dependency injection object to guice module

di frameworks are compatible with  nuun framework 

spring spi is provided oo box : it converts application context to guice module

protocol : kernel <-> plugin

demo : our own rest framework

based on of sparkjava.com library
no ioc  & route are not testable

import static spark.Spark.*;
import spark.*;

public class HelloWorld {

   public static void main(String[] args) {
      
      get(new Route("/hello") {
         @Override
         public Object handle(Request request, Response response) {
            return "Hello World!";
         }
      });
   }
} 

can be tested easily


 public class Cars extends Route {
    
    public Cars() {
        super("/cars");
    }

    @Override
    public Object handle(Request request, Response response) {
        
        return "Hello World!";
    }
}




q&a


thank you

framework ?



a reusable set of libraries or classes which provide functionality common to a whole class of applications


usually a framework ...

provides usefull building blocks
promotes inversion of control
controls application lifecycle through api
provides extensibility via spi
promotes convention over configuration
decreases the developer number of choices
is unmodifiable
open close principle
offers chosen default behaviour

advantages of using a framework

increases reliability and reduces programming time.
framework provides security features which are required for a common class of applications.
developers can focus on business development.
often helps enforce platform-specific best practices and rules.
assist in programming to design patterns and general best practices.

disadvantages

performance can sometimes degrade when common code is used
can require a significant education to use efficiently and correctly (high learning curve)
cursor between rigidity and flexibility can cause more programming issues than without
Bugs and security issues in a framework can affect every application using  it

metaframework ?


a framework for framework

so all the previous applies 

but 

new concepts appears

new roles

delegability


metaframework does not share its own api 

why should I care ?

Nuun Framework

By Epo Jemba

Nuun Framework

Standard Building Blocks for Framework Designers.

  • 1,789