The Ortus BlogBox

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

 

swagger SDK and cbSwagger v2 Released!

Luis Majano
Sep 03, 2019

 

We are very excited to finally update our swagger modules to version 2: swagger-sdk, cbSwagger. This major version has tons of new features and improvements when documenting ColdBox APIs. However, the biggest features are that we now support the latest Open API Spec => v3.0.2 and we can export your documentation in either JSON or YAML. Check out the release notes below to see all the great new improvements.

Swagger SDK v2.0

This module allows for software development using the Swagger/OpenAPI specification.

box install swagger-sdk

v2.0.0

  • Open API 3.02 support instead of swagger
  • New template layout
  • Engine removals: lucee4.5, ACF10, ACF11
  • Upgraded jackson-core to latest v2.9.9
  • Upgraded snakeyaml to latest v1.24
  • Added more tests
  • Added ability to chain methods on all methods that where void before.
  • document.asYAML() is not fully implemented so you can convert the document to yaml.
  • Upgraded createLinkedHashMap() to use new ACF structNew( "ordered" ) instead.

cbSwagger v2.0

This module automatically generates OpenAPI documenation from your configured application and module routes in either JSON or YAML by simply visiting /cbSwagger in your URL. Focus on building your APIs and document them with ease by simply annotating your handlers.

box install cbSwagger

v2.0.0

  • feature: Upgraded to swagger-sdk 2.0.0 to support OpenAPI 3.0.x. A great guide on migrating is here: https://blog.readme.io/an-example-filled-guide-to-swagger-3-2/

  • Migrated cbSwagger settings to the moduleSettings struct instead of top-level in the config/ColdBox.cfc. Make sure you move your settings.

  • feature : You can now pass a format to the /cbSwagger endpoint to either get the OpenAPI doc as json or yml. Eg: /cbswagger?format=yml

  • feature : You have two distinct routes for the json and yml formats: /cbSwagger/json and /cbSwagger/yml

  • You can choose your default output format via the module settings: defaultFormat setting. Valid options are json and yml

  • features : Support for ColdBox 5 event routing and response routing.

  • improvement : You can now tag your handlers with a displayName that will be used for operation ID building

  • improvement : Improved the way operation Ids are reported so they can be unique when reusing handler actions.

  • improvement : Refactored createLinkedHashMap() -> structNew( "ordered" )

  • improvement: Removed lucee 4.5, acf11 support.

ColdBox MVC, ColdFusion, Releases, REST 0

DataBoss - Dynamic Administrator v3.0.0 Released!

Luis Majano
Aug 29, 2019

 

It has been a long time coming, but we finally get a major release for DataBoss our Dynamic Administrator. This major release brings a slew of updates, new features and now Adobe 2016, 2018 and Lucee 5 Support.

DataBoss, News, Releases 0

Into The Box 2019 Video Recordings Available Now!

Luis Majano
Aug 28, 2019

 

We are so excited to finally announce our video recordings for Into The Box 2019! You can now get this video collection or individual recordings from our vimeo page: https://vimeo.com/ondemand/itb2019. Over 23 hours of instructional videos at your disposal! Enjoy!

0

cbORM v2.2.0 Released!

Luis Majano
Aug 23, 2019

 

We are so excited to bring you yet another minor release for our cborm project to version 2.2. We have fine tuned our module with some cool new features and some major improvements. So let's start with our orm adventure by installing or updating.

0

CommandBox Service Manager 1.0.0 Released

Brad Wood
Aug 22, 2019

 

We are pleased to announce the first release of the CommandBox Service Manager 1.0.0.  The Service Manager is a commercial CommandBox module that allows you to create, update, and control Windows Services for your CommandBox servers with ease.  You can configure logging, auto-restart, and the user the service runs as.   This is ideal for a staging or production server setup where you want certain CommandBox servers to always be running, even if the server reboots.

Usage

 After you purchase and install module, you'll unlock a new set of "server service" commands to create and manage your services.

install commandbox-service-manager@ortus

server service create
server service start

Here is the full list of commands you can use:

  • server service create - Create a new Windows service that will start a CommandBox server
  • server service remove - Remove a Windows service
  • server service update - Update settings for an existing service
  • server service start - Start a service (same as clicking start in the Windows Services screen)
  • server service stop - Stop a service (same as clicking stop  in the Windows Services screen)
  • server service restart - Restart a service (same as clicking restart in the Windows Services screen)
  • server service status - View the status of a service

You can read more in depth information in our docs:

https://commandbox-service-manager.ortusbooks.com/

Purchase

The module is priced at $49 per server and you can manage as many services as you like on that server with your license.  The licensing is simple and works the same whether it's your production server, or a local development machine.  

To purchase the module and start using it today, head over to our product page:

https://ortussolutions.com/products/commandbox-service-manager

