Profile cover photo
Profile photo
Darren Reid
52 followers -
Software developer by day, aspiring indie game developer by night
Software developer by day, aspiring indie game developer by night

52 followers
About
Darren's posts

Post has shared content
v4.0.56 Released!

This is another release jam-packed with some killer features, the release notes are unfortunately a bit longer than usual as the new features required more detail to describe what each does and understand how they work.

I'll list the big points below to provide a quick overview, but you can put aside the free time, checkout the v4.0.56 Release Notes: http://tinyurl.com/v4-0-56 for the finer details.

New AutoQuery Data

AutoQuery Data is an alternative implementation of AutoQuery for RDBMS but supports an Open Provider model which can be implemented to query multiple data source backends. The 3 data source
providers available include:

- MemorySource - for querying static or dynamic in-memory .NET collections, some of the included examples show querying a flat-file `.csv` file and a 3rd Party API that can also the throttled with configurable caching.
- ServiceSource - a step higher than MemorySource where you can decorate the response of existing Services with AutoQuery's rich querying capabilities.
- DynamoDbSource - adds rich querying capabilities over an AWS DynamoDB Table making it much more productive than if you had to construct the query manually.

AutoQuery DynamoDB queries are also self-optimizing where it will transparently construct the most optimal query possible by looking at any Hash Id's, Range Keys and Local Indexes populated in the Request to construct the most optimal DynamoDB QueryRequest or Scan Operation behind-the-scenes.

And since AutoQuery Services are just normal ServiceStack Services they get to take advantage of ServiceStack's rich ecosystem around Services so with just the single AutoQuery DynamoDB Request DTO below:

//C#
[Route("/rockstar-albums")]
[CacheResponse(Duration = 60, MaxAge = 30)]
public class QueryRockstarAlbums : QueryData<RockstarAlbum>
{
public int? Id { get; set; }
public int? RockstarId { get; set; }
public string Genre { get; set; }
public int[] IdBetween { get; set; }
}


We've declaratively created a fully-queryable DynamoDB AutoQuery Service that transparently executes the most ideal DynamoDB queries for each request, has it's optimal representation efficiently cached on both Server and clients, whose Typed DTO can be reused as-is on the client to call Services with an end-to-end Typed API using any .NET Service Client, that's also available to external developers in a clean typed API, natively in their preferred language of choice, accessible with just a right-click menu integrated inside VS.NET, Xcode, Android Studio, IntelliJ and Eclipse - serving both PCL Xamarin.iOS/Android as well as native iOS and Android developers by just Adding a ServiceStack Reference to the base URL of a remote ServiceStack Instance - all without needing to write any implementation!

HTTP Caching

HTTP Caching is another big feature we expect to prove extremely valuable which much improves story around HTTP Caching that transparently improves the behavior of existing ToOptimized Cached Responses, provides a typed API to to opt-in to HTTP Client features, introduces a simpler declarative API for enabling both Server and Client Caching of Services and also includes Cache-aware clients that are able to improve the performance and robustness of all existing .NET Service Clients - functionality that's especially valuable to bandwidth-constrained Xamarin.iOS / Xamarin.Android clients offering improved performance and greater resilience.

Cache-aware Service Clients

You can now create cache-aware versions of all .NET Service Clients that respects any caching directives returned by your Server using the `.WithCache()` extension methods, e.g:

//C#
IServiceClient client = new JsonServiceClient(baseUrl).WithCache();

IServiceClient client = new JsonHttpClient(baseUrl).WithCache();


Cache-aware Service Clients can dramatically improve performance by eliminating server requests entirely as well as reducing bandwidth for re-validated requests. They also offer an additional layer of resiliency as re-validated requests that result in Errors will transparently fallback to using pre-existing locally cached responses. For bandwidth-constrained environments like Mobile Apps they can dramatically improve the User Experience and as they're available in all supported PCL client platforms.

@jezzsantos also wrote a comprehensive overview about HTTP Caching in general and described out he developed an alternative caching solution in ServiceStack in his epic Caching Anyone post: http://www.mindkin.co.nz/blog/2016/1/5/caching-anyone

Service Gateway

is another valuable capability that despite being trivial to implement on top of ServiceStack's existing message-based architecture, opens up exciting new possibilities for development of loosely-coupled Modularized Service Architectures.

The Service Gateway is available from `base.Gateway` in both sync:

//C#
public object Any(GetCustomerOrders request)
{
return new GetCustomerOrders {
Customer = Gateway.Send(new GetCustomer { Id = request.Id }),
Orders = Gateway.Send(new QueryOrders { CustomerId = request.Id })
};
}


and async versions:

//C#
public async Task<GetCustomerOrdersResponse> Any(GetCustomerOrders request)
{
return new GetCustomerOrdersResponse {
Customer = await Gateway.SendAsync(new GetCustomer { Id = request.Id }),
Orders = await Gateway.SendAsync(new QueryOrders { CustomerId = request.Id })
};
}


