thangchung
Name: thangchung
Score: 330.06
Last Seen: 644 days, 8 hours, 10 minutes ago
Member Since: 26 July, 2010
DotNetShoutout
atom rss
4
Shouts

BDD with Specflow, Moq and Microsoft Unit Testing framework - Context is King

published 642 days, 36 minutes ago posted by thangchungthangchung 644 days, 8 hours, 10 minutes ago
Thursday, August 18, 2011 1:47:48 AM GMT Monday, August 15, 2011 6:13:44 PM GMT
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 o... (more)
category: Architecture | clicked: 37 | comment | | source: weblogs.asp.net
tags: Specflow, Moq, BDD
2
Shouts

WCF Web API with Web Activator package - Context is King

published 663 days, 4 hours, 34 minutes ago posted by thangchungthangchung 663 days, 9 hours, 2 minutes ago
Wednesday, July 27, 2011 9:50:10 PM GMT Wednesday, July 27, 2011 5:22:05 PM GMT
In these days, I had read some blogs and a lot of post in internet about WCF Web API. And I also have curious about it.  It is not new technology. And after I watched some postcast. I recognize it is a good one that I must to researching. RESTfull is a hot topic and have a lot of argues these days. WCF Web API is built on top of WCF service. How does it good? (more)
category: Architecture | clicked: 19 | 1 comment | | source: weblogs.asp.net
tags: .NET, WCF 4.0
4
Shouts

Razor Themed View Engine for multi-themes site - Context is King

posted by thangchungthangchung 711 days, 8 hours, 23 minutes ago
Thursday, June 09, 2011 6:00:52 PM GMT
Have you ever implemented a multi-themes site using Razor view engine? Yes it is really good to do that. Specially, you can do it and make it work well with Razor. I spent a lot of time to investigate this problem. After searched on Google, I had found some of links very useful about this topic. But all of them also implemented in ASP.NET MVC 2.0 and custom a WebformViewEngine. So I know I must work with it from scratch. But no problem, I decided to... (more)
category: Web Dev | clicked: 10 | comment | | source: weblogs.asp.net
tags: Razor
3
Shouts

dynamic, Why not? - Context is King

published 718 days, 20 hours, 33 minutes ago posted by thangchungthangchung 719 days, 12 hours, 2 minutes ago
Thursday, June 02, 2011 5:51:24 AM GMT Wednesday, June 01, 2011 2:21:41 PM GMT
In these days, people begin to expertise some new features in .NET 4.0. And I am same to them as well. One of features I like and write to this post is dynamic keyword. It is not new, at least in PHP, Python, Ruby... But in .NET world, I think it is new and ship to .NET 4.0 as a default. And some of projects are ported to .NET based on DLR as IronPython, IronRuby. We can use dynamic keyword in anywhere in our project. How do you think about it? So dynamite, isn’t it? :D. Some of people are didn’t like it... (more)
category: Architecture | clicked: 26 | 1 comment | | source: weblogs.asp.net
tags: ASP.NET MVC 2.0, dynamic keyword
4
Shouts

Fluent Interface for WebRequest class - Context is King

published 731 days, 21 hours, 22 minutes ago posted by thangchungthangchung 734 days, 3 hours, 45 minutes ago
Friday, May 20, 2011 5:02:03 AM GMT Tuesday, May 17, 2011 10:39:10 PM GMT
In past, I usually used WebRequest for request some data from remote host. I also used it for request JSON data from Google APIs, some RSS, ATOM data from a few hosts. Everything is good for me. I only put some codes like this: var buffer = Encoding.ASCII.GetBytes("q=Queen Elizabeth II&video=on&audio=on&text=on");             var webReq = (HttpWebRequest)WebRequest.Create("http://www.bbc.co.uk/search/news/");     ... (more)
category: Architecture | clicked: 2 | comment | | source: weblogs.asp.net
tags: .NET, Fluent Interface
8
Shouts

Clean and clear configuration with StructureMap - Context is King

published 842 days, 9 hours, 28 minutes ago posted by thangchungthangchung 845 days, 7 hours, 51 minutes ago
Saturday, January 29, 2011 4:56:16 PM GMT Wednesday, January 26, 2011 6:32:44 PM GMT
Today, I will continue to sharing some knowledge that I know about StructureMap on Multi-layers application. So I think everyone also know about Multi-layers application, in past we often used the 3 layers (Presentation, Business Logic and Data Access), but by the time maybe we had more than 3 layers as well. In past, when I used Spring.NET framework for IoC container, I must make many configuration in XML file (who knew about XML hell???), it is ... (more)
category: Architecture | clicked: 11 | comment | | source: weblogs.asp.net
tags: StructureMap
5
Shouts

AOP with StructureMap Container - Context is King

