文件名称:
Pratical Code Generation in .NET
开发工具:
文件大小: 1mb
下载次数: 0
上传时间: 2012-06-02
详细说明: 实用代码生成 外文教程 Whenever you’re looking at buying a book, it seems to me there’s only one question that should be asked: “Why should I invest my hard-earned money in this book?” This book is designed to make you, as a software developer, more productive. It does that by giving you all the tools you need to incorporate code generation into your standard development practices. Why would you buy this book? Because letting Visual Studio and .NET write the boring code lets you work on the important stuff. All the code-generation tools yo u need are already available to you because you’re already using code generation. As soon as you start working in .NET and any version of Visual Studio, an enormous amount of code is being created for you. For instance, if you’ve ever created a DataSet then you’ve been using a Visual Studio custom tool that generates the code class file for your DataSet—and that’s just some of the code that’s easy to see. There’s a great deal more generated code hidden away where you can’t find it. In addition to making you more productive, those code-generation tools have taken over creating some of the repetitious and error-prone parts of building applications, thereby also increasing the quality of your code. The next step is for you to start using those tools to create solutions that you— rather than the .NET team—want solved. But the problem is that there is no single point of reference for this material. Code generation requires several tools, and there is no one place where all those tools are discussed. And, even when you find resources for those tools, a comprehensive reference that shows you how to apply them is missing. So part of the answer to the question “Should I buy this book?” is that the book provides “one-stop shopping” for all the tools you need to implement code generation. I’ve put all the tools in one book and covered all the parts of each tool that are relevant to code generation. I’ve been building Visual Studio add-ins that created code for me since .NET 1.1. As I worked with various clients, I found that they were also adopting code-generation solutions—and I got to help them do it. So, in thisbook, I wanted to show how those tools could be used in a practical way— and how they would work together. As a result, almost a third of this book is taken up with three case studies that show how to coordinate these tools to create useful, reliable code-generation solutions for common problems. To put it another way: I wrote this book because I believe that the code-generation tools built into .NET and Visual Studio 2005/2008/2010 will make you a better, more productive developer. And I believe that more developers would develop more code-generation solutions if the tools were more accessible to them. And, of course, I wrote this book because it’s cool technology. Several years ago, I stumbled across a great quote from Dick Sites (one of the designers of Digital Equipment Corporation’s Alpha architecture): “I’d rather write programs that help me write programs than write programs.” That seemed right. One caveat: If you’re looking for a book that shows you how to create enormous frameworks that will generate thousands of lines of code from a single XML document that describes an application—this is not that book. Certainly, all the tools you’ll need are in here, but that’s not my focus. I don’t want to describe how to spend three years building your very own “application generator.” Instead, I want to give you the tools that will let you solve a problem in your life and do it in a morning—a solution that you’ll never have to think about again because it will just work. The first case study in this book (in Chapter 9) is a good example: This solution generates a class that simplifies access to the connection strings specified in the connectionStrings element. It took me about a morning to write, it works in every application, it reduces the amount of code I write, and it eliminates errors in my applications. The second case study (Chapter 10) is similarly focused: It generates the code for an ASP.NET validator that checks that data entered by the user is a valid entry in a table. Like my connection string generator, this is something I use in almost every ASP.NET application I write. The final case study (Chapter 11) took a full day to write, but it allows nonprogrammers to use a visual designer to generate the code necessary to integrate their software into one of my applications— and to do it reliably and without requiring my intervention. ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.