VisualC++的新特性.ppt_第1页
VisualC++的新特性.ppt_第2页
VisualC++的新特性.ppt_第3页
VisualC++的新特性.ppt_第4页
VisualC++的新特性.ppt_第5页
已阅读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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论