December 2010
89 posts
SO BAD
Very upset, very unhappy, feel bad bad bad…… disappointed… This day I feel so failed…
Dec 29th
GC.SuppressFinalize Method (System) →
Dec 28th
6 tags
Auto Simple Id Generator for Entity Without Using...
Important : This code should be used for testing/development environment only (not in production). Task : Want the way to generate Id for testing Save(T entity) where T is any kind of entity class that contains Id field without having to use common interface. If you have Save method like this one (may be in the in-memory repository used for testing/mocking) IDictionary<long, object>...
Dec 27th
NHibernate: Generate a business key - Stack... →
Dec 27th
3 tags
Explicit vs Implicit Interface Implementations
1) A class that implements an interface can explicitly implement a member of that interface. When a member is explicitly implemented, it cannot be accessed through a class instance, but only through an instance of the interface. class Box : IDimensions  {..} Box.Length;  //error IDimensions .Length;   //ok 2) Explicit impl allows the programmer to inherit two interfaces that share the...
Dec 27th
3 tags
Why use Object Mapping?
Mapping can occur in many places in an application, but mostly in the boundaries between layers, such as between the UI/Domain layers, or Service/Domain layers. Concerns of one layer often conflict with concerns in another, so object-object mapping leads to segregated models, where concerns for each layer can affect only types in that layer.
Dec 27th
19 of the Best Infographics from 2010 →
Dec 27th
AutoMapper →
Dec 27th
Answer: This code should never hit production →
Dec 26th
DWBP15: On OAuth 2.0 :: Data Without Borders →
Dec 24th
1 tag
ODBC definition
Open Database Connectivity (ODBC) provides a standard software interface for accessing database management systems (DBMS). The designers of ODBC aimed to make it independent of programming languages, database systems, and operating systems. Thus, any application can use ODBC to query data from a database, regardless of the platform it is on or DBMS it uses. ODBC accomplishes this by using a driver...
Dec 23rd
The 101 Most Useful Websites on the Internet →
Dec 23rd
2 tags
WatchWatch
วีดีโอ โดราเอม่อน ตอนนี้ดีนะ แฝงไปด้วยแง่คิดสำคัญ :D
Dec 23rd
Dec 23rd
ScienceFiction.com Science Fiction →
Dec 23rd
C# Tutorial: 10 tricks that will make your jQuery... →
Dec 22nd
Challenge: This code should never hit production →
Dec 22nd
Integrating JavaScript Unit Tests with Visual... →
Dec 21st
2 tags
Theme Tumblr งามๆ
http://safe.tumblr.com/theme/preview/8758 http://obox-antiquity.tumblr.com/
Dec 21st
1 note
10 Ways Social Media Will Change in 2011 →
Dec 18th
Dec 17th
3 tags
Quick Web Request Error Check
Easy to check Web Request logs via this path. It shows the request url and status code: C:\WINDOWS\system32\Logfiles
Dec 17th
6 tags
NHibernate 2nd level Caching Options and Tips
2 steps of setting up caching: 1) Choose your Cache Concurrency Strategies 2) Choose your Cache Provider 1) Concurrency strategies define the transaction isolation. It’s like the mediator that handles cache storing and retrieving. There’re 3 types:     1.1) Read-write strategy maintains “read-committed” isolation by using Timestamp mechanism. So, select this choice if...
Dec 17th
1 tag
Religion
มีศาสนาแล้ว! หลังจากที่ผมไร้ศาสนามานานหลายปี ในที่สุดก็เจอสิ่งที่ใช้ สำหรับการยึดเหนี่ยวเหมือนคนอื่นบ้างซักที อ่านแล้วผมรู้สึกว่าตรง.. : http://en.wikipedia.org/wiki/Secular_humanism ทุกศาสนาล้วนต้องการให้คนยึดถือและปฏิบัติในสิ่งที่ดีครับ ไม่ว่าคุณจะศาสนาอะไร นั่นก็คือสิ่งที่คุณเลือกแล้วว่าดี และยอมยึดถือปฏิบัติตาม ไม่ใช่เอาแต่นับถือตามๆกันไปแล้วละเลย
Dec 17th
1 note
3 tags
ACID on Transaction
Transaction must guarantee ACID Behavior: - Atomic : A unit of work of steps that if one step fails, the whole unit of work will fail or pass if all steps passed. - Consistency : Any transaction works with a consistent set of data and leaves the data in a consistent state when the transaction completes. - Isolation : Allow multiple users to work concurrently with the same data...
Dec 15th
1 note
Safe Factory Pattern - private instance state in... →
Dec 15th
MyCache : Distributed caching engine for Asp.net... →
Dec 15th
Transactions in REST? - Stack Overflow →
Dec 15th
2 tags
Further thought on distributed transaction in REST
HTTP doesn’t have built-in transaction protocol. But we can treat the “transaction” as a resource. - Create new transaction => POST - Retrieve transaction(s) => GET - Rollback => DELETE - Commit => PUT
Dec 15th
5 tags
WS-Security over SSL
WS-Security provides the same features that SSL does for HTTP. But what WS-Security has adventages over SSL (might be used as checklist whether to implement WS-Security or SSL): Capability of dealing with multiple intermediaries and multiple transport. Federated security **
Dec 15th
Implementing WS-Security →
Dec 15th
3 tags
Nice Example of Federated Identity
Federated identity has two general meanings: The virtual reunion, or assembled identity, of a person’s user information (or principal), stored across multiple distinct identity management systems. Data are joined together by use of the common token, usually the user name. A user’s authentication process across multiple IT systems or even organizations. For example, a traveler could...
Dec 15th
Secure Web Services: REST over HTTPS vs SOAP +... →
Dec 15th
5 tags
Nice thought on the combination of WS-* (with...
“I saw an interesting mix the other day. A large, F500 customer of ours is using a mix of REST and SOAP (REST for read-only data access, SOAP for the rest) and in order to avoid using different security schemes has decided to use WS-Sec for both. They are doing this by putting the WS-Sec header information into the HTTP headers for the REST calls. Their security intermediary knows how to...
Dec 15th
4 tags
Go beyond CRUD in REST!!
More complex concepts like business processes and transactions can also be handled in REST but it might be a little tricky to think of them in RESTful way (you can anyway!). What you have to do with this is, think of those business concepts like they were resouces to handle. For example, “Transfer money between 2 bank accs”. Transfer is your resource and you can perform...
Dec 15th
SOAP or REST?
SOAP XML Headers influencing begavior of routing, security, reliability, and transactions e.g. WS-*. Suitable for complex systems that have security and reliability requirements without sacrificing interoperability. Not stick to only transport protocols (it’s independent); transport-neutral. Support for client-proxy generation facilitating by WSDL and hide the nasty details of the...
Dec 15th
Stress and money
Have you ever curious why positions like software architect, enterprise and solution architect got very high salary? Today I understand it. If you were an architect Not only you have to make big decisions and take risky responsibilities when it fails. But being an architect, you must have a good experience both very deep in the domain knowledge and some wide experience in other domain areas....
Dec 14th
1 note
1 tag
My Cloud
Dec 14th
จะเก่งแค่ไหน...
จะเก่งแค่ไหน คนเราทุกคนก็ต้องเริ่มจากศูนย์ - Ochin
Dec 14th
Listen draft melody เพงใหม่ BooMansion ฮะ Tawan...
Dec 13th
2 notes
3 tags
SQL DMV (Dynamic Management Views)
How would you like to fix problems on your SQL Servers with very little effort? Or fix problems before they become noticeable by irate users? Would you like to quickly discover the slowest SQL queries on your servers? Or get details of missing indexes that could significantly improve the performance of your queries? All these things and more are easily possible, typically in a matter of seconds,...
Dec 13th
Recommended Tags for Documentation Comments (C#) →
Dec 12th
Should I use MSMQ or SQL Service Broker for... →
Dec 12th
3 tags
Good explanation of Named-Pipe from SO
“Both on Windows and POSIX systems, named-pipes provide a way for inter-process communication to occur among processes running on the same machine. What named pipes give you is a way to send your data without having the performance penalty of involving the network stack. Just like you have a server listening to a IP address/port for incoming requests, a server can also set up a named pipe...
Dec 12th
3 tags
WCF Binding Charts
From Pro WCF (Apress) [http://www.amazon.com/Pro-WCF-Practical-Microsoft-Implementation/dp/1590597028]
Dec 12th
Experimenting with enterprise level bus messaging... →
Dec 12th
Model-View-ViewModel (MVVM) Explained -... →
Dec 12th
3 tags
Batch Update in NHibernate
Batch updates are also possible because NHibernate has been tweaked to use the  ADO.NET 2.0 batching internal feature. Enabling this feature makes  NHibernate perform bulk updates; these updates therefore become much faster. All you have to do is define the batch size as an NHibernate property: <property name=”hibernate.adonet.batch_size”>16</property> By default, the...
Dec 11th
7 tags
Implement Equals() in Out of Identity Scope
First let’s consider the default implementation of Equals(), defined by System. Object, which uses a comparison by .NET identity. NHibernate guarantees that there is a unique instance for each row of the database inside an ISession. Therefore, the default identity  Equals() is appropriate if you never mix instances that is, if you never put detached instances from different sessions into the same...
Dec 11th
4 tags
The Scope of Object Identity
If you request two objects using the same database identifier value in the same ISession, the result will be two references to  the same in-memory object.     ISession session1 = sessionFactory.OpenSession();     ITransaction tx1 = session1.BeginTransaction();     // Load Category with identifier value “1234”     object a = session1.Load<Category>( 1234 );     object b =...
Dec 11th