Linux support is underway and we'll be adding Mac support as well soon.

CommandBox, Modules, News, Releases 0

Webinar: cbORM: Enjoy ColdFusion ORM again!

Edgardo Cabezas
Aug 20, 2019

 

Join us to our next webinar:

cbORM: Enjoy ColdFusion ORM again!
August 30th, 2019 CST 11:00 A.M. CST (GMT -5:00)
with Luis Majano

Register Now!

In this session, Luis Majano, CEO of Ortus Solutions and creator of COLDBOX, will guide us into a tour over all-new features of the recent new release of the cbORM module.

This is a complete overhaul of our library and it now includes support for Hibernate 3, 4 and 5 in order to support Lucee5, Adobe ColdFusion 2016, 2018 and beyond. We have made tremendous new improvements and compelling performance upgrades for any ORM related operation.

So, get ready for a new ORM adventure and join us in this new Ortus webinar


The Ortus Team

Register Now!
0

ColdBox 5.6.0 Released!

Luis Majano
Aug 16, 2019

 

We are very excited to announce the release of ColdBox version 5.6.0 alongside all the companion standalone libraries: WireBox, LogBox and CacheBox.

What's New With 5.6.0

ColdBox 5.6.0 is a minor version update with lots of fixes, improvements, performance enhancements and some nice new features. Below are the major areas of improvement and the full release notes. To update ColdBox or any of the standalone libraries just leverage CommandBox:

  • update coldbox
  • update logbox
  • update wirebox
  • update cachebox

Major Updates

Performance

We had two specific tickets that have resulted in extreme performance improvements for ALL ColdBox requests. You will feel and see the difference:

  • [COLDBOX-799] - Event Handler Bean: Single instance per handler action for major performance improvements