The benefit of the Gateway is that the same above code will continue to function even if you later decided to split out your Customer and Order subsystems out into different Micro Services.

The Service Gateway also allows plugging in a Discovery Service for your Micro Services where you can happily just send Request DTO's to call Services and the Discovery Service will transparently route it to the most available Service.

We're extremely fortunate to have @Mac and @rsafier both jump in with Service Discovery solutions straight out-of-the-gate which you can find more about in their GitHub Project home pages:

- https://github.com/MacLeanElectrical/servicestack-discovery-consul
- https://github.com/rsafier/ServiceStack.Discovery.Redis

Super CSV Support

We've now implemented CSV deserialization support so now all your Services can accept CSV payloads in addition to serializing to .csv. As a tabular data format it's especially useful when your Service accepts Lists of POCO's such as in Auto Batched Requests where it's now the most compact text data format to send them with using either the new `CsvServiceClient` or `.PostCsvToUrl()` HTTP Utils extension method.

A feature that sets ServiceStack's CSV support apart is that it's built on the compact and very fast JSV Format which not only can deserialize a tabular flat file of scalar values at high-speed, it also supports deeply nested object graphs which are encoded in JSV and escaped in a CSV field.

Which opens a number of interesting use-cases as you can now maintain rich code or system data in .csv flat-files to easily query them in AutoQuery Services, making it a great option for structured logging as they're now easily parsable, queryable with AutoQuery Data, analyzed with your favorite Spreadsheet or imported using CSV features or data migration tooling for your preferred RDBMS.

Given these useful properties we've developed a CSV Request Logger that can be registered with:

//C#
Plugins.Add(new RequestLogsFeature {
RequestLogger = new CsvRequestLogger(),
});


To store request and error logs into daily logs to the following overridable locations:

- `requestlogs/{year}-{month}/{year}-{month}-{day}.csv`
- `requestlogs/{year}-{month}/{year}-{month}-{day}-errors.csv`

Error logs are also written out into a separate log file as it can be useful to view them in isolation.

Virtual FileSystem

To efficiently support Appending to existing files as needed by the CsvRequestLogger we've added new `AppendFile` API's and implementations for Memory and FileSystem Virtual File Providers:

//C#
interface IVirtualFiles
{
void AppendFile(string filePath, string textContents);
void AppendFile(string filePath, Stream stream);
}


OrmLite

New `UpdateAdd` API's provides several Typed API's for updating existing values:

//C#
/Increase everyone's Score by 3 points
db.UpdateAdd(new Person { Score = 3 }, fields: x => x.Score);

//Remove 5 points from Jackson Score
db.UpdateAdd(new Person { Score = -5 }, x => x.Score, x =>
where: x.LastName == "Jackson");

//Graduate everyone and increase everyone's Score by 2 points
var q = db.From<Person>().Update(x => new { x.Points, x.Graduated });
db.UpdateAdd(new Person { Points = 2, Graduated = true }, q);


Deprecating Legacy OrmLite API's

We're going to gracefully deprecate OrmLite's legacy API's by first deprecating them in this release to notify which API's are earmarked to move, then in a future release we'll move the extension methods under the `ServiceStack.OrmLite.Legacy` namespace to move them out of OrmLite's default namespace.

The deprecated API's include those ending with `Fmt` which uses C#'s old-style string formatting, e.g:

//C#
var tracks = db.SelectFmt<Track>("Artist = {0} AND Album = {1}",
"Nirvana",
"Nevermind");


Ideally they should be replaced with the parameterized API's below:

//C#
var tracks = db.Select<Track>(x => x.Artist == "Nirvana" && x.Album == "Nevermind");

var tracks = db.Select<Track>("Artist = @artist AND Album = @album",
new { artist = "Nirvana", album = "Nevermind" });

var tracks = db.SqlList<Track>(
"SELECT * FROM Track WHERE Artist = @artist AND Album = @album",
new { artist = "Nirvana", album = "Nevermind" });


The other API's that have been deprecated are those that inject an `SqlExpression<T>` e.g:

//C#
var tracks = db.Select<Track>(q =>
q.Where(x => x.Artist == "Nirvana" && x.Album == "Nevermind"));


Which should be changed to passing in the `SqlExpression<T>` by calling `db.From<T>`, e.g:

//C#
var tracks = db.Select(db.From<Track>()
.Where(x => x.Artist == "Nirvana" && x.Album == "Nevermind"));


PocoDynamo

ServiceStack's POCO-friendly DynamoDB client has added support for DynamoDB's UpdateItem which lets you modify existing attributes. The easiest API to use is to pass in a partially populated POCO with containing any non-default values you want updated:

