Wednesday, October 24, 2018

v0.4.0: Moving towards Beta ready

So, the project is moving along at a steady pace, and as we battle test the code in production environments, we are getting most of the kinks ironed out. In this release we are rolling out additional functionality:
  • A comprehensive CLI
  • A yeoman generator
  • A model query language

The CLI

One of the major enhancements in this release is the support of a CLI.  Previously there had been a smattering of scripts that were accessible from various entry points.  This made individual usage quite simple, but discovery was fairly complicated.  Enter in the extensible CLI. 

Every module in the framework now has the ability to declare extensions to the CLI.  All are fully documented at in the documentation site.   The initial CLI rollout contains:
  • clean - Remove compilation cache
  • compile - Pre-compile application for performance
  • run - Run specific @Application class
  • test - Execute tests
  • email-template - Generate/Test email templates
  • swagger-client - Generate swagger client

The Yeoman Generator

Additionally, the original path of using a starter project only went so far.  In a desire to allow for more customization and a guided path to project initialization, the framework now supports a yeoman generator.  The primary features of this are to establish a RESTful application with a model based backend (mongo/elasticsearch). 

Model Query Language

In addition to the normal model support, we have rolled out a query language that will allow for expressive queries, primarily intended for the end user.  The goal is to model this off a standard query language like SQL.  This will be only for querying, but should enable some interesting functionality.

Future Roadmap

In addition to the finished features, there are quite a few interesting features currently in development.

Lambda/Serverless Support

Currently we are building out support for AWS Lambda in the Rest framework.  This will allow for user to package their RESTful applications as a series of lambda functions, established with routes defined in cloud formation configurations.  

Additionally, the goal is to support deployment as well.  This feature dovetails with new CLI compile feature to be able to precompile all the needed code for a minimal deployment.  

Additionally, the goal is to only include the needed modules per controller to minimize the lambda size.

Enhanced Elasticsearch Support

Provide the ability to leverage more specific functionality of elasticsearch, like aggregations and full text searching.  

SQL Support for Model

Slightly farther down the roadmap is the ability to support SQL as a Model backend.  The current goal is to leverage sequeulize for handling the primary functionality of mapping objects to database queries.  

Sunday, August 19, 2018

A more RESTful future

As of the 0.2.x branch, Travetto has moved all RESTful packages towards a framework-agnostic structure.  The primary driver behind this, is to allow for alternatives to express.js to be used in applications.  Currently, koa and fastify have been added to the list of supported backends. 

Additionally, all packages that previously built upon the express module, now will build upon the rest module.  This means that Asset-Express, Auth-Express, and Express modules have been deprecated, and replaced with Asset-Rest, Auth-Rest, and Rest respectively.  The Rest module also provides an API for Request and Response objects that allows for building backend agnostic middleware.  The APIs are modeled after express, allowing for usage of the most common middleware packages (e.g. passport). 

This means that the Rest framework allows for koa and fastify to both use passport via the Request/Response API.  Also, the Swagger integration occurs at the Rest level, and so all documentation patterns still apply.

Enjoy,
- The Travetto Team

Friday, August 10, 2018

Release 0.2.0 (Alpha): A Little More Swagger

The first major update to the framework, since the alpha launch, has just been announced.  We are pleased to announce the integration of Controller and Schema documentation.  Starting with this release (0.2.0), the Controller and Schema registries will now also house documentation information (e.g. title, description, etc).  Additionally, with the Controllers, we now support enforcement of parameter (path, query) types.

As you can see, the documentation is supported via JSDoc comments, type annotations, and even directly via Decorators (SchemaBody, SchemaQuery, PathParam, Describe...).  This reinforces the paradigm of not forcing developers to repeat themselves.

Additionally, with the documentation model created, we now support the ability to take that model and generate familiar output formats.   The format we are launching with, is Swagger v2.0 (Version 3 will be supported when the swagger-codegen tools supports it).  When the @travetto/swagger module is imported, it will automatically register a /swagger.json endpoint that will return the API specification.

Not to stop short, we additionally provide the ability to generate a client, at run-time, from the swagger spec, using the swagger-codegen tool.  If configured properly, every change to a model or an endpoint will trigger a regeneration of the spec as well as the client.  This should be useful when doing full stack development, and wanting to have a typed model/client between the front end and back end.

In addition to the above there have been minor fixes and performance enhancements.

Enjoy,
- The Travetto Team

Sunday, July 1, 2018

Alpha Launch

The travetto framework has been in development, either through active coding, or planning for over two years.  The framework was birthed out of two main desires:
  • To provide an opinionated for the Node ecosystem for API development.
  • To solve pain points from previous 15 years of using and designing frameworks.
The framework is currently launching with a slew of modules:
The primary cores for the application are defined in the green boxes:

  • Configuration
  • Dependency Injection
  • Schema
  • Model
  • Express
  • Authentication
  • Asset Management
  • Testing
Additionally, the Testing framework has a companion vscode plugin which provides realtime feedback of tests.

To get started, take a look at the Getting Started guide or take a look at a Starter project.

As a final note, the project is in it's infancy and will be growing and refining.  There are many areas to contribute to, and all contributions are welcomed.

Thanks,
- The Travetto Team