- Learning NHibernate 4
- Suhas Chatekar
- 489字
- 2021-07-16 13:08:43
Explaining the approach used in learning NHibernate
Before we actually talk about the application, I thought I will write about the overall approach that I will take to teach you NHibernate.
In this chapter, we will define a simple problem statement. The aim is to implement an efficient data access layer for our problem using NHibernate as we progress through the chapters in this book. In this process, you will learn about important NHibernate features and apply them to an actual software problem at the same time. When we finish the book, we may not have addressed the complete data access requirements of our problem, but we will have implemented the solutions for important aspects of the problem with a certain level of detail. This level of understanding and some experience should set up to build any kind of data access solution using NHibernate.
It may seem disconnected to jump from the problem statement to the data access layer directly, so my first step is to come up with a domain model that captures the core concepts of our problem domain. I will try to follow the guidelines from Object-oriented Analysis and Design (OOAD) and Domain-driven Design (DDD). Both are much specialized areas of software design and explaining them in detail will be another book in itself. So, I will try to keep it to a level sufficient to build a simple domain model for our problem in the right way.
As we go on building our data access layer, we also need a way to validate the correctness of our implementation. Since we are going to build it brick by brick, a lot of times, we will need to go back and change something that was previously implemented as we learn more about NHibernate. While we change things, we need a way to make sure that our changes have not altered the outcomes or have broken a feature that was working previously. We will use TDD to implement our solution. If you have already used TDD, then you will know what I am talking about. If you are new to TDD, then do not worry. TDD is not very difficult to master, and for the kind of work that we are going to do around TDD, you do not need to master the art. We are going to write simple tests that validate the behavior of our data access layer. We will then use NHibernate to build the missing pieces and make our tests pass. I will make sure that I give you enough explanation of the code that I am going to present.
For most part of this book, the solution will be implemented in the form of a class library supported by unit tests to validate the correctness of the code. Towards the end of the book, we should be able to look at the complete solution and understand how NHibernate is used in real-life applications.
- GAE編程指南
- Visual C++程序設(shè)計(jì)學(xué)習(xí)筆記
- Spring技術(shù)內(nèi)幕:深入解析Spring架構(gòu)與設(shè)計(jì)
- MATLAB圖像處理超級(jí)學(xué)習(xí)手冊(cè)
- Java高手真經(jīng)(高級(jí)編程卷):Java Web高級(jí)開(kāi)發(fā)技術(shù)
- Python爬蟲(chóng)開(kāi)發(fā)與項(xiàng)目實(shí)戰(zhàn)
- 征服RIA
- R的極客理想:工具篇
- Visual C++數(shù)字圖像處理技術(shù)詳解
- TradeStation交易應(yīng)用實(shí)踐:量化方法構(gòu)建贏家策略(原書(shū)第2版)
- ASP.NET程序開(kāi)發(fā)范例寶典
- 交互式程序設(shè)計(jì)(第2版)
- Android應(yīng)用開(kāi)發(fā)實(shí)戰(zhàn)(第2版)
- 奔跑吧 Linux內(nèi)核
- Android 游戲開(kāi)發(fā)大全(第二版)