Drash v1.3.0 Release Notes
Tags: deno, drash, typescript, webdev
Published: 2020-11-05 14:33:29

Drash v1.3.0 was released! This release contains a few new features, performance improvements, and bug fixes. Here are some highlights:

* New Features
    * [Front-end TypeScript Support](#frontend-typescript-support)
    * [Create React Apps](#create-react-apps)
    * [Improved Templating System](#improved-templating-system)
    * [Virtual Paths](#virtual-paths)
* [Performance Improvements](#performance-improvements)

## New Features

### Front-end TypeScript Support

With the help of Drash's [ServeTypeScript](https://github.com/drashland/deno-drash-middleware/tree/v0.6.0/serve_typescript) middleware, you can write front-end TypeScript. Yup, you read that correctly! Front-end TypeScript.

Here's how it works:

1. You give this middleware TypeScript files to compile when your Drash application starts up.
2. When your application is starting up, the middleware compiles the files into JavaScript and saves the JavaScript in memory -- ready to be used when your application is running.
3. When a request is made to a TypeScript file from your front-end, the middleware sends back the compiled JavaScript -- allowing your browser to execute it.

Since the TypeScript files are compiled and cached when your application starts up, your application stays quick to respond to requests.

Want to scale your front-end using TypeScript with a single tool? Check out the ServeTypeScript [tutorial](https://github.com/drashland/deno-drash-middleware/tree/v0.6.0/serve_typescript).

### Create React Apps

Drash comes with a basic tool to help you quickly create a Drash application with everything working out of the box. In the past, we only supported one front-end framework: Vue. Now, you can create both Vue and React apps.

Want to build a Drash + React app? Get started with Drash's Create App script [here](https://drash.land/drash/#/tutorials/cli/create-app).

### Improved Templating System

Drash has been reworked to support template engine middleware. Specifically, its very own Tengine middleware. This piece of software allows your Drash application to render HTML pages with the template engine of YOUR choice. If you don't have a preference, it also comes with a default template engine called Jae and it's super easy to use.

Want to render HTML in an easy, scalable fashion? Check out the Tengine [tutorials](https://github.com/drashland/deno-drash-middleware/tree/v0.6.0/tengine).

### Virtual Paths

Virtual paths allow a project's file structure to be more flexible. It also helps prevent you from having to give users access to parts of your system just so you can serve static assets such as CSS and JS files. We want you to keep your application secure, so we have added virtual paths -- allowing you to control what URLs map to what folders in your project(s).

Want to add virtual paths to your Drash application? Check out the [tutorial](https://drash.land/drash/#/tutorials/servers/serving-virtual-paths).

## Performance Improvements

We realized during our time hammering on Drash that it slowed down when the number of resources (similar to controllers in the [MVC](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller) pattern) increased. Each resource increased the size of the cache used for resource lookups. This also increased the time it took Drash to match a resource with a given request. We figured out where Drash's performance decreased and restructured the way it looks for resources. Now, Drash keeps its performance up when loaded with 1 resource or even 10,000 resources. For more information about this performance issue, you can check out the discussions on the [GitHub pull request](https://github.com/drashland/deno-drash/pull/393).

---

View the Drash project [here](https://github.com/drashland/deno-drash).

More information on this release can be found at https://github.com/drashland/deno-drash/releases/tag/v1.3.0.

Want to contribute to the Drash Land projects? View our "Good First Issues" [here](https://github.com/orgs/drashland/projects/1?card_filter_query=label%3A%22Good+First+Issue%22).