itb2016 intro to coldbox mvc

30
ColdBox MVC: NATHANIEL FRANCIS

Upload: ortus-solutions-corp

Post on 15-Apr-2017

98 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: ITB2016   Intro To ColdBox MVC

ColdBox MVC:NATHANIEL FRANCIS

Page 2: ITB2016   Intro To ColdBox MVC

‣Computer Know How

‣CFML/JavaScript developer

‣APIs (REST)

Who Am I?

Page 3: ITB2016   Intro To ColdBox MVC

As applications grow, complexity growsAs complexity grows, complications multiply

Page 4: ITB2016   Intro To ColdBox MVC

How do we make complex applications

while minimizing complications?

Page 5: ITB2016   Intro To ColdBox MVC

GOALS: make existing code organization simple while developing complex applications for teams to work on

Page 6: ITB2016   Intro To ColdBox MVC

GOALS: make developing new code

simple to integrate into existing code

Page 7: ITB2016   Intro To ColdBox MVC
Page 8: ITB2016   Intro To ColdBox MVC

VIEW ‣what the user interacts with ‣UI/UX ‣browser/mobile stuff ‣“the site” or “the app”

according to the user

Page 9: ITB2016   Intro To ColdBox MVC

MODEL ‣business logic ‣data interaction manipulation ‣services ‣data access

Page 10: ITB2016   Intro To ColdBox MVC

CONTROLLER ‣“confusing one” ‣controls application flow ‣mediator between model & view ‣request/response manager ‣different for different systems

Page 11: ITB2016   Intro To ColdBox MVC

The MVC Restaurant: an illustration in organization

Page 12: ITB2016   Intro To ColdBox MVC

‣The menu

‣What the user sees

‣User Interface (UI) -> what the user interacts with

View

Page 13: ITB2016   Intro To ColdBox MVC

Controller

‣ The waiter/server

‣Go-between for the View and the Model

‣ Takes orders from the View

‣Brings food from the Model

Page 14: ITB2016   Intro To ColdBox MVC

Model‣The Chef

‣Makes the food

‣Data modeling

‣Data management

‣Business Logic

Page 15: ITB2016   Intro To ColdBox MVC

Model-View-Controller (MVC)

Controller Brings requests from the View to the Model

Brings data from the Model to the View

Model handles the business logic

View UI, what the client sees/interacts with

Page 16: ITB2016   Intro To ColdBox MVC

What MVC does for us ‣organization ‣file definition ‣every aspect of our app has a place ‣makes amazing coffee

Page 17: ITB2016   Intro To ColdBox MVC

Just the Basics!

Page 18: ITB2016   Intro To ColdBox MVC

brings more to the table ‣conventions over configurations ‣modularization ‣event management

Page 19: ITB2016   Intro To ColdBox MVC

Conventions over Configurations

Over

Page 20: ITB2016   Intro To ColdBox MVC

Configurations

You map this thing to that other thing and write this annotation if you need the third thing and if you make a new thing you have to map that

to the first thing and…???

Page 21: ITB2016   Intro To ColdBox MVC

Conventions

Put the right stuff in the right box and everything works

Page 22: ITB2016   Intro To ColdBox MVC

What this looks like…

Page 23: ITB2016   Intro To ColdBox MVC

Conventions:

“put the right stuff in the right box & ColdBox does the work for you”

Page 24: ITB2016   Intro To ColdBox MVC

Beyond

MVC

Page 25: ITB2016   Intro To ColdBox MVC

Modulesprogram packages that give extra functionality

to your core application. They are:‣ Independent ‣Interchangeable ‣reusable

Page 26: ITB2016   Intro To ColdBox MVC

What this looks like…

‣ Lives in modules folder (convention)

‣Has its own MVC

‣ Independent, interchangeable, pluggable

‣Extensibility

Page 27: ITB2016   Intro To ColdBox MVC

Modules can be…

‣ Libraries for extra functionality

‣Widgets

‣Anything that gives extends your core application

‣ Example: ContentBox uses modules for its functionality

Page 28: ITB2016   Intro To ColdBox MVC

Interceptors‣ Intercept an event with action

‣ “When” -> interception point ‣Default interception points

‣Custom interception points

‣ Intercept time ‣“when this happens, do this…”

Page 29: ITB2016   Intro To ColdBox MVC

Putting it Back Together

Page 30: ITB2016   Intro To ColdBox MVC

@Francainath