|
| 1 | +# [v4.0.62 Release Notes](https://github.com/ServiceStack/ServiceStack/blob/master/docs/2016/v4.0.60.md) |
| 2 | + |
| 3 | +We've got another big release with features added across the board, we'll list the main highlights here but |
| 4 | +please see the [v4.0.62 release notes](https://github.com/ServiceStack/ServiceStack/blob/master/docs/2016/v4.0.62.md) |
| 5 | +for the full details. |
| 6 | + |
| 7 | +## [Gistlyn](http://gistlyn.com) |
| 8 | + |
| 9 | +We're excited to announce [gistlyn.com](http://gistlyn.com) to the world - Gistlyn is a C# Gist IDE for creating, running and sharing stand-alone, executable C# snippets! |
| 10 | + |
| 11 | +Born out of our initiative to improve ServiceStack's documentation, we set out to create the best way for developers to learn and explore different features in ServiceStack, Gistlyn is the result of this effort which lets you try out and explore C# and .NET libraries using just a modern browser, making it the ideal companion tool for trying out libraries during development or on the go from the comfort of your iPad or recent Android tablets by going to: http://gistlyn.com |
| 12 | + |
| 13 | +Gistlyn lets you run any valid C# fragments will execute your code on Gistlyn's server, running in an isolated context where each of the variables defined in the top-level scope can be inspected further. The preview inspector also includes an Expression evaluator that can be used to evaluate C# expressions against the live server session. |
| 14 | + |
| 15 | +### [Gistlyn Collections](http://gistlyn.com/collections) |
| 16 | + |
| 17 | +Gistlyn is also an Open platform where anyone can create [Collections](http://gistlyn.com/collections) - A simple markdown document with info about a feature and links to source code where users can try it out "live" in the browser, with instant feedback so you can quickly preview the results at a glance. |
| 18 | + |
| 19 | +### [OrmLite Interactive Tour](http://gistlyn.com/ormlite) |
| 20 | + |
| 21 | +The [OrmLite Collection](http://gistlyn.com/ormlite) is a great example of this which is now the best way to learn about and try OrmLite with walk through guides that takes you through different OrmLite features. We intend to add more guides like this in future so Gistlyn becomes the best place to learn about and test different features. In the meantime we've added simple TODO examples pre-configured with the necessary Nuget packages to explore OrmLite, Redis and PocoDynamo at: |
| 22 | + |
| 23 | + - http://gistlyn.com/ormlite-todo |
| 24 | + - http://gistlyn.com/redis-todo |
| 25 | + - http://gistlyn.com/pocodynamo-todo |
| 26 | + |
| 27 | +### [Add ServiceStack Reference in Gistlyn](http://gistlyn.com/add-servicestack-reference) |
| 28 | + |
| 29 | +One feature that will add a lot of complementary value to your ServiceStack Services is Gistlyn's integrated support for Add ServiceStack Reference feature which will generate a Typed API for your remote ServiceStack Services and let you call them using ServiceStack's typed C# Service Clients and view their results - within seconds! |
| 30 | + |
| 31 | +The easiest way to use this feature is to add the **BaseUrl** for your remote ServiceStack instance to the `?AddServiceStackReference` query string, e.g: |
| 32 | + |
| 33 | + - http://gistlyn.com?AddServiceStackReference=techstacks.io |
| 34 | + |
| 35 | +Which will create a new Gist with your Typed DTOs attached and an example request using a pre-configured JsonServiceClient and the first GET Request DTO it can find. So without having written any code you can Press play to execute a Typed API Request against your ServiceStack Services. |
| 36 | + |
| 37 | +The URL can be further customized to tell Gistlyn which Request DTO and C# expression it should use and whether to auto run it. This feature should make it easier to collaborate with others about your ServiceStack Services as you can send a url so they can test it out without having the proper developer environment setup. For more advanced scenarios you can easily save a modified script as a gist and send a link to that instead. |
| 38 | + |
| 39 | +### [Gistlyn Snapshots](http://gistlyn.com/snapshots) |
| 40 | + |
| 41 | +Snapshots lets you save the *entire client state* of your current workspace (excluding your login info) |
| 42 | +into a generated url which you can use to revert back in time from when the snapshot was taken or send to someone else who can instantly see and run what you're working on, who'll be able to continue working from the same place you're at. |
| 43 | + |
| 44 | +### Gistlyn's Stateless Architecture |
| 45 | + |
| 46 | +One surprising thing about Gistlyn is that it's entirely stateless where it runs without any kind of backend db persistence. All state is either persisted to Github gists or in your browser's `localStorage`. Not even your Authenticated Github session is retained on the server as it's immediately converted into an encrypted JWT Cookie that is sent with every Ajax request, so redeployments (or even clean server rebuilds) won't lose any of your work or force you to Sign In again until the JWT Token expires. |
| 47 | + |
| 48 | +Gistlyn's Github Repo provides a good example of a modern medium-sized ServiceStack, React + TypeScript App that takes advantage of a number of different ServiceStack Features: |
| 49 | + |
| 50 | + - [React Desktop Apps](https://github.com/ServiceStackApps/ReactDesktopApps) - |
| 51 | + tooling for packaging Gistlyn's ASP.NET Web App into a Winforms Desktop and Console App |
| 52 | + - [Server Events](https://github.com/ServiceStack/ServiceStack/wiki/Server-Events) - providing real-time |
| 53 | + Script Status updates and Console logging |
| 54 | + - [TypeScript](https://github.com/ServiceStack/ServiceStack/wiki/TypeScript-Add-ServiceStack-Reference) - enabling end-to-end Typed API requests |
| 55 | + - [Github OAuth](https://github.com/ServiceStack/ServiceStack/wiki/Authentication-and-authorization#auth-providers) - |
| 56 | + authentication with Github |
| 57 | + - [JWT Auth Provider](https://github.com/ServiceStack/ServiceStack/wiki/JWT-AuthProvider) - enabling both JWT and JWE ecrypted stateless Sessions |
| 58 | + - [HTTP Utils](https://github.com/ServiceStack/ServiceStack/wiki/Http-Utils) - consuming Github's REST API |
| 59 | + and creating an authenticated HTTP Proxy in [GitHubServices.cs](https://github.com/ServiceStack/Gistlyn/blob/master/src/Gistlyn.ServiceInterface/GitHubServices.cs) |
| 60 | + |
| 61 | +### [Run Gistlyn on your Desktop](http://gistlyn.com/downloads) |
| 62 | + |
| 63 | +Thanks to ServiceStack's [React Desktop Apps](https://github.com/ServiceStackApps/ReactDesktopApps) VS.NET Template Gistlyn is available in a variety of different flavours: |
| 64 | + |
| 65 | +Deployed as an ASP.NET Web Application on both Windows / .NET and Linux / Mono servers at: |
| 66 | + |
| 67 | + - [gistlyn.com](http://gistlyn.com) - Ubuntu / Vagrant / Windows 2012 Server VM / IIS / .NET 4.6 |
| 68 | + - [mono.gistlyn.com](http://mono.gistlyn.com) - Ubuntu / Docker / mono / nginx / HyperFastCGI |
| 69 | + |
| 70 | +In addition to a running as an ASP.NET Web App, Gistlyn is also available as a self-hosting |
| 71 | +Winforms Desktop or cross-platform OSX/Linux/Windows Console App at: http://gistlyn.com/downloads |
| 72 | + |
| 73 | +Running Gistlyn on your Desktop lets you take advantage of the full resources of your CPU for faster |
| 74 | +build and response times and as they're run locally they'll be able to access your RDBMS or |
| 75 | +other Networked Servers and Services available from your local Intranet. |
| 76 | + |
| 77 | +## 1st class TypeScript support |
| 78 | + |
| 79 | +TypeScript has become a core part of our overall recommended solution that's integrated into all ServiceStackVS's React and Aurelia Single Page App VS.NET Templatesoffering a seamless development experience with access to advanced ES6 features like modules, classes and arrow functions whilst still being able to target most web browsers with its down-level ES5 support. |
| 80 | + |
| 81 | +We've added even deeper integration with TypeScript in this release with several enhancements to the generated TypeScript DTOs which graduates TypeScript to a 1st class supported language that together with the new TypeScript `JsonServiceClient` available in the servicestack-client npm package enables the same productive, typed API development experience available in our other 1st-class supported client platforms, e.g: |
| 82 | + |
| 83 | +```ts |
| 84 | +client.post(request) |
| 85 | + .then(r => { |
| 86 | + console.log(`New C# Gist was created with id: ${r.gist}`); |
| 87 | + }) |
| 88 | + .catch(e => { |
| 89 | + console.log("Failed to create Gist: ", e.responseStatus); |
| 90 | + }); |
| 91 | +``` |
| 92 | + |
| 93 | +Where the `r` param in the returned `then()` Promise callback is typed to Response DTO Type. |
| 94 | + |
| 95 | +### Isomorphic Fetch |
| 96 | + |
| 97 | +The `servicestack-client` is a clean "jQuery-free" implementation based on JavaScript's new Fetch API standard utilizing nodes isomorphic-fetch implementation so it can be used in both JavaScript client web apps as well as node.js server projects. |
| 98 | + |
| 99 | +### ServerEventsClient |
| 100 | + |
| 101 | +In addition to `JsonServiceClient` we've ported most of the JavaScript utils in ss-utils.js including the new `ServerEventsClient` which Gistlyn uses to process real-time Server Events with: |
| 102 | + |
| 103 | +```ts |
| 104 | +const channels = ["gist"]; |
| 105 | +const sse = new ServerEventsClient("/", channels, { |
| 106 | + handlers: { |
| 107 | + onConnect(activeSub:ISseConnect) { |
| 108 | + store.dispatch({ type: 'SSE_CONNECT', activeSub }); |
| 109 | + fetch("/session-to-token", { |
| 110 | + method:"POST", credentials:"include" |
| 111 | + }); |
| 112 | + }, |
| 113 | + ConsoleMessage(m, e) { |
| 114 | + batchLogs.queue({ msg: m.message }); |
| 115 | + }, |
| 116 | + ScriptExecutionResult(m:ScriptExecutionResult, e) { |
| 117 | + //... |
| 118 | + } |
| 119 | + } |
| 120 | +}); |
| 121 | +``` |
| 122 | + |
| 123 | +### .NET Core support for ServiceStack.Client |
| 124 | + |
| 125 | +We're happy to be able to release our initial library support for .NET Core with .NET Core builds for ServiceStack.Client and its dependencies, available in the following NuGet packages: |
| 126 | + |
| 127 | + - ServiceStack.Client.Core |
| 128 | + - ServiceStack.Text.Core |
| 129 | + - ServiceStack.Interfaces.Core |
| 130 | + |
| 131 | +Until we've completed our transition, we'll be maintaining .NET Core builds in separate NuGet packages containing a `.Core` suffix as seen above. This leaves our existing .NET packages unaffected, whilst letting us increase our release cadence of .NET Core packages until support for .NET Core libraries has stabilized. |
| 132 | + |
| 133 | +We've published a step-by-step guide showing how to Install ServiceStack.Client in a .NET Core App at: https://github.com/ServiceStack/ServiceStack/blob/netcore/docs/pages/netcore.md |
| 134 | + |
| 135 | +### ServiceStack.Text is now Free! |
| 136 | + |
| 137 | +To celebrate our initial release supporting .NET Core, we're now making ServiceStack.Text completely free for commercial or non-commercial use. We've removed all free-quota restrictions and are no longer selling licenses for ServiceStack.Text. By extension this also extends to our client libraries that just depend on ServiceStack.Text, including ServiceStack.Client and ServiceStack.Stripe which are also both free of any technical restrictions. |
| 138 | + |
| 139 | +### Encrypted Service Clients for iOS, Android and OSX |
| 140 | + |
| 141 | +The `EncryptedServiceClient` is now available in Xamarin iOS, Android and OSX packages so your Xamarin Mobile and OSX Desktop Apps are now able to benefit from transparent encrypted service client requests without needing to configure back-end HTTP servers with SSL. |
| 142 | + |
| 143 | +## Last release supporting .NET 4.0 |
| 144 | + |
| 145 | +As announced earlier this year in preparation for .NET Core, this will be our last release supporting |
| 146 | +.NET 4.0. Starting from next release all projects will be upgraded to .NET 4.5. Should you need it, |
| 147 | +the .NET 4.0 compatible ServiceStack source code will remain accessible in the `net40` branches of all major ServiceStack Github repositories. |
| 148 | + |
| 149 | +## Aurelia updated to 1.0 |
| 150 | + |
| 151 | +To coincide with the v1.0 release of Aurelia the Aurelia VS.NET template has been updated to v1.0 using **bootstrap.native** and is now pre-configured with both the new `servicestack-client` and local `src/dtos.ts` TypeScript Reference that includes an end-to-end Typed DTO integrated example. |
| 152 | + |
| 153 | +## Improved Razor intellisense |
| 154 | + |
| 155 | +We've updated all our ASP.NET Razor VS.NET Templates to use the ideal `Web.config` configuration for editing Razor pages without designer errors in VS.NET 2015. |
| 156 | + |
| 157 | +## JWT Auth Provider |
| 158 | + |
| 159 | +The `JwtAuthProvider` has added support for specifying multiple fallback AES Auth Keys and RSA Public Keys allowing for smooth key rotations to newer Auth Keys whilst simultaneously being able to verify JWT Tokens signed with a previous key. |
| 160 | + |
| 161 | +## Multitenancy RDBMS AuthProvider |
| 162 | + |
| 163 | +ServiceStack's `IAuthProvider` has been refactored to use the central and overridable `GetAuthRepository(IRequest)` AppHost factory method where just like ServiceStack's other "Multitenancy-aware" dependencies now lets you dynamically change which AuthProvider should be used based on the incoming request. |
| 164 | + |
| 165 | +This can be used with the new `OrmLiteAuthRepositoryMultitenancy` provider to maintain isolated User Accounts per tenant in all major supported RDBMS. |
| 166 | + |
| 167 | +## OrmLite |
| 168 | + |
| 169 | +OrmLite continues to see improvements with many of the new features in this release contributed by the Community, with special thanks to @shift-evgeny, @OlegNadymov and @bryancrosby for their contributions. There's too many examples to list here, so please check the release notes for OrmLite's new capabilities. |
| 170 | + |
| 171 | +### Dump Utils |
| 172 | + |
| 173 | +To improve their utility in Gistlyn C# gists for quickly dumping and inspecting the contents of an object the `T.PrintDump()` and `T.Dump()` extension methods can now be used on objects with cyclical references where it will display the first-level `ToString()` value of properties that have circular references. |
| 174 | + |
| 175 | +The `Dump()` utils are invaluable when explanatory coding or creating tests as you can quickly see what's in an object without having to set breakpoints and navigate nested properties in VS.NET's Watch window. |
| 176 | + |
| 177 | +### PATCH APIs added to HttpUtils |
| 178 | + |
| 179 | +The same HTTP Utils extension methods for Post and Put now also have `Patch()` equivalents. |
| 180 | + |
| 181 | +## ServiceStack.Redis |
| 182 | + |
| 183 | +Transaction support for Complex Type APIs was added to Redis and we've improved resiliency for dealing with failing Sentinels. The Default Auto Retry Timeout was also increased from 3 to 10 seconds. |
| 184 | + |
| 185 | +## PocoDynamo |
| 186 | + |
| 187 | +PocoDynamo now has Typed API support for DynamoDB Conditional Expressions and C# int and string enums. |
| 188 | + |
| 189 | +## Stripe |
| 190 | + |
| 191 | +The `StripeGateway` now supports sending and Receiving Customer `Metadata`, `BusinessVatId` and returning the Customer's `Currency`. |
| 192 | + |
| 193 | +## Find free Tcp Port |
| 194 | + |
| 195 | +The new `HostContext.FindFreeTcpPort()` lets you find the first free TCP port within a specified port-range which you can use to start your `AppHost` on the first available port: |
| 196 | + |
| 197 | +```csharp |
| 198 | +var port = HostContext.FindFreeTcpPort(startingFrom:5000, endingAt:6000); |
| 199 | +new AppHost() |
| 200 | + .Init() |
| 201 | + .Start($"http://localhost:{port}/"); |
| 202 | +``` |
| 203 | + |
| 204 | +## Other ServiceStack Features: |
| 205 | + |
| 206 | + - Named dependency support for Funq's AutoWired APIs was contributed by @donaldgray |
| 207 | + - Compression of `[CacheResponse]` responses can now be disabled with the `NoCompression` property |
| 208 | + - `MakeInternal` option was added to C# / F# and VB.NET Native Types to generate internal Types |
| 209 | + - OnError callback added to ServerEvents and new `isAuthenticated` property now being returned to Clients |
| 210 | + - Can disable the second Total query in AutoQuery with `IncludeTotal = false` |
| 211 | + - New Request/Response filters for Service Gateways requests that are also validated against any Validators |
| 212 | + |
| 213 | +This covers most of the features, please see the [full release notes](https://github.com/ServiceStack/ServiceStack/blob/master/docs/2016/v4.0.62.md) for more details on any of the ones you're interested in. |
| 214 | + |
1 | 215 | # [v4.0.60 Release Notes](https://github.com/ServiceStack/ServiceStack/blob/master/docs/2016/v4.0.60.md) |
2 | 216 |
|
3 | 217 | v4.0.60 is another jam-packed release starting with exciting new API Key and JWT Auth Providers enabling fast, stateless and centralized Auth Services, a modernized API surface for OrmLite, new GEO capabilities in Redis, Logging for Slack, performance and memory improvements across all ServiceStack and libraries including useful utilities you can reuse to improve performance in your own Apps! |
|
0 commit comments