The Ortus BlogBox

"Ortus: A rise, beginning, coming into being, born, the origin!"

 

 

Category Filtering: 'rest'

 

REST2016 - ColdBox REST Template

Luis Majano
Mar 03, 2016

 

One of the newest additions to the ColdBox application templates and also the CommandBox generation templates is our REST application template.  This template will get you started with creating ColdBox RESTFul services. The best way to start with it is by downloading CommandBox, as we will use this for generation, scaffolding and as your integrated server. Then we can start working on our RESTFul service:
 

mkdir myservice
box coldbox create app skeleton=rest name=MyService --installColdBox


Once you execute these CLI commands, you will have a new RESTFul service application ready to go.  The next step is to startup an ad-hoc server and test it out:
 

box server start --rewritesEnable


This will open a browser window with the results of your first RESTFul service:
 

ColdBox, ColdBox, REST, REST, RoadShow, RoadShow 0

ColdBox RESTFul Roadshow 2016 coming your way!

Luis Majano
Mar 02, 2016

 

We are so excited to bring this month a RESTFul roadshow based on ColdBox technologies.  We will have several blog posts all month long and several live webinars from the team as well.  Below you can find a schedule of our presentations that we will be conducting live.  We will also record them and publish them in our Vimeo and YouTube channels.  The URL of all webinars is http://experts.adobeconnect.com/coldbox-connection/

Date Presenter Topic
March 4, 2016 at 11AM Central Brad Wood Intro to REST with ColdBox
March 9, 2016 at 11AM Central Curt Gratz Powering Angular JS with RESTFul Services
March 16, 2016 at 11AM Central Jon Clausen + Gavin Pickin RESTFul Tools for Lazy Experts (Relax)
March 23, 2016 at 11AM Central Luis Majano Advanced REST Building with ColdBox
March 30, 2016 at 11AM Central Scott Steinbeck Building Ionic Apps with ColdBox REST

So stay tuned all month as we discover and empower you with great RESTFul building knowledge using ColdBox MVC.  

 

If you want to find out the time for your local timezone, then just click here and find out: http://www.timeanddate.com/worldclock/meeting.html?p1=104

ColdBox, ColdBox, Community, Community, REST, REST, RoadShow, RoadShow 0

RESTFul Content auto-marshalling with ColdBox

Luis Majano
Feb 10, 2015

 

ColdBox 4 introduces yet more nifty tools for RESTFul web services.  In ColdBox 4, we introduced the capability to do auto-marshaling of RESTFul body content from either JSON or XML formats.  We will take care of the defaults, nulls and incompatibility requirements.  All you have to do is use our event.getHTTPContent() method and pass the appropriate conversion argument. 

The possible conversion boolean arguments are:

  • json
  • xml

If set, ColdBox will auto-marshall the HTTP Body content from JSON or XML to native ColdFusion data types.

myStruct  = event.getHTTPContent( json=true );
xmlObject = event.getHTTPContent( xml=true );
Info: If the content is not json or xml, it will just return the content back to you.
ColdBox, REST, Tips & Tricks 0