Contents tagged with Pattern
-
Customize the SimpleMembership in ASP.NET MVC 4.0
As we know, .NET 4.5 have come up to us, and come along with a lot of new interesting features as well. Visual Studio 2012 was also introduced some days ago. They made us feel very happy with cool improvement along with us. Performance when loading code editor is very good at the moment (immediate after click on the solution). I explore some of cool features at these days. Some of them like Json.NET integrated in ASP.NET MVC 4.0, improvement on asynchronous action, new lightweight theme on Visual Studio, supporting very good on mobile development, improvement on authentication…
-
BDD with Specflow, Moq and Microsoft Unit Testing framework
BDD (Behavior Driven Development) is very popular in these days. I know a lot of companies used BDD in our projects. So I also had some curios about it and I applied for my current project. I used Specflow, Moq and Microsoft Testing framework for working. I did it and found out some things very interested in. In this post I will not focus on what it BDD? What is Mock, stub or how to write a unit testing? Readers can easy find on internet, just googling it and everything will be okay. I just focus on the some best things I found when I implemented the BDD on my code. I used AAA (Arrange-Act-Assert) and GWT (Given-When-Then) patterns in my code. They are clearly and easily to understand and become standard when you write unit testing and mocking.
-
Fluent Interface for WebRequest class
All source codes can be found as http://fluentwebrequest.codeplex.com..
-
A first look at ConfORM - Part 2
-
A first look at ConfORM - Part 1
All source codes for this post can be found at here.
Have you ever heard of ConfORM is not? I have read it three months ago when I wrote an post about NHibernate and Autofac. At that time, this project really has just started and still in beta version, so I still do not really care much. But recently when reading a book by Jason Dentler NHibernate 3.0 Cookbook, I started to pay attention to it. Author have mentioned quite a lot of OSS in his book. And now again I have reviewed ConfORM once again. I have been involved in ConfORM development group on google and read some articles about it. Fabio Maulo spent a lot of work for the OSS, and I hope it will adapt a great way for NHibernate (because he contributed to NHibernate that). -
NHibernate 3 and Autofac, can go together? (part 2)
In part 1, I introduced about NHibernate and domain model for News Management System. And today, I will continue to show you about Autofac and how to make Autofac can understand all core instances of NHIbernate. If you do not read part 1, please read it at here. The time went very quickly, so we will start jumping into Autofac now.
-
NHibernate 3 and Autofac, can go together? (part 1)
In this post, I intend to explain about NHibernate and integrated it with Autofac. And some content that I will write as:
-
Google API for .NET architecture (Part 2)
-
Google API for .NET architecture (Part 1)
Today, I have just released a OSS with named is Gapi4net library at codeplex. This is a wrapper some of API's Google for search Web, Local, Video, Blog, News, Book, Image, Patent and language translation. In the past, I also saw some wrapper for Google API, specially are a google-api-for-dotnet, gapidotnet. But as I realized that they are hard to using and when you used them, you must remember many input parameters. For example, if you use the google-api-for-dotnet, you must input as:
-
The short example about EF4 CTP4 using DataAnnotation configuration
In the last post at here, here and here, I wrote about EF4 (Entity Framework 4) with code-first approaching. In 3 parts, I used the configuration class for mapping with database (this feature is like Fluent NHibernate). But in the CTP4, we also use the DataAnnotation (new feature in .NET 4) for mapping with database. If we use the DataAnnotation, we shall be easy to mapping with much Convention over Configuration rules. You can go to this link for read all convention’s EF4 CTP. As Andrew suggest me, the example for mapping of my last post is very simple and did not have complex. So I downloaded the Northwind database from Microsoft and implemented in this post. Why do we use the DataAnnotation? As you know, Microsoft integrated it into .NET 4, and now they used it in all new technology, such as Silverlight, WPF, ASP.NET MVC… And in the future I think it will become popularly. And we shall be familiar with it, use it easily. In this post, I will explorer about mapping use the DataAnnotation, and some convention in relationship for ORM mapping.