I feel I was drifting a bit too much towards non-technical aspects of my work in previous posts. Today, I bring you something definitely more tekky - selection of few interesting libraries you could use on your projects.
FluentSecurity for ASP.NET MVC
It’s no secret - in past few weeks I’m doing some PoC stuff in ASP.NET MVC3. And honestly, the more I use it, the more I like it. It’s easy, it’s light and it’s very clean as well. Thanks to EF 4.2 Code First and WCF RIA Services, development is light-speed fast. Fortunately I can use Telerik MVC Extensions for presentation layer, so I don’t have to mess much with HTML / CSS (hooray!). One of the things I didn’t really like in ASP.NET MVC3 so far was security model - fortunately, there’s a solution for that: FluentSecurity!
- It’s very handy - due to fluent syntax (IntelliSense for the win!)
- As it doesn’t rely on attributes, you can gather all of your authorization logic in one place (some may not like it…)
- You can create your own policies (so you don’t have to rely on 4 default ones: DenyAnonymous, DenyAuthenticated, RequireRole, Ignore
- It has a helper for unit testing the security in ASP.NET MVC
Definitely worth looking at.
I’m sure you all have been through that zillion times - you want to implement a process with distinguished steps, but:
- you ain’t gonna use WF3.5 because it’s truly abysmal
- WF4 is no go, as it doesn’t support state machine (at least it DIDN’T)
- .NET 4 Platform Update 1 is too fresh and unproven to use (so is state machine it contains)
So you finally end with your own, custom implementation of workflow state machine. You didn’t plan doing that, so it’s created in a rush, without serious unit testing and not tested at all against thread-safety. I have some good news for you - there’s a library you can use: Stateless.
It’s mature, flexible and supports fluent syntax (so you can define your workflows directly in code). It has two minor drawbacks:
- You have to support workflow persistence on your own. Stateless provides you all the necessary hooks, but there’s no default implementation of workflow read / write.
- Project was not updated since 2010 and I wouldn’t expect it updated in near future.
T4 is yummie. Period. For those who haven’t heard about it - awesome post by Scott Hanselman: http://www.hanselman.com/blog/T4TextTemplateTransformationToolkitCodeGenerationBestKeptVisualStudioSecret.aspx
It’s awesome when you make machine to write your code for you (especially your unit tests!). Unfortunately, T4 is not available for those who are stuck (for any reasons) with Visual Studio 2008 and .NET 3.5. If you’re in that sad group, dotLiquid may cheer you up. It’s an easy to use templating solution for .NET developers. Unfortunately (and unsurprisingly) syntax is not compatible with T4, so you can forget about smooth transition for T4 under Visual Studio 2010 (or above).
Quite likely, HTML5 is a future of client technologies. KendoUI is HTML5 by Telerik - I won’t write any single word more. Just check the demos at http://demos.kendoui.com/web/overview/index.html. Eye candy!