Think beyond frameworks, The real gems are in the languages

Post on 17-Jan-2017

119 views 2 download

Transcript of Think beyond frameworks, The real gems are in the languages

Think Beyond Frameworks, the Real Gems are in the

Languages

Naresha K Chief Technologist, Channel Bridge Software Labs

naresha.k@gmail.com @naresha_k

1

2

DISCLAIMER

3

The contents of this presentation may hurt your feelings! Proceed with

caution

4

5

6

Grails

4

Opensource, Forums, Slack

Community3

On-demand capabilities,

Reuse, Share

Plugin Ecosystem

2

Convention over configuration,

Groovy

Productivity1

JVM, Spring, Hibernate

Built on proven tech

Business Goals

8

1

Time To Market

2

Economy

9

10

Layer 4

Layer 3

Layer 2

Layer 1

What it takes to succeed?

12

Architecture

Framework

Domain

Practices

Libraries

Language

13

Why should we care for the language?

Programming Concepts

Objects

Functions

Higher Order Functions

Inheritance

Encapsulation

Polymorphism

Statically Typed

Dynamic Typing

Immutability

Composition

Parallel processing

Lazy Evaluation

15

Frameworks reflect the opinion

of the language they are built on

16

Lesser the opinionated the

language => more decisions to be made

by it’s users

Groovy & Grails EvolutionTIMELINES

17

Initial

DynamicGroovy 2.0

Static Typing

Groovy 1.6

AST Transformation

18

Language Evolution Influences Framework

Evolution

19

20

Groovy & Grails

21

https://twitter.com/venkat_s/status/815686401870200833

Specifying Types

22

def  friend  =  new  Person(name:  'Raj')def  friend  =  new  Person(name:  'Raj')def  friend  =  new  Person(name:  'Raj')

def friend = new Person(name: ‘Ravi')// vsPerson me = new Person(name: 'Naresha')

Specifying Types

23

class Person {String nameInteger age

}

Specifying Types

24

class MyController {def myService// vsAnotherService anotherService

}

Hierarchies -> Capabilities

25

1 Inheritance

2 Composition (Traits)

Leveraging Meta Programming

26

class MyService { @Transactional(propagation = Propagation.REQUIRES_NEW)

def m1(){}

def m2() {m1()// vsmyProxy.m1()

}}

Leveraging Meta Programming

27

sc.clazz.metaClass.getMyProxy = { -> grailsApplication.mainContext.getBean(propertyName) }

Leveraging DSLs

28

class MenuItem {String menuCodeString groupString labelString controllerString action

}

Leveraging DSLs

29

menuItems = [new MenuItem(

menuCode: 'customer_new', group: ‘customer',

label: 'Add Customer',controller: ‘customer',

action: 'create'),

]

Leveraging DSLs

30

menuItems = [menuItem {

menuCode 'customer_new' group 'customer'label: 'Add Customer'controller: 'customer'action: 'create'

}]

Leveraging DSLs

31

menuItems = [menuItem {

menuCode 'customer_new' group 'customer'label 'Add Customer'controller 'customer'action 'create'

}]

Leveraging DSLs

32

class MenuItem {String menuCode// Other attributes

def menuItem(Closure config){}menuCode(val) { menuCode = val}

}

33

Frameworks are gateways to

productivity, not barriers for innovation

Think Beyond Frameworks, Learn Languages

Happy Learning…“