background preloader

.Net

Facebook Twitter

Aurelia + VS2015: Next Gen JS Framework in ASP.NET 5 - Magenic’s blog brings ideas from the technology industries thought leaders. A New Client Side JavaScript Framework… "_______ is the best framework! " Fill in the blank. New options arrive almost daily. With the momentum behind Angular, maybe it's not so hard to fill in that blank. Rob Eisenberg has a number of frameworks under his belt. Why leave? "All about Angular 2.0" explains his take on the Angular 2.0 rewrite strategy. What is Aurelia Aurelia is: A front-end JavaScript MV* frameworkModern and modularTomorrow's JavaScript (ES6)Usable in today's browsers with Babel2-way bindableTestableSupported with long-term visionBuilt by a sizable team of rock stars Jump to for a great intro. Why do I care? With so much goodness in Aurelia, it is hard to pick any one thing. Modularity and conventions are common in Rob's arsenal. 2-way databinding is a beautiful thing. Syntax can make life beautiful or brutal.

Learning curve can be a factor in some frameworks. Need more convincing? Aurelia plus Visual Studio 2015 and ASP.NET 5 Step 1 - Pre-requisites node.js & npm.

Auth

SignalR. RavenDB and the Repository pattern | Novus Craft. I recently had a short email exchange with Ayende Rahien and he suggested something I hadn't considered before: not using a Repository pattern. Background Allow me to elaborate. Before trying RavenDB, I was frequently dealing with data APIs that necessitated use of the Repository pattern (or at least some pattern of abstraction): Legacy APIs: legacy APIs often expose data in a format very different to your domain model.

Translation of legacy data model to domain model should occur in one place and one place only Web services: a lot commercial web services are an absolute mess and you want to avoid exposing them to the rest of the application as much as possible Sitecore Data API: majority of CRUD and field access operations involve magic strings and you don't want those dotted all over your application Reasons for using layers of abstraction boil down to: I was so used to dealing with these issues that trying to shoehorn RavenDB into a repository just seemed natural. Here is an example.

Infrastructure

The Onion Architecture : part 1 : Jeffrey Palermo (.com) This is part 1. part 2. part 3. part 4. My feed (rss). I've spoken several times about a specific type of architecture I call "Onion Architecture". I've found that it leads to more maintainable applications since it emphasizes separation of concerns throughout the system. I must set the context for the use of this architecture before proceeding.

This architecture is not appropriate for small websites. It is appropriate for long-lived business applications as well as applications with complex behavior. It emphasizes the use of interfaces for behavior contracts, and it forces the externalization of infrastructure. The diagram you see here is a representation of traditional layered architecture. The biggest offender (and most common) is the coupling of UI and business logic to data access. I propose a new approach to architecture. The diagram to the left depicts the Onion Architecture. The Onion Architecture relies heavily on the Dependency Inversion principle.

Security

Progressive enhancement in MVC 3 with the help of custom ActionResults. Architecture. Taking the Single Responsibility Principle Seriously - C# tutorial. Among these principles, one seems very simple but is hard to get right (as Robert C. Martin puts it). It’s the first principle of SOLID and also one of the oldest principles of software development: the Single Responsibility Principle (SRP). This article starts with a more detailed and more general definition of the Single Responsibility Principle continues with a simple approach to spot and contain typical responsibilities of different grain size, and finally looks under the surface of the very paradigm used to implement typical aspects to reveal even more responsibilities to separate. Defining the SRP for Purpose Wikipedia defines the SRP like this: “[T]he single responsibility principle states that every object should have a single responsibility, and that responsibility should be entirely encapsulated by the class. All its services should be narrowly aligned with that responsibility.”

Unfortunately this is not a very helpful explanation. Typical Aspects Figure 1 Figure 2 Subtle Aspects.

Tests

James Broome Blog : Asp.Net MVC Controllers + BDD = The perfect match? [Part #1: The HomeController] This is part 1 in a series of posts on using Behaviour Driven Development to build and test your MVC controllers. The full series is as follows: Behaviour Driven Development/Design has been gaining a lot of traction recently amongst the community and whilst not everyone may be using it in anger to write code and deliver projects, most people should have a fair idea of what it is all about by now. I’ve been talking about it for a while, since I attended JP Boodhoo’s Nothin But .Net course over a year ago, where I was exposed to BDD for the first time. For the last 6 months or so, I’ve been Dev Lead on a greenfield e-commerce application, using Asp.Net MVC, Sharp Archictecture, N2 CMS, NHibernate, Spark View Engine, Post Sharp and a whole host of other cool stuff. BDD has a real sweet spot when it’s used to describe high level, user story-like business specifications.

With MVC, this can be used to great effect when building out the controllers layer of your application. Pre-Requisites 01. Project Directory. ASP.NET WebSocket & Comet Ajax Library (Reverse Ajax - Server Push) - Home.

Patterns

Using Node.js in an ASP.NET MVC application with iisnode - Jon Galloway. Using Node.js in an ASP.NET MVC application with iisnode Node.js is an event-driven I/O server-side JavaScript environment based on the open-source V8 Javascript engine. It's really easy to run it on Windows now, and if you run it under iisnode, it's actually running under a standard IIS Handler, which means you can integrate it directly into ASP.NET applications. Node event-driven model is really interesting. There's been a lot of discussion on it lately; it's neither a cancer nor the cure for cancer, but it makes it easier to handle scaling in the small.

While you can handle asynchrony in most web frameworks, it's a fundamental part of Node. There's plenty of information out there on what Node is and how it's used, so I'm going to skip over that and reference a few good introductory posts: Some background: Herding Code podcasts, early experiments Our first Node show (Herding Code 102, Jan 2011) was with Tim Caswell, who runs the How To Node community blog site. The Windows port and libuv. Open source .NET and Mono web services framework.