OpenRasta status update

This entry may be outdated. For the latest updates on openrasta, see www.openrasta.com.

Already a month since the last updates, and I’ve been churning quite a bit of code. Most of it has been to finish extending the support for multipart types, which was blocking a couple of scenarios (html file upload and silverlight bidirectional http being the two main ones).

Infrastructure

  • OpenRastaHandler is now a handler factory.
  • Added a logging infrastructure and some initial instrumentation of the code.
  • All the ambient data is now cleanly separated and requires an IContextStore (Think HttpContext.Current.Items)

IO

  • I thought I’d push the sub-stream implementation to later, but it is now done. Only one stream of a request exists, and when using a multipart encoding, a sub-stream will be created that lets you read within a multipart boundary transparently. This enables quite amazing scenarios.
  • StreamWriter is a bad boy, it closes a stream automatically when disposed. Added a DeterministicStreamWriter that lets you control the behavior of the stream on close.

Dependency Injection

  • Not much there, code has been expanded a bit to resolve properties too.

Html Forms

  • Support is now complete and stable.

Multipart support

  • This baby took much longer than I thought, but it has incredible powers. Multiparts as used in html forms are now fully supported, including files etc.
  • Codecs are recursive. That means each part in a multipart can itself be parsed by another codec. Think passing around form data, xml and binary all in one go, without coding involved.
  • Quoted-printable and base64 encodings in form names are also supported.

Complex-type construction

  • The default type construction algorithm used for both mutlipart/form-data and aplication/x-www-url-formencoded now supports both type strings and variable names. That means that for OperationResult Post(Customer c), you can now use c.FirstName or Customer.FirstName as the field-name, as well as using only the property name (aka firstname).
  • TODO: Sadly some of the code is still not shared between those two codecs, this is the next refactoring. Need to find a clean model to extract all this stuff into. Expect to see a lot of this code extracted in parameter binders, and an extension for codecs providing key/value pairs.  [Update: Done]

Markup

  • There’s new code for markup generation. The infrastructure is all based on chained extension methods for configuration, giving a nice fluent-like taste (except for the form tag, but can’t do anything about that).

Misc

  • Code coverage is slowly reaching 80%, but there’s still a lot of tests to write around error conditions.
  • There are some namespaces at 100%, which helped fix a bunch of errors in the internal dependency resolver.
  • More renames (MediaType has taken over from Content-Type nearly everywhere) and namespace reshuffling.

The code is getting more and more stable. Now I just need more testers and more people using OpenRasta. That, and a logo. And tutorials. And screencasts. Etc.

Ads

Comment