This ticket was contributed by Dom Watson (https://twitter.com/dom_watson) one of the lead engineers of the amazing PresideCMS project built on top of ColdBox. We worked together to avoid the creation of handler beans on each runnable event. We now cache each event handler bean representation which results in an extreme boost in performance. Thanks Dom!

  • [COLDBOX-810] - Remove afterInstanceAutowire interceptor in handlerService as afterHandlerCreation is now officially removed.

Thanks to our local mad scientist Brad Wood, he reported that the handler services still listened to ALL CFC creations in an application in order to relay an afterHandlerCreation interception point from the good 'ol 2.6 days. This has been finally removed and boom, another big boost in performance!

Better Bug Reports

We have enhanced the bug reporting templates to include much more information when dealing with exceptions:

  • Show SQL error details on Adobe CF
  • Current route, params and debug info
  • Contributing module for the current routed URL

Merging of HTTP Verbs

Thanks to our very own Eric Peterson, you can now merge HTTP verbs on the same route pattern, which you could not do before:

router
    .post( "photos/", "photos.create" )
    .get( "photos/", "photos.index" )
    .delete( "photos/", "photos.remove" );

ColdBox Core Release Notes

Bugs

  • [COLDBOX-778] - ModuleService to add default route doesn't work correctly
  • [COLDBOX-794] - Fix default bug report to show SQL error detail for adobe SQL exceptions
  • [COLDBOX-796] - When doing package resolving if you are in a module it still tries to resolve a module
  • [COLDBOX-806] - Error in HTML helper WRAPPERATTRS doesn't exist in argument scope
  • [COLDBOX-811] - Include the colon for non 80 or 443 port numbers #419 in github

New Features

  • [COLDBOX-812] - Allow merging of HTTP verbs when doing separate verbs for the same route
  • [COLDBOX-813] - Update cfconfig to use env variables instead of inline mixins, modernizeOrDie

Improvements

  • [COLDBOX-795] - Add more current route information to the BugReport.cfm template
  • [COLDBOX-797] - Ability for bug reports and app to know which module contributed the incoming URL route.
  • [COLDBOX-798] - Use of .keyExists() can needlessly use memory in requests, suggest StructKeyExists() instead
  • [COLDBOX-799] - Event Handler Bean: Single instance per handler action for major performance improvements
  • [COLDBOX-800] - HandlerService.cfc$newHandler(): declares variables that are never used
  • [COLDBOX-810] - Remove afterInstanceAutowire interceptor in handlerService as afterHandlerCreation is now officially removed.

CacheBox Release Notes

Bugs

  • [CACHEBOX-56] - AbstractCacheProvider.getOrSet(): local var unscoped when checking if null
CacheBox, ColdBox MVC, ColdFusion, LogBox, News, Releases, WireBox 0

A New Template Approaches: Quick with Auth!

Eric Peterson
Aug 16, 2019

 

You know what's tedious? Authentication. Every project I start needs some sort of authentication system. And every project I start basically from scratch.

I noticed this pattern a while ago and created some libraries to help. You may have used them before.

cbauth is a library that handles creating user sessions for you app while giving enough customization to use different authentication methods and session storages.

auth.authenticate( username, password );
auth.isLoggedIn();
auth.getUser();
auth.logout();

While cbauth manages user sessions, it doesn't protect handlers or actions from being accessed by logged out or unauthorized users. cbguard was created for this purpose providing a way to restrict access to certain handlers and/or actions using annotations.

component secured {

    function index( event, rc, prc ) { /* ... */ }

    function create( event, rc, prc ) secured="create_posts" { /* ... */ }

}

Part of the reason for this customization is that there is not just one way to handle user persistance. Not only is there not just one way, there is not a default way. This can be considered a strength or a weakness of the community, but instead of debating that, I've decided to finally fill that gap using some hand picked libraries.

For data persistance I chose Quick, a ColdBox ORM engine. Unlike Hibernate, Quick is written in CFML and so can be contributed to and by any CFML developer. It also avoids the obscure Hibernate error messages that CF ORM is known for. For example, here's our User component:

component extends="quick.models.BaseEntity" {

    property name="bcrypt" inject="@BCrypt" persistent="false";

    property name="id";
    property name="email";
    property name="password";

    public User function setPassword( required string password ) {
        return assignAttribute(
            "password",
            bcrypt.hashPassword( arguments.password )
        );
    }

    public boolean function hasPermission( required string permission ) {
        return true;
    }

    public boolean function isValidCredentials(
        required string email,
        required string password
    ) {
        var user = newEntity().where( "email", arguments.email ).first();
        if ( ! user.isLoaded() ) {
            return false;
        }
        return bcrypt.checkPassword( arguments.password, user.getPassword() );
    }

    public User function retrieveUserByUsername( required string email ) {
        return newEntity()
            .where( "email", arguments.email )
            .firstOrFail();
    }

    public User function retrieveUserById( required numeric id ) {
        return newEntity().findOrFail( arguments.id );
    }

    public struct function getMemento() {
        return {
            "email": variables.getEmail()
        }
    }

}

This User entity is used both to represent a User in our system as well as handle intergrating with cbauth and cbguard. Properties are mapped to columns. The plural component name is used as the table name. A fluent syntax based off of qb is used to create, retrieve, update, and delete records. I think you'll find it a joy to work with.

There are plenty of other modules added and configured:

  • cbValidation is used to make sure all the data used is valid.
  • bCrypt is used to hash passwords in the database.
  • commandbox-dotenv and commandbox-cfconfig are installed to start up our servers with the correct settings.
  • A users table migration is provided and commandbox-migrations is installed to apply it.
  • Form submissions are automatically checked for a CSRF token with verify-csrf-interceptor.
  • Even niceties like redirectBack and a custom UniqueInDatabase validator are provided to completely show how I would start off an authentication system using ColdBox and Quick.
  • And last, but not least, code formatting is handled automatically using commandbox-cfformat.

The best part, this is just the starting point! Is this good enough for you? Get going on the rest of your app. Need some more information for your users? Add a migration, modify the form, and update the entity component. Have a different authentication system like LDAP or OAuth? Update your authenticationService with cbauth in your config/ColdBox.cfc file.

You can get started today using this new skeleton in your coldbox create app command:

coldbox create app skeleton=cbtemplate-quick-with-auth

Edit your .env file and server start!

I hope this gets you up and going faster than ever creating your awesome ColdBox applications!

0

Learn Modern ColdFusion in 100 Minutes Digital Download Release

Luis Majano
Aug 15, 2019

 

Modern CFML Book

 

We are very excited to announce the availability of the first edition of our book in digital format available for purchase. This book is completely FREE to read online, but now you can have your digital download for your ebook readers. The sale of this book also helps support all of our open source initiatives and makes you a rockstar in our book!

This book is dedicated to the ColdFusion (CFML) community at large so we can continue to foster its development and grow as a community that can share and lift each other up. It is also built with the ideal of helping organizations get out of legacy hell and modernize (Modernize or Die™).

ColdFusion is not the same as it was 20 years ago! It's dynamic, vibrant, modern, fluent, and functional! Let's begin our adventure into the world of MODERN ColdFusion .

Thank you for your patronage and enjoy the digital download!

PS: Print books are coming real soon!
0

cbORM v2.0.0 Released! Enjoy ColdFusion ORM again!

Luis Majano
Aug 12, 2019

 

We are so excited to release a second major version of our cborm project to version 2.x. This is a complete overhaul of our library and it now includes support for Hibernate 3, 4 and 5 in order to support Lucee5, Adobe ColdFusion 2016, 2018 and beyond. We have made tremendous new improvements and compelling performance upgrades for any ORM related operation. So get ready for a new ORM adventure.

0