published 845 days, 7 hours, 2 minutes ago posted by thangchungthangchung 846 days, 10 hours, 8 minutes ago
Wednesday, January 26, 2011 7:22:06 PM GMT Tuesday, January 25, 2011 4:16:21 PM GMT
Source code for this post can be found in my git. The first thing I want to say is what is a AOP? So we need to know about the definition of it, yes starting now. Aspect Oriented Programming (AOP) was originally developed in the late 1980’s at the Xerox Palo Alto Research Center (PARC). All software that is developed has concerns. A concern is a goal, concept or area of interest. In most software there are two types of concerns, core concerns and system level concerns. Previous development meth... (more)
category: Architecture | clicked: 3 | comment | | source: weblogs.asp.net
tags: StructureMap
4
Shouts

A first look at ConfORM - Part 2 - Context is King

published 848 days, 13 hours, 40 minutes ago posted by thangchungthangchung 850 days, 8 hours, 57 minutes ago
Sunday, January 23, 2011 12:43:41 PM GMT Friday, January 21, 2011 5:27:05 PM GMT
Today I will continue writing about ConfORM.  I've said in the previous parts of ConfORM and the advantages of it. This part I will only concentrate on how to build a multiple session factory for ConfORM (also known as multiple database). I get my ideas mainly from Sharp Architecture. First of all, why we need multiple Session Factory? If anyone knows about NHibernate knows that build a Session Factory is very expensive. As it will be a lot o... (more)
category: Architecture | clicked: 0 | comment | | source: weblogs.asp.net
3
Shouts

A first look at ConfORM - Part 1 - Context is King

published 862 days, 12 hours, 9 minutes ago posted by thangchungthangchung 863 days, 5 hours, 29 minutes ago
Sunday, January 09, 2011 2:14:59 PM GMT Saturday, January 08, 2011 8:54:51 PM GMT
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 DentlerNHibernate 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 hav... (more)
category: Architecture | clicked: 0 | comment | | source: weblogs.asp.net
4
Shouts

Generating Report for NUnit

published 883 days, 14 hours, 38 minutes ago posted by thangchungthangchung 885 days, 11 hours, 50 minutes ago
Sunday, December 19, 2010 11:45:47 AM GMT Friday, December 17, 2010 2:34:23 PM GMT
Time ago, I received a request that people ask me how they can generate reports of the results of testing using NUnit? In fact, I may never do this. In the little world of my programming, I only care about the test results, red-green-refactoring, and that was it. When I got that question quite a bit unexpected, I knew that I could use NCover to generate reports, but reports of NCover too simple, it did not give us more details on the number of ... (more)
category: How To | clicked: 0 | comment | | source: weblogs.asp.net
tags: build tool, unit testing
3
Shouts

DRY with Lambda Expression (errors management) - Context is King

published 912 days, 23 hours, 56 minutes ago posted by thangchungthangchung 913 days, 10 hours, 14 minutes ago
Saturday, November 20, 2010 2:28:02 AM GMT Friday, November 19, 2010 4:09:58 PM GMT
Some technical that make your code is easy to manage and maintain. (more)
category: Architecture | clicked: 0 | comment | | source: weblogs.asp.net
tags: .NET, C#, AOP, Patterns, lambda expression
3
Shouts

DateTime formatting extension method - Context is King

published 930 days, 6 hours, 46 minutes ago posted by thangchungthangchung 931 days, 14 hours, 40 minutes ago
Tuesday, November 02, 2010 7:38:27 PM GMT Monday, November 01, 2010 11:44:28 AM GMT
Notes: I also updated the pieces of code at http://www.extensionmethod.net/Details.aspx?ID=393 In current project, I get some troubles in DateTime class, about format the date time object with the pattern specific string and the current culture, so I decide to code some extension methods in DataTime class in .NET library. And I think it’s it very useful if somebody can use it as right way. I take some idea from this link and coding the enum class for its. After that I also used the Lambda Expression for... (more)
category: Web Dev | clicked: 0 | comment | | source: weblogs.asp.net
tags: enum, .NET, Extension Methods
6
Shouts

NHibernate 3 and Autofac, can go together? (part 2) - Context is King

published 953 days, 12 hours, 53 minutes ago posted by thangchungthangchung 957 days, 9 hours, 43 minutes ago
Sunday, October 10, 2010 1:30:39 PM GMT Wednesday, October 06, 2010 4:41:28 PM GMT
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. All source code are placed in my github at hereIntroduce about Autofac Autofac is an IoC container for Microsoft .NET. It manages the dependencies between classes so that... (more)
category: Architecture | clicked: 3 | comment | | source: weblogs.asp.net
tags: .NET, ASP.NET
8
Shouts

NHibernate 3 and Autofac, can go together? (part 1) - Context is King

