The Ortus BlogBox

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

 

 

Category Filtering: 'coldbox-mvc'

 

REST2016 - Route Responses

Luis Majano
Mar 14, 2016

 

You can route responses inline with ColdBox via the addRoute() function globally in your main routes.cfm template or within any Module as well. This will allow you to build simple response functions or even mock out or stub a RESTFul service very easily. The paremeters you will use for response routing will be: response, statusCode and statusText.

The response argument can be a string or a closure or UDF pointer. The closure and UDF will receive a rc argument which represents the request collection parsed already for you. The simple string can also contain replacement strings that are binded to the parsed parameters from the pattern by using {key} replacements. You can even execute runEvent() within your closure and delegate to whatever event you want instead of auto-routing as well.

// Simple response routing
addRoute( 
    pattern="/users/hello", 
    response="

Hello From RESTLand

", statusCode=200 ); // Simple response routing with placeholders addRoute( pattern="/users/:username", response="

Hello {username} From RESTLand

", statusCode=200 ); // Closure/UDF response routing addRoute( pattern="/users/:username", response=function(rc){ // Do some code here // more code return "

Hello #arguments.rc.username# from RESTLand

"; } ); // Closure/UDF response routing with event support addRoute(pattern="/users/:username", response=function(rc){ // Do some code here // more code return runEvent(event='api:users.data', eventArguments={quickData=true}); });
Happy Resting!!
ColdBox Connection, ColdBox MVC, REST, RoadShow 0

REST2016 - Creating Sub-module URL entry points

Luis Majano
Mar 11, 2016

 

In this entry I will go over how to leverage ColdBox's Modular architecture to RESTFul routing. In ColdBox, every module's ModuleConfig.cfc you create has two important facets for building RESTFul services: 1) The this.entryPoint and the 2) routes structure in the configure() method.

If you are creating ColdBox applications using modules, then you will benefit with the capability to nest entry points so they can match to nested sub-modules. Let's say you have the following module structure:

+modules
  + api
    + security
    + data
ColdBox Connection, ColdBox MVC, REST, RoadShow 0

REST2016 - Introduction to RESTful Tools - Coldbox Relax

Gavin Pickin
Mar 11, 2016

 

ColdBox Relax is a set of restful tools, for lazy experts, that provides an easy way to describe RESTful web services, test RESTful Web Services, monitor RESTful web services, and document your RESTful API.

ColdBox Connection, ColdBox MVC, Relax, REST, RoadShow 0

TestBox v2.3.0 Released!

Luis Majano
Mar 11, 2016

 

Team TestBox is proud to bring our latest release to the masses, v2.3.0.  This release includes a collection of fixes but also several new cool features thanks to Mr Eric Peterson and our Slack community. It has been incredible to get so much community support in this project and so many pull requests and even to our documentation. So thank you so much for supporting and believing in us. This release is for you!

All the docs have been updated in our documentation book and check out the what's new page for an in-depth overview of this release.

You can also very easily get started or update your project with TestBox via CommandBox CLI for ColdFusion (CFML):

ColdBox MVC, ColdFusion, Community, News, Releases, TestBox 0

REST2016 - Versioning Your ColdBox REST API with Modules (Runnable Example)

Brad Wood
Mar 09, 2016

 

In our ColdBox RESTFul RoadShow this month, we've been talking about why ColdBox is the fastest and easiest ways to build a robust REST API in CFML.  One of the very powerful features of the ColdBox MVC Platform is that you can use modules to break your apps and APIs up into management chunks  instead of building a monolith.  Modules also let you decouple pieces of your application so multiple teams can work on different parts.  And with the power of CommandBox's CLI and package manager to assemble your app's dependencies, you can even store modules in a completely separate code repository!   This is exactly what we're going to demo today.

ColdBox Connection, ColdBox MVC, REST, RoadShow, Sample Apps, Tutorials 0

Relax Version 2.2.0 Is Now Available

Jon Clausen
Mar 05, 2016

 

Relax version 2.2.0, for Coldbox, is now available and includes a number of bug fixes and improvements.  Relax, aptly subtitled "RESTful tools for lazy experts", is a Coldbox module, which makes it easy for developers to conduct modeling, documentation and testing for their RESTful APIs.   The easiest way to get started with Relax is by installing it via CommandBox from the root of your ColdBox application:

box install relax

Once Relax is installed, an example API is available to help you get started. Additional documentation is also available.  To upgrade your existing installation of Relax, simply run:

box update relax

Happy coding!

Release Notes - ColdBox Relax - Version 2.2.0:

Bug

  • [RELAX-12] - Sample API is excluded
  • [RELAX-20] - The Resource URL changes for every code change

New Feature

  • [RELAX-17] - Make test shell full URL rewritable
  • [RELAX-18] - Ability to view resource details from doc viewer

Improvement

  • [RELAX-4] - Remove dependency on sessions
  • [RELAX-21] - Update StringBuffer to StringBuilders
  • [RELAX-22] - Updated build scripts for using DocBox
  • [RELAX-23] - Travis CI integration for tests
  • [RELAX-24] - Update of all dependencies of the shell tester
ColdBox MVC, Relax, Releases, REST 0

REST2016 - ColdBox REST - BaseHandler Module

Gavin Pickin
Mar 04, 2016

 

In our last blog post, we talked about the ColdBox REST Template, a great way to use Commandbox to spin up a REST Application Template, and get started with ColdBox RESTful services. That doesn’t work if you have an existing application, and you want to add to it. That is why we have created a easy to install Module that you can just plug into your application.

ColdBox MVC, REST, RoadShow 0

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 MVC, REST, RoadShow 2

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 (Click for recording)
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 1PM 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 MVC, Community, REST, RoadShow 1

CommandBox Now An Official Homebrew Formula

Jon Clausen
Feb 27, 2016

 

 

At Ortus, we try to make the installation of our tools as simple as possible, while supporting a variety of platforms.  For OS X users, staying up-to-date with your CommandBox installations just got a bit easier.   

CommandBox is now an official formula for Homebrew, the package manager for Mac users!

ColdBox MVC, ColdFusion, CommandBox, Tutorials 0
<< 1 2 3 4 5 6 7 8 9 10 ... 91 >>