itb2016 intro to coldbox mvc
TRANSCRIPT
![Page 1: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/1.jpg)
ColdBox MVC:NATHANIEL FRANCIS
![Page 2: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/2.jpg)
‣Computer Know How
‣CFML/JavaScript developer
‣APIs (REST)
Who Am I?
![Page 3: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/3.jpg)
As applications grow, complexity growsAs complexity grows, complications multiply
![Page 4: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/4.jpg)
How do we make complex applications
while minimizing complications?
![Page 5: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/5.jpg)
GOALS: make existing code organization simple while developing complex applications for teams to work on
![Page 6: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/6.jpg)
GOALS: make developing new code
simple to integrate into existing code
![Page 7: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/7.jpg)
![Page 8: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/8.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/9.jpg)
MODEL ‣business logic ‣data interaction manipulation ‣services ‣data access
![Page 10: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/10.jpg)
CONTROLLER ‣“confusing one” ‣controls application flow ‣mediator between model & view ‣request/response manager ‣different for different systems
![Page 11: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/11.jpg)
The MVC Restaurant: an illustration in organization
![Page 12: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/12.jpg)
‣The menu
‣What the user sees
‣User Interface (UI) -> what the user interacts with
View
![Page 13: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/13.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/14.jpg)
Model‣The Chef
‣Makes the food
‣Data modeling
‣Data management
‣Business Logic
![Page 15: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/15.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/16.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/17.jpg)
Just the Basics!
![Page 18: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/18.jpg)
brings more to the table ‣conventions over configurations ‣modularization ‣event management
![Page 19: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/19.jpg)
Conventions over Configurations
Over
![Page 20: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/20.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/21.jpg)
Conventions
Put the right stuff in the right box and everything works
![Page 22: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/22.jpg)
What this looks like…
![Page 23: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/23.jpg)
Conventions:
“put the right stuff in the right box & ColdBox does the work for you”
![Page 24: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/24.jpg)
Beyond
MVC
![Page 25: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/25.jpg)
Modulesprogram packages that give extra functionality
to your core application. They are:‣ Independent ‣Interchangeable ‣reusable
![Page 26: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/26.jpg)
What this looks like…
‣ Lives in modules folder (convention)
‣Has its own MVC
‣ Independent, interchangeable, pluggable
‣Extensibility
![Page 27: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/27.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/28.jpg)
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](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/29.jpg)
Putting it Back Together
![Page 30: ITB2016 Intro To ColdBox MVC](https://reader035.vdocuments.net/reader035/viewer/2022062904/587756e91a28ab84388b77e1/html5/thumbnails/30.jpg)
@Francainath