已阅读5页,还剩30页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
DEV205: Visual C+ 的新特性 Xin Tian Developer Support Microsoft Asia Regional Engineering Center,技术的演变,Computing power Power doubling every 18 months Scalable and economical (PCs and servers) Connectivity Low-cost, high-speed Internet, wireless connections to employees, partners, and customers Device proliferation Smart devices - Handhelds, PDAs, cell phones Emerging standards Open standards for exchanging data Connectivity, presentation, data exchange,Visual C+ 与 .NET,Visual C+ is part of .NET Our focus is on power, control, flexibility No black boxes Be productive and easy but never at the expense of power and expressiveness Where does C# fit in? The RAD language designed for the C+ developer,Visual C+ 与 .NET,ATL Server Calling Web Services Managed extensions for C+,用C+, ATL Server 写 Web 应用程序,Built on top of ISAPI Part of the Native C+ Libraries ATL ideal of flexibility and performance Allows you to build web applications and web services,ATL Server 应用程序架构,IIS Process,HTTP Request,HTTP Response,Request Handler,更多的 ATL Server 特性,Stencil Processor Thread-pooling service Http Request Processor Mail support Security support Localization, locale and codepage support Remote Administration Native support for Web Services,什么是 Web Service?,Client,A web service is: programmable logic accessible via standard Web protocols,为什么用 Native Web Services?,Power and Control of native C+ development Bring your existing ATL code into the .NET world Still integrates with ASP .NET Web Service,Web Services 用C+建立,Web Service is just another request handler webmethod attribute Fully interoperates with other Web Services inherit code from C#, Visual Basic and other CLR based .NET code Can be consumed by any platform/language Any C+ type supported Can follow pointers,Web Services 使用,Add Web Reference, for every language Generates C+ wrapper class MFC or ATL applications just Instantiate and call just like any C+ class IntelliSense,演示,ATL Server Web Services,Managed Extensions,C+ on .Net Language interoperability Same C+ language,用C+ 使用 .NET Framework,Common language specification (CLS) “GC” classes “Value” classes Interfaces Method overloading Properties Delegates Events Assemblies,C+ Managed Extensions 14 个新的关键字,_abstract _box _typeof _delegate _event _try_cast _value _gc _interface _nogc _pin _property _sealed _identifier,多语言交互,Reuse existing code “It just works” Native and Microsoft intermediate language (MSIL) code in a single image #pragma Use both unmanaged and managed data Full CLS consumer and extender language No “gunk” or “glue” code No mapping to and from “foreign” types,Hello, World,/ hello.cpp #using using namespace System:Console; void main() / defined in mscorlib.dll WriteLine(L“Hello, World“); cl /clr hello.cpp,同样的 C+ 语言,Reuse existing code Write New native C+ components from your managed application Control, performance, C+ fidelity Extend native C+ apps with .NET components Incremental update of code base Write .NET components in your language of choice C+ is not verifiable,VC+ 与 .NET Managed C+,重要的改进,MFC/ATL Web services Refactoring Windows 2000 support, other new features Top customer requests Attributes Compiler Conformance IDE and debugger productivity,类库,ATL Server Web Services Refactor, Reuse, Interop,MFC,Web Service Support Windows 2000 support Accessibility Common control improvements Fusion support MFC/ATL per app dll Top customer requests CString performance 64-bit CTime Read/write different image formats HTML Dialogs Better integration between MFC and ATL,ATL,ATL Server Refactoring MFC classes integrated in CString, CFile, CTime, CRect, CPoint, CSize SAFEARRAY Encryption Support Better NT Security Support SMTP Mail Performance Monitors Many ATL Server features available Thread pool, caching, http client,VC7 Native 类库,“Merged” in VC7 Factored Easier to enhance and maintain Create and Consume Web Services,MFC/ATL 的改进,Fusion support MFC/ATL per app dll Accessibility 64-bit enabled Easier to write server components Secure (wrap NT security, Crypto) Tune for scalability (Perfmon) Easier COM programming A few new UI classes GDI+ support Common Customer Requests,C+ 语言的问题,C+ code can be difficult to maintain C+ code can be difficult to read Developers spend significant amounts of time writing infrastructure code,C+ 属性,Declarative instructions for guiding implementation Hints to the compilation process Like a compile-time Wizard Simplifies C+ code Conceptually similar across C+, MC+, C# ATL used for implementation You get the advantages of ATL, small, fast code,C+ 属性 示例,dual interface IInventory : public HRESULT BuyProduct(int Number); ; coclass, db_source(“Provider=MSDASQL.1; User ID=Admin; Data Source=OLE_DB_NWind_Jet“), db_command(“SELECT * FROM Products“) class CWidgets : public IInventory public: db_column(1) int unitsInStock; HRESULT BuyProduct(int Number) unitsInStock -= 1; this.Update(); return (S_OK); ;,VS7中C+ 的属性,Managed extensions Use the .NET attributes. Assembly attributes Data access Simplify access to all SQL and OLE DB consumer functionality Web Services Create Web apps, Web services, monitor app performance Simplify COM+ development Eliminate MIDL, generate COM+ metadata Eventing model C+ event model, COM events, COM+ LCE supported with same syntax,编译器的改进,Runtime Checks Buffer overrun checks Stack checks Uninitialized locals Shortened converts (not on by default) Better STL ANSI Compliance Improvements,编译器的改进,Whole Program Optimization More Optimizations Loop unrolling Inlining heuristics And more! New Processor Support,统一的 IDE,Full IntelliSense and Document comments Shared Menu Editor Deployment Task List Dynamic Help and help search Property Grid Full automation New Class View Object Browser,The Microsoft Visual Debugger,Featu
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 新高一“共同体+”主题班会教案:认知·适应·规划·成长(2026年班务示范课)
- 混凝土裂缝防控方案
- 隧道实时预警联动方案
- 机电设备负荷调试环节技术方案
- 充电桩设备技术培训手册
- 小学语文课堂美育审美化构建实施方案
- 水库测量放样复核方案
- 企业交叉施工协调方案
- 桥梁荷载试验方案
- 企业废气处理塔搭建施工技术方案
- 公司一级安全技术交底
- 血管通路工具的选择
- 2024秋期国家开放大学本科《中国当代文学专题》一平台在线形考(形考任务一至六)试题及答案
- 建筑与市政工程抗震规范培训
- 某河涵闸施工方案
- DL-T5129-2013碾压式土石坝施工规范
- 宠物美容、护理、造型全图解
- 对乙酰氨基酚片的溶出度测定
- 乳腺癌手术配合
- 2023年高考全国卷II英语试题 及答案
- 2022年重庆市初中生物结业考试试卷及答案
评论
0/150
提交评论