//C#
db.UpdateItemNonDefaults(new Customer { Id = customer.Id, Age = 42 });


There's also a more flexible API to support each of DynamoDB UpdateItem operations, e.g:

//C#
db.UpdateItem(customer.Id,
put: () => new Customer {
Nationality = "Australian"
},
add: () => new Customer {
Age = -1
},
delete: x => new { x.Name, x.Orders });


ServiceStack.Redis

Additional resiliency was added in ServiceStack.Redis which can now handle re-connections for broken TCP connections happening in the middle of processing a Redis Operation.

New API's were added to remove multiple values from a Sorted Set:

//C#
interface IRedisClient {
long RemoveItemsFromSortedSet(string setId, List<string> values);
}

interface IRedisNativeClient {
long ZRem(string setId, byte[][] values);
}


ServiceStack IDEA

The ServiceStack IDEA Android Studio plugin was updated to support Android Studio 2.0.

Community

There were a number of community plugins published in this release, check out their GitHub projects for
more info:

- [ServiceStack.Discovery.Redis](https://github.com/MacLeanElectrical/servicestack-eventstore)
- [ServiceStack.SimpleCloudControl](https://github.com/rsafier/ServiceStack.SimpleCloudControl)
- [ServiceStack.Funq.Quartz](https://github.com/CodeRevver/ServiceStackWithQuartz)
- [ServiceStack.Discovery.Consul](https://github.com/MacLeanElectrical/servicestack-discovery-consul)
- [ServiceStack.Discovery.Redis](https://github.com/rsafier/ServiceStack.Discovery.Redis)

Other Features

- Changed ServiceStack.Interfaces to Profile 328 adding support Windows Phone 8.1
- New `IHasStatusDescription` can be added on Exceptions to customize their StatusDescription
- New `IHasErrorCode` can be used to customize the ErrorCode used, instead of its Exception Type
- New `AppHost.OnLogError` can be used to override and suppress service error logging



Post has shared content
ServiceStack VS Templates Update

We've just published an update to ServiceStackVS VS .NET Templates - the update release notes are available at: https://github.com/ServiceStack/ServiceStack/blob/master/docs/2016/servicestackvs/v1.0.22.md

React Desktop Apps received a major update with much faster Startup times on Windows that now features autoupdating support built-in courtesy of Squirrel Windows integration! The OSX App can now also be built using Xamarin's free Community Edition :)

We're now all-in with React and TypeScript with both our VS.NET SPA React Templates modernized with TypeScript + JSPM stack. If you're new to both, please checkout the comprehensive TypeScript + Redux walk through to get started quickly: https://github.com/ServiceStackApps/typescript-redux

Post has shared content
v4.0.54 released!
http://servicestack.net/release-notes

Firstly want to apologize for forgetting to publish the summary release notes for v4.0.52 release earlier this year where we added Kotlin/Android support to Add ServiceStack Reference - the full release notes for v4.0.52 is available under 4.0.52.

v4.0.54 is another jam-packed release with a lot of features across the board, the release notes is longer than normal which I'll do my best to summarize:

AutoQuery Viewer

An exciting new plugin available from the ServiceStack.Admin NuGet package which provides an instant automatic UI for all your AutoQuery services. As it's super quick to add we've enabled it on a number of existing live demos which you can try out:

- http://github.servicestack.net/ss_admin/
- http://northwind.servicestack.net/ss_admin/
- http://stackapis.servicestack.net/ss_admin/
- http://techstacks.io/ss_admin/

It also ships with a number of productive features out-of-the-box:

- Marking up Services - Use `[AutoQueryViewer]` attribute to mark up look and default behavior of Services
- Filter Services - If you have a lot of Services, this will help quickly find the service you want
- Authorized Only Services - Users only see the AQ Services they're authorized to, which lets you customize the UI for what each user sees
- Multiple Conditions - The UI makes it easy to create complex queries with multiple conditions
- Updated in Real-Time - AQ Services are refreshed and App State is saved as-you-type
- Change Content Type - The short-cut links can be used to access results in your desired format
- Customize Columns - Customize results to only return the columns you're interested in
- Sorting and Paging - Results can be sorted by any column and paged with nav links

A quick showcase of some of these features are available on YouTube: https://youtu.be/YejYkCvKsuQ

AutoQuery Enhancements

A number of new Enhancements were also added to AutoQuery Services:

- Parameterized AutoQuery - AQ Services are now parameterized with Convention Templates converted to use db params
- Customizable Fields - You can now customize which fields you want returned using new Fields property
- Named Connection - As part of our new Multitenancy features AQ Services can be easily configured to run on multiple db's
- T4 Templates - OrmLite's T4 templates now have options for generating AutoQuery Services and named connections

Server Events

We've added a couple of demos showing how easy it is to create rich, interactive mobile and web apps with Server Events:

Xamarin.Android Chat

The new Xamarin.Android demo shows how to use the .NET PCL typed Server Events Client to connect to an existing chat.servicestack.net back-end and communicate with existing Ajax web clients. It also shows how to use Xamarin.Auth to authenticate with ServiceStack using Twitter and OAuth.

A quick demo is available from: https://www.youtube.com/watch?v=tImAm2LURu0

Networked Time Traveller Shape Creator

We've given the existing Time Traveller Shape Creator networking capabilities which now let you "Remote Desktop" into and watch other users view the app. This was surprisingly simple to do with Redux, just 1 React Component and 2x 1-line ServiceStack ServerEvent Services.

Live demo at: http://redux.servicestack.net

Update Channels on Live Subscriptions

You can now update the channels your active SSE subscription is connected to without re-connecting. This is enabled everywhere, in Memory + Redis SSE backends as well as typed API's for .NET and Ajax clients.

TypeScript React App (beta)

The new TypeScript + React VS.NET Tempalte captures what we believe is the best combination of technologies for developing rich JavaScript apps: TypeScript 1.8, React, JSPM, typings + Gulp - combined together within a single integrated, pre-configured VS.NET template. This tech suite represents our choice stack for developing rich Single Page Apps which we've used to build AutoQuery Viewer and Networked Shape Creator and currently our number #1 choice for new SPA Apps.

TypeScript Redux

To help developers familiarize themselves with these technologies we've also published an in-depth step-by-step guide for beginners that starts off building the simplest HelloWorld TypeScript React App from scratch then slowly growing with each example explaining how TypeScript, React and Redux can be used to easily create the more complex networked Time Travelling Shape Creator, available at: https://github.com/ServiceStackApps/typescript-redux

ss-utils

To make it easier to use ss-utils in JavaScript projects, we're maintaining copies of ss-utils in npm, JSPM and Definitely Typed registries. We've also added a few new common utils:

- $.ss.combinePaths
- $.ss.createPath
- $.ss.createUrl
- $.ss.normalizeKey
- $.ss.normalize
- $.ss.postJSON

Customize JSON Responses on-the-fly

The JSON/JSV responses for all your services can now be customized on-the-fly by your Service consumers so they're able to access your JSON responses in their preferred configuration using the `?jsconfig` modifier, e.g:

/service?jsconfig=EmitLowercaseUnderscoreNames,ExcludeDefaultValues

It also supports the much shorter Camel Humps notation:

/service?jsconfig=elun,edv

Most JsConfig config options are supported.

Improved support for Multitenancy

There are a number of new features and flexibile options available to make Multitenancy easier to support where you can easily change which DB is used at runtime based on an incoming request with a request filter.

We've added a number of examples in the release notes to show how this works.

ServiceClient URL Resolvers

You can use the new `TypedUrlResolver` and `UrlResolver` delegates available on every .NET Service Client to change which url each request is made with.

ServiceStack.Discovery.Consul

This feature makes it easy to enable high-level discovery and health/failover features as seen in the new ServiceStack.Discovery.Consul Community project which maintains an active list of available load-balanced ServiceStack Services as well as auto-registering the Services each instance supports taking care of managing the different endpoints for each Service where all Typed requests can be made with a single Service Client and Consul takes care of routing to the appropriate active endpoint.

Multiple File Uploads

The new PostFilesWithRequest API's on every ServiceClient for sending mutliple file uploads with a single Request.

Local MemoryCacheClient

The new `LocalCache` property gives your Services access to a Local Memory Cache in addition to your registered ICacheClient

OrmLite

- New `[EnumAsInt]` attribute can be used as an alternative to `[Flags]` for storing enums as ints in OrmLites but serialized as strings
- Free-text SQL Expressions are now converted to Parameterized Statements
- New SelectFields API provides an smart API to reference and return custom fields
- All `db.Exists()` API's have been optimized to return only a single scalar value
- Max String column definition on MySql now uses LONGTEXT

ServiceStack.Text

- New `JsConfig.SkipDateTimeConversion` to skip built-in Conversion of DateTime's.
- New `ISO8601DateOnly` and `ISO8601DateTime` DateHandler formats to emit only the Date or Date and Time

Stripe Gateway

Support added to support Stripe's unconventional object notation for complex Requests. This feature is used
in the new `CreateStripeAccount` API.

Minor ServiceStack Features

- Old Session removed and invalided when generating new session ids for a new AuthRequest
- New ResourcesResponseFilter, ApiDeclarationFilter and OperationFilter added to SwaggerFeature to modify response
- `Name` property added to `IHttpFiles` in Response.Files collection
- `HostType`, `RootDirectoryPath`, `RequestAttributes`, `Ipv4Addresses` and `Ipv6Addresses` added to [?debug=requestinfo](https://github.com/ServiceStack/ServiceStack/wiki/Debugging#request-info)
- `StaticFileHandler` now has `IVirtualFile` and `IVirtualDirectory` constructor overloads
- New `StaticContentHandler` for returning custom text or binary responses in `RawHttpHandlers`

WARNING .NET 4.0 builds will cease after August 1, 2016

We want to warn everyone that we will be upgrading all packages to .NET 4.5 and stop providing .NET 4.0 builds after August 1, 2016 now that Microsoft no longer supports them. If you absolutely need supported .NET 4.0 builds after this date please leave a comment on:
https://servicestack.uservoice.com/forums/176786-feature-requests/suggestions/12528912-continue-supporting-net-4-0-projects

And that's a wrap, apologies for the length of the TL;DR despite my best efforts to condense. For even more details on each feature please see the release notes: https://servicestack.net/release-notes

Enjoy!


Post has shared content
v4.0.48 Released!

https://servicestack.net/release-notes

We have another exciting release for anyone already on or are looking to use AWS in future.

ServiceStack.Aws
All of ServiceStack's support for AWS is encapsulated within the single ServiceStack.Aws NuGet package 
which references the latest AWSSDK v3.1x dependencies for .NET 4.5+ projects, containing:

 - PocoDynamo - Exciting new declarative, code-first POCO client for DynamoDB with LINQ support
 - SqsMqServer - A new MQ Server for invoking ServiceStack Services via Amazon SQS MQ Service
 - S3VirtualPathProvider - A read/write Virtual FileSystem around Amazon's S3 Simple Storage Service
 - DynamoDbAuthRepository - A new UserAuth repository storing UserAuth info in DynamoDB
 - DynamoDbAppSettings - An AppSettings provider storing App configuration in DynamoDB
 - DynamoDbCacheClient - A new Caching Provider for DynamoDB

PocoDynamo - https://github.com/ServiceStack/PocoDynamo
is a highly productive, feature-rich, typed .NET client which extends ServiceStack's Simple code-first POCO approach 
and re-use of your code-first data models with Amazon's industrial strength and highly-scalable NoSQL DynamoDB.

There's comprehensive docs available on the project site: https://github.com/ServiceStack/PocoDynamo

AWS Apps - http://awsapps.servicestack.net/
To demonstrate the ease of which you can build AWS-powered solutions with ServiceStack we've rewritten 
6 of our existing Live Demos to use a pure AWS managed backend using:

 - Amazon DynamoDB for data persistance
 - Amazon S3 for file storage
 - Amazon SQS for background processing of MQ requests
 - Amazon SES for sending emails
 
AWS Razor Rockstars
An interesting feature with AWS RazorRockstars is that all the content for the App is not contained 
within project as all its Razor Views, Markdown Content, imgs, js, css, etc. are instead being 
served directly from an S3 Bucket :)

Live Reload Demo

One nice feature of having all content maintained in an S3 Bucket is that you can just change 
files in the S3 Bucket directly and have all App Servers immediately reload the Razor Views, 
Markdown content and static resources without redeploying.

You can test live reloading of the above Service with the routes below which modify Markdown 
and Razor views with the current time:

 - /updateS3 - Update Markdown Content
 - /updateS3?razor=true - Update Razor View
 - /updateS3?razor=true&clear=true - Revert changes
 
AWS Imgur and AWS REST Files
are good examples showcasing how you can easily change which file storage backend uploaded files get 
saved to by overriding the new VirtualFiles property with your preferred file storage provider:

var s3Client = new AmazonS3Client(AwsConfig.AwsAccessKey, AwsConfig.AwsSecretKey, RegionEndpoint.USEast1);
VirtualFiles = new S3VirtualPathProvider(s3Client, AwsConfig.S3BucketName, this);

If we comment out the above configuration any saved files are instead written to the local FileSystem (default).

AWS Email Contacts
The AWS Email Contacts example shows the same long-running EmailContact Service being executed 
from both HTTP and MQ Server by just changing which url the HTML Form is posted to.

AWS Auth
AWS Auth is an example showing how easy it is to enable multiple Auth Providers within the same App and
have all User Auth info stored in DynamoDB using the new DynamoDbAuthRepository.

AWS Todos
is a good illustration of the clean and minimal code it takes to build a simple CRUD Service using the new PocoDynamo client:

public class TodoService : Service
{
    public IPocoDynamo Dynamo { get; set; }

    public object Get(Todo todo)
    {
        if (todo.Id != default(long))
            return Dynamo.GetItem<Todo>(todo.Id);

        return Dynamo.GetAll<Todo>();
    }

    public Todo Post(Todo todo)
    {
        Dynamo.PutItem(todo);
        return todo;
    }

    public Todo Put(Todo todo)
    {
        return Post(todo);
    }

    public void Delete(Todo todo)
    {
        Dynamo.DeleteItem<Todo>(todo.Id);
    }
}

AWS Getting started with Guides - https://github.com/ServiceStackApps/AwsApps
We've provided a number of guides to walk through setting up AWS services starting from your AWS account 
and connect to them with ServiceStack libs.

Mastering ServiceStack
Andreas Niedermair's (https://twitter.com/dittodhole) new book on Mastering ServiceStack is now available, check it out!
https://www.packtpub.com/application-development/mastering-servicestack

TypeScript
We've extended our existing TypeScript support for generating interface definitions for your DTO's 
with the new `ExportAsTypes=true` option for generating non-ambient concrete TypeScript Types. 

All urls returned in the default HTML5 pages are now auto-hyperlinked which we can preview in the new 
`/types` route which returns links to the different languages Add ServiceStack Reference supports:
http://techstacks.io/types

New License Key Registration option
To simplify license key registration when developing and maintaining multiple ServiceStack solutions 
we've added a new option where you can now just register your License Key once in 
`SERVICESTACK_LICENSE` Environment Variable. 

Virtual File System
There's a new read/write Virtual FileSystem interface with local FileSystem, In Memory and S3 file storage providers.

HttpResult
You can customize JSON serialization for adhoc services with the new ResultScope:

return new HttpResult(dto) {
    ResultScope = () => JsConfig.With(includeNullValues:true)
};

Which enables custom serialization behavior by performing the serialization within the custom scope, equivalent to:

using (JsConfig.With(includeNullValues:true))
{
    var customSerializedResponse = Serialize(dto);
}

 - New cookies can be added to HttpResult’s new IHttpResult.Cookies collection
 - New constructor for returning VirtualFile downloads: new HttpResult(VirtualFiles.GetFile(targetPath), asAttachment: true);
 
AutoQuery
new `%!` and `%NotEqualTo` implicit query convention available on all Auto queries:

 - /rockstars?age!=27
 - /rockstars?AgeNotEqualTo=27
 
Improved support for Xamarin.Mac
The ServiceStack.Client PCL provider for Xamarin.Mac now has an explicit reference Xamarin.Mac.dll 
which allows it to work in projects with the Link SDK Assemblies Only.

Redis
 - Behavior of `Redis.StoreAsHash` can be modified with `RedisClient.ConvertToHashFn`
 - RedisReact Browser updates https://github.com/ServiceStackApps/RedisReact#update---27-october-2015
 
OrmLite
New System Variables allow declaring column with the default value of RDBMS UTC Time:

public class Poco
{
    [Default(OrmLiteVariables.SystemUtc)]  //= {SYSTEM_UTC}
    public DateTime CreatedTimeUtc { get; set; }
}

Preview of a new parameterized SqlExpression provider that's now available for SQL Server and Oracle, opt-in with:

OrmLiteConfig.UseParameterizeSqlExpressions = true;

Johann Klemmack added support for selectively specifying which references you want to load, e.g:

var customerWithAddress = db.LoadSingleById<Customer>(customer.Id, include: new[] { "PrimaryAddress" });

//Alternative
var customerWithAddress = db.LoadSingleById<Customer>(customer.Id, include: x => new { x.PrimaryAddress });

OrmLite's T4 templates for generating POCO types from an existing database schema has improved 
support for generating stored procedures thanks to Richard Safier.

ServiceStack.Text
new ConvertTo<T> on JsonObject helps dynamically parsing JSON into typed POCO.

Minor Features
 - Server Events /event-subscribers route now returns all channel subscribers
 - PATCH method is allowed in CORS Feature by default
 - Swagger Summary for all servies under a particular route can be specified in SwaggerFeature.RouteSummary Dictionary
 - New requested FacebookAuthProvider.Fields can be customized with oauth.facebook.Fields
 - Added Swift support for TreatTypesAsStrings for returning specific .NET Types as Strings
 - New IAppSettings.GetAll() added on all AppSetting sources fetches all App config in a single call
 - ServiceStackVS updated with ATS exception for React Desktop OSX Apps
 - External NuGet packages updated to their latest stable version

Apologies for the long TL;DR - please see the https://servicestack.net/release-notes for an even longer version :)

Enjoy!

Post has shared content
I've published my first YouTube Video! Showing how you can use the new React Desktop Apps and ServiceStack Server Events to control multiple native Window Applications:

https://youtu.be/-9kVqdPbqOM

I'd normally use animated gifs for this which is embeddable in the page but none of them came out so I went with a screen capture instead. Hopefully it illustrates the potential for ServiceStack's new React Desktop Apps!

Post has shared content
v4.0.46 Released!

We have an exciting new ServiceStackVS VS.NET template this release which will add a lot of value and new possibilities for React Web Developers.

As always see the Release Notes for the full details: https://servicestack.net/release-notes

Redis Desktop Apps
React Desktop Apps is a new VS.NET Template which includes all the necessary tools to convert your React ASP.NET Web Application and package it into a native Winforms App, OSX Cocoa App or cross-platform Windows/OSX/Linux Console App which is in addition to the niceties provided by the existing React App template that includes the automated tasks to optimize, compile, bundle, package and deploy.

Since React is my weapon of choice these days this has become my new favorite template thanks to the added potential available, even if I don't end up packaging it in a Desktop App since it still provides everything I need to optimize and deploy my ASP.NET Web Apps.

React Chat Apps
We've also developed a couple of Apps ourselves to illustrate the potential.  React Chat Apps example wraps Chat into a native Desktop App and show cases how easy it is to communicate between C# <-> JavaScript where you can move around and change a Windows App by msging it from a chat box :)

Redis React
Redis React is more demonstrative of the types of Apps that's now possible from a React Desktop App which otherwise wouldn't be possible when running in a browser. Redis React should also be very useful for all ServiceStack.Redis developers which provides a simple, fast and human-friendly browser of your Redis Data which takes advantage of the conventions in the Redis Client to automatically show and navigate to related data.

Swift 2.0 / Xcode 7
Support for Apple's just released Swift 2.0 and Xcode 7 has just landed for all native iOS / OSX developers. The improvements in Swift 2.0 has had a positive impact to the Service Client which has a nicer and more familiar API with a lot less generated boilerplate required.

Java Client Improvements
A number of new features were also added to the Java Client bringing it closer to feature parity of .NET Service Clients.

HTTP Interface Markers
Request DTO's annotated with IGet, IPost, interfaces can now all use the same `send()` API which uses the info to send the Request DTO via the selected HTTP Method. This makes it easier to add high-level functionality since it can decouple the Request DTO to a specific Service Client implementation.

Async Stripe API's
Async API's are now available to all Stripe REST Services. Thanks to the StripeGateway's message-based design, this was extremely easy to add which took less than 1hr from initial feature request to deployment on MyGet pre-release packages. As it provides an abstraction for a non .NET 3rd Party API it's a good example to illustrate the advantages of a message-based API for remote services which provides a number of advantages over other much larger and more complex libraries using conventional RPC API's for each Stripe Service.

Debuggable Razor Views
There's now an option to allow debugging in Razor Views which is enabled by default in DEBUG builds.

ss-utils.js
A few new JavaScript utils were added which makes it easy to take advantage of the auto binding/validation  of FORM's outside of jQuery, e.g. in React

Enhanced Redis LUA Support
There are new API's which make it easier to execute LUA scripts on Redis Server, e.g. the high-level  ExecCachedLua() API's eliminates the bookkeeping around pre-loading, executing and re-creating missing LUA scripts which provides the best performance / bandwidth without the disadvantages of managing  server-side state in Redis. 

That's the summary of the major features, please see the Release Notes for the full details: 

https://servicestack.net/release-notes

Enjoy!

Post has shared content
v4.0.44 Released!

This release saw a lot of focus going into the Redis and OrmLite libraries. 
You can see the full release notes at: https://servicestack.net/release-notes

Redis Sentinel

We've added support for Redis's Highly Available Story for using additional Redis Sentinel processes to monitor the health of your Redis instances. The Sentinels take care of maintaining an authoritative list of available master and slave instances and will automatically failover to a replicated slave if it detects the master has failed. RedisSentinel changes how your client is configured where instead of specifying a connection string to individual master and slave instances you'd instead configure it to point to the sentinel instances which it queries to discover the available master and slave instances.

An example of the new configuration looks like:

    var sentinel = new RedisConfig("sentinel.host");
    IRedisClientsManager redisManager = sentinel.Start();

Instant Redis Sentinel Setup

To reduce the effort in setting up a multi-node Sentinel configuration we've created the https://github.com/ServiceStack/redis-config project containing the necessary configuration and start/stop scripts and binaries to instantly start a multi-node Redis configuration with 1x master, 2x slaves and 3x sentinel processes on a single Windows, OSX or Linux Server. 

Instructions for running on Windows using MS OpenTech binaries (no software install req'd):

    git clone https://github.com/ServiceStack/redis-config.git

    cd redis-config\sentinel3\windows
    start-all.cmd

You can later stop all started instances with:

    stop-all.cmd

Google Cloud Click to Deploy Redis Walkthrough

The easiest Cloud service we found that could setup a highly available Redis Sentinel configuration was Google Clouds "Click to Deploy Redis" feature which we've added a walkthrough on as well as an example of how to connect to it using the C# RedisSentienl client.

Redis Stats and Redis Config

The RedisConfig class has been expanded to give you an alternative way to change default settings whilst the RedisStats class lets you inspect the state of your running Redis Clients.

OrmLite Converters

OrmLite has become a lot more customizable and extensible thanks to the internal redesign decoupling all custom logic for handling different Field Types into individual Type Converters. This redesign makes it possible to enhance or entirely replace how .NET Types are handled, or extend OrmLite to support new Types.

The release notes contains full docs on how to Create, Extend, Replace, Resolve and Modify OrmLite Converters. New Features made possible with new Converters include:

 - Being able to swap out SQL Server TimeSpan handling to use SQL Server `TIME` Type
 - Switch to your preferred readable text-based or compact binary Guid format
 - Change how DateTime is handled to always store Dates as LocalTime or Utc

SQL Server Special Type Converters!

Converters also made it possible to add support for SQL Server-specific SqlGeography, SqlGeometry and SqlHierarchyId Types. As these types require external dependencies they were packaged in a new ServiceStack.OrmLite.SqlServer.Converters NuGet package.

New SQL Server 2012 Dialect Provider

The new `SqlServer2012Dialect.Provider` is recommended for use with SQL Server 2012 and higher in order to take advantage of features in recent versions of SQL Server, currently it uses SQL Server's new OFFSET and FETCH support to enable more efficient paged queries.

Nested Typed Sub SqlExpressions

Sql.In has been expanded to support nesting and combining of multiple Typed SQL Expressions together in a single SQL Query, e.g:

    var usaCustomerIds = db.From<Customer>(c => c.Country == "USA").Select(c => c.Id);
    var usaCustomerOrders = db.Select(db.From<Order>()
        .Where(q => Sql.In(q.CustomerId, usaCustomerIds)));

Updated Dependencies

OrmLite includes the latest version of Dapper including Async API support in .NET 4.5 builds. All external RDBMS dependencies have also been upgraded to use the latest stable version available.

Encrypted Messaging

The authenticity of Encrypted Messages are now being verified with HMAC SHA-256, following an Encrypt-then-MAC strategy. 

The EncryptedMessagingFeature also added support for versioning multiple Private Keys allowing seamless 
transition to a new Private Key without affecting existing clients who have yet to adopt the latest Public Key. 

Swagger UI

 - The backend metadata for Swagger UI has been updated to Swagger 1.2 spec.
 - Username and Password added on Swagger UI to enable access to protected services (requires BasicAuth)

Auth Info Metadata Pages

The metadata pages now label which Services require Authentication, along with any Roles/Permission they need (if any).

Java Client

The net.servicestack:client Java package includes core functional utils required to run C#'s 101 LINQ Samples in Java: https://github.com/mythz/java-linq-examples

Service Clients

All .NET Service Clients (inc JsonHttpClient) can now be used to send raw `string`, `byte[]` or `Stream` Request bodies in their custom Sync or Async API's, e.g:
 
    string json = "{\"Key\":1}";
    client.Post<SendRawResponse>("/sendraw", json);

    byte[] bytes = json.ToUtf8Bytes();
    client.Put<SendRawResponse>("/sendraw", bytes);

    Stream stream = new MemoryStream(bytes);
    await client.PostAsync<SendRawResponse>("/sendraw", stream);

Authentication

 - A new community Azure Active Directory Auth Provider is available at https://github.com/jfoshee/ServiceStack.Authentication.Aad  - MaxLoginAttempts option moved to AuthFeature and is supported in all User Auth Repositories
 - AuthFeature now regenerates new Session Cookies each time users login, can be disabled

Error Handling

 - New IHasStatusCode can be implemented by C# Exceptions to provide an alternative way to return HTTP Error Codes
 - Meta Dictionary added on ResponseStatus and ResponseError DTO's providing a place holder for additional context
 
ServiceStack.Text

The new `ToObjectDictionary()` and `FromObjectDictionary()` extension methods lets you treat POCO's like Data, e.g:

    var dto = new User
    {
        FirstName = "First",
        LastName = "Last",
        Car = new Car { Age = 10, Name = "ZCar" },
    };

    Dictionary<string,object> map = dtoUser.ToObjectDictionary();

    User user = (User)map.FromObjectDictionary(typeof(User));

These were the highlights, there's more features and the full details in the release notes: 
https://servicestack.net/release-notes

Enjoy!

Post has attachment
A comparison and overview of my experiences integrating with some of the major IDEs.

Post has shared content
The West African Black Rhino has been officially declared extinct. It was hunted for its horn. Shame on our species. 
Photo

Post has shared content
AutoQuery Viewer Released!

Hi everyone, just a quick note to announce that our new AutoQuery Viewer iPad app is now available for free download on the AppStore :) https://github.com/ServiceStackApps/AutoQueryViewer

AutoQuery Viewer lets you query your AutoQuery Services from a native iPad App. It's also highly customizable so you can tailor it to provide a unique experience for your Services.

Full details of the customization available and examples are available in the GitHub project repo: 
https://github.com/ServiceStackApps/AutoQueryViewer

Feedback is Welcome!
Wait while more posts are being loaded