Presentation is loading. Please wait.

Presentation is loading. Please wait.

With ColdBox and REST. Co-Manager of IECFUG Flex, ColdFusion, JavaScript Developer A member of Team ColdBoxPresident of Sercossa Inc.

Similar presentations


Presentation on theme: "With ColdBox and REST. Co-Manager of IECFUG Flex, ColdFusion, JavaScript Developer A member of Team ColdBoxPresident of Sercossa Inc."— Presentation transcript:

1 with ColdBox and REST

2 Co-Manager of IECFUG Flex, ColdFusion, JavaScript Developer A member of Team ColdBoxPresident of Sercossa Inc.

3 Data is the most important part of your application

4 Exposing your model The web is evolving Heavier front-end applications Mobile Frequent integrations Requires more options Standard page view (PV) model REST (JSON, XML, etc) AMF (raw data for Flash/Flex) Many others

5 Representational State Transfer

6 Creating Routes Config/routes.cfm addRoute(pattern="/customers", handler="remote.customers", action={GET="getAllCustomers"}); HTTP Verbs GET, POST, PUT, DELETE Can use existing handlers But typically need to customize results

7 Creating Handlers Handlers know who to talk to Use a base handler to make life easy PreHandler : prepares data PostHandler : marshals data Exception Handling is required Errors must be returned in the correct format OnError : Handles exceptions and marshals data

8 In new ways

9 Example: AMF APIs Action Message Format for Flash/Flex Binary format for serializing CF objects to ActionScript Acts like a plain CFC method invocation Uses ColdBox Proxy to enable the full ColdBox Request Life Cycles Allowing interceptors, AOP, etc. to work normally Can extend remote functionality to suite needs

10 Creating a reusable model

11 What are Handler for? Handler are Controllers They know what data is required They know who to talk to Handlers are NOT for: Business logic Data processing Mixing logic in your handles creates duplication

12 Example Handlers with logic Leveraging services Security Logging Error Handling Data manipulation Security Logging Error Handling Data manipulation Security Logging Error Handling Data manipulation Security Logging Error Handling Data manipulation

13 A Better Architecture SQL DatabaseSAPREST ServiceOther Sources Business Services Data Services

14 Kalen@Sercossa.com @KalenGibbons


Download ppt "With ColdBox and REST. Co-Manager of IECFUG Flex, ColdFusion, JavaScript Developer A member of Team ColdBoxPresident of Sercossa Inc."

Similar presentations


Ads by Google