published 955 days, 8 hours, 21 minutes ago posted by thangchungthangchung 958 days, 18 hours, 16 minutes ago
Friday, October 08, 2010 6:03:29 PM GMT Tuesday, October 05, 2010 8:07:44 AM GMT
In this post, I intend to explain about NHibernate and integrated it with Autofac. And some content that I will write as: NHibernateIntroduce about NHibernate 3Fluent NHibernate and its conventionsRelationship Mapping (1-1, 1-, *-), value objectDomain first, build entity, mapping classes, auto generated database schemaAutofacIntroduce about AutofacInversion of Control (IoC)AOP (Interceptor)Module (separated of concern: SoC)Intergrated NHibernate into AutofacRegister essential components of NHibernate ... (more)
category: Architecture | clicked: 2 | comment | | source: weblogs.asp.net
5
Shouts

Google API for .NET architecture (Part 3) - Context is King

published 969 days, 18 hours, 29 minutes ago posted by thangchungthangchung 972 days, 19 hours, 30 minutes ago
Friday, September 24, 2010 7:54:58 AM GMT Tuesday, September 21, 2010 6:54:11 AM GMT
Part 1: Google API for .NET architecture (Part 1)Part 2: Google API for .NET architecture (Part 2) Today, I will describe a little about Gapi4net architecture. Next, I will write 2 examples, one in ASP.NET MVC 3 Preview 1, and one in WPF. Gapi4net did not have persistence layer, it only call some of services from Google and processing returned JSON data. For clearly, I have drawn a Gapi4net architecture as below:   And the solution structure is   As you see, it is really simple, only get data ... (more)
category: Web Dev | clicked: 0 | comment | | source: weblogs.asp.net
4
Shouts

Google API for .NET architecture (Part 2) - Context is King

published 977 days, 11 hours, 4 minutes ago posted by thangchungthangchung 978 days, 9 hours, 17 minutes ago
Thursday, September 16, 2010 3:19:55 PM GMT Wednesday, September 15, 2010 5:06:42 PM GMT
Part 1:Google API for .NET architecture (Part 1)  Today is Harvey Nash - 10 years in Viet Nam celebration day. I very happy about that, and I also drunk some beer, so I have been eager to write this post. In last post, I had been analyze about Domain Model of Gapi4net, some of people maybe like it. That is a reason I write this post in next. And what will I write in this post? As you knew in last post, I will be analyze about some technical I used in Gapi4net. Three of techniques that I will present is ... (more)
category: Web Dev | clicked: 0 | comment | | source: weblogs.asp.net
5
Shouts

Google API for .NET architecture (Part 1) - Context is King

posted by thangchungthangchung 981 days, 8 hours, 4 minutes ago
Sunday, September 12, 2010 6:20:01 PM GMT
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: GwebSearchClient cl... (more)
category: Web Dev | clicked: 1 | comment | | source: weblogs.asp.net
7
Shouts

Customizing the Converter for Json.NET - Context is King

published 997 days, 10 hours, 4 minutes ago posted by thangchungthangchung 998 days, 22 hours, 11 minutes ago
Friday, August 27, 2010 4:19:51 PM GMT Thursday, August 26, 2010 4:12:36 AM GMT
Many recently days, I thought about Json.net library that implemented by James. It is really a good library that I have ever used. I really impressed about many Converters that this library expose for user. I can list some converter of json.net at here: BinaryConverter BsonObjectIdConverter DataSetConverter DataTableConverter EntityKeyMemberConverter HtmlColorConverter IsoDateTimeConverter JavaScriptDateTimeConverter KeyValuePairConverter RegexConverter StringEnumConver... (more)
category: Web Dev | clicked: 1 | comment | | source: weblogs.asp.net
2
Shouts

Unit testing for a project that some classes inside it is marked with internal keyword - Context is King

published 1007 days, 10 hours, 2 minutes ago posted by thangchungthangchung 1007 days, 15 hours, 5 minutes ago
Tuesday, August 17, 2010 4:21:41 PM GMT Tuesday, August 17, 2010 11:18:54 AM GMT
Have you ever written a component that used for a other solution? This is meaning you write a component (for example, a third party, a extensions,...). So we usually use the "internal" keyword inside all classes in your component. Is it right?  And as you know if you use the "internal" keyword, you will not access from outside. Now I assume that you have a testing project out side the component project. How can you access to the internal classes inside your component project? If you try access to this co... (more)
category: Web Dev | clicked: 0 | comment | | source: weblogs.asp.net
6
Shouts

Integrated StructureMap container for the MvcServiceLocator in ASP.NET MVC 3 - Context is King

posted by thangchungthangchung 1026 days, 20 hours, 51 minutes ago
Thursday, July 29, 2010 5:33:28 AM GMT
ASP.NET MVC 3 just released a few days ago. In this release, Microsoft team published some features very cool. I really love that, because we shall code easier. See release note for more information. And in this post, I would like to explore about MvcServiceLocator, one of features very interesting in this release. So why I want to know about that? Because in the past project in codeplex http://nma.codeplex.com, I used to CommonServiceLocator from Microsoft, and I must to customize it for integrated with... (more)
category: Web Dev | clicked: 3 | comment | | source: weblogs.asp.net