Dev222 VB6与VB2005同心协力交互共存
课程内容概述 如果您还在使用VB6开发应用,可以通过这堂课了解如何借助VB2005的交互操作能力在VB6应用中添加新的功能。另外,您也可以感受到VB2005在生产效率上给您带来的巨大提升!
课程内容安排 Visual Basic 2005客户价值 Visual Basic 2005提高生产率的新功能 阐明对VB6的支持和升级路标 VB6与VB2005互操作
Visual Basic 对于核心业务的开发人员而言,Visual Basic 2005是开发Web, Windows, Office和Mobile应用程序最高效的工具!!
Visual Basic设计原则 提高生产效率 利用desktop的全部功能 使用Web容易和安全的方式部署 提供对平台的完全访问 减少一半的开发时间 减少超过一半的代码量 一次学习,到处使用 利用desktop的全部功能 使用Web容易和安全的方式部署 创建Windows Smart Client端的应用程序 提供对平台的完全访问 仍旧可以直接使用.NET框架
VB的新生产率研究报告 早期结果: 使用Windows Smart Client,提高20% 产品上市时间 目标:比较VB6和VB 2005生产率的差异 早期结果: 使用Windows Smart Client,提高20% 产品上市时间 使用ASP.NET Web client, 提高200%的产品上市时间 明显减少所需训练 最终结果很快将在msdn.com/vbrun上公布
2019年4月13日2时58分 VB2005提高生产效率的新功能 See Sample Applications installed with Toolkit 7 © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
2019年4月13日2时58分 强调VB2005提高生产效率的特性 8 © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Data Specific Enhancements 目标:简化并加强数据访问 新的数据控件 DataGridView控件 BindingSource控件 设计时的数据支持功能 数据库 Web服务 业务对象
Bringing Back the RAD Streamlined IDE Exception Assistant Edit and Continue Debugger Visualizers XML Documentation Just My Code AutoCorrect
My 相当于应用程序级别的“Me” My.Forms My.WebServices My.Resources My.Settings My.Forms.Form1.Show My.WebServices My.WebServices.MSDN.Search(“VB”) My.Resources PictureBox1.Image = My.Resources.Logo My.Settings My.Settings.User.FormLocation = Me.Location
My Hierarchy — Application title, version, logs, description, … — Registry, Printer, Audio, File System, … — User name, group, domain, … — Access resources for the application—icons, images… — User and application settings — Collection of project forms — Collection of web services referenced in project
2019年4月13日2时58分 阐明对VB6的支持和升级路标 13 © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
利用现有投资 Reuse Skills Reuse Code Incremental Upgrade Support Statement: THESE ARE IMPORTANT POINTS TO MAKE Mainstream Support Ended March 31, 2005 Extended Support available through March 31, 2008 Custom Support contracts through 2012 VB6 applications will run on Windows Vista Reuse Skills: VB 6 developers find it easiest to upgrade to Visual Basic 2005. This enables them to reuse many of their existing development skills and familiarity with the development environment. VB 2005 returns oft-requested features like Edit and Continue but also adds more powerful ways to use the .NET Framework. Customer Citation: We’ve seen development organizations such as American Healthways get up to speed with development on VB .NET in under 30 days. This is far faster than it will be for that developer to move to a competing development environment. Reuse Code: Developers can reuse code through migration and our statistics have shown that automated migration will take care of 60% to 90% of the code involved in a migration. This isn’t a perfect solution and we need to be careful not to oversell it, but we have conducted migration labs where this has turned out to be an effective strategy for bringing code forward. Solomon – one of the Great Plains Applications –- is in the middle of upgrading a 5.9MM line application using a lot of this strategy. This won’t be ready (or public) until the end of the year but we will definitely be advertising and talking about this success. Incremental Migration This is one of the absolute key selling points vs. J2EE developers do not need to complete the entire migration at one time. Well factored VB6 code can be used through COM Interop which means that upgrading an application can be stretched over time and can continue to leverage existing business logic. A VB6 application can be extended with VB .NET and a VB .NET application can leverage VB6 components. On the strategy aspect (upgrade skills first, write new .NET code now in VB2005, upgrade apps gradually), I heard some good feedback from the DPE leads this week: We have to be very clear about the decisions BDMs need to make, because that will more effectively drive behavior and ultimately upgrade. Even though it is a stick, our support policy change forces a decision to be made. Obviously, we’d rather have carrots instead. To that end, I recommend that we clearly say that now is the time to start writing new applications in .NET using VB 2005, and therefore skills upgrade is important to think about. We should also clearly say that companies do not have to upgrade all their apps now. This gives us an opportunity to talk about gradual “pay as you go” approaches using interop. This gives us an opportunity to talk about gradual “pay as you go” approaches using interop. Incremental Upgrade
VB6 Support Policy 2005年3月31日结束Mainstream support 7年的免费支持, 远远长于竞争对手 Extended support直到2008年3月31日. Custom support直到2012年 保证VB6应用程序可以照常运行在Windows Vista上 VB6的运行时将作为Windows Vista的一部分发布 当Windows Vista发布后,将还有7年对VB6 runtime的免费支持
4/13/2019 2:58 AM 利用VB6现有的投资 16 © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
VB6升级 问题 如何将大量基于form的VB6应用程序转换到VB.NET? 解决方案: 很多时候需要大量手工转换的工作 需要花费大量的时间和资源进行一次性转换 解决方案: Microsoft InteropForm Toolkit - 方便升级的指导和代码
混合应用程序 工具箱将简化创建混合应用程序(例如一部分VB6,一部分VB.NET) 你可以: 不是一个代码转换器! VB6 Application VB6 Form(s) Interop (COM) VB.NET Form(s)
工具箱服务 互操作 Form Classes/Add-in 简化将.NET form包裹为VB6应用程序的工具 共享状态(State) 在VB6和VB.NET之间共享状态 例子: Credentials, DB Conn String, VB6 Globals 应用程序Event Broker 应用程序级别的双向事件通知 例子: Startup, Shutdown
Application-Level Event 架构 VB6 Application Shared State Read/ Write Read/ Write VB6 Form Invoke/ Pass State COM Wrapper VB.NET Form VB6 Event Handler Form-Level Event Fire Event Application-Level Event Event Broker
4/13/2019 2:58 AM Interop Forms See Sample Applications installed with Toolkit 21 © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
共享的状态 在互操作边界处共享数据的机制 状态保存在name-value对之中 可以使用Managed接口和COM接口进行访问
应用程序Event Broker 跨边界的实践处理机制 处理预定义的实践 支持自定义事件 Single event signature ApplicationShutdown ApplicationStartedup 支持自定义事件 Single event signature Allows you to pass state over 为反馈用户动作而设计事件 而不是为高发生频率的事件而设计
总结 VB2005 可以明显的提高你的工作效率 VB6 和 VB2005交互操作一起为你服务! 免费下载 Refactor! : 4/13/2019 2:58 AM 总结 VB2005 可以明显的提高你的工作效率 VB6 和 VB2005交互操作一起为你服务! 免费下载 Refactor! : http://www.DevExpress.com/VBRefactor/ VB6 Interop Toolkit 及其它资源: http://www.msdn.com/vbrun Contact: JuliaPa@microsoft.com 24 ©2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
可扩展性 Interfaces 接口 Inheritance 继承 Partial Classes 分部类 All of the core toolkit services have interfaces defined that you can write an implementation of 所有的工具箱服务都具有定义的接口, 你可以进行编程 Inheritance 继承 All of the core toolkit services are inheritable and the behavior is overridable 所有的工具箱核心服务都是可继承的,并且可以重载其行为 Partial Classes 分部类 The add-in generated code can be extended via partial classes 可以通过分部类来扩展add-in生成的代码 Source code will ship for most/all of the toolkit 将发布工具箱大部分/全部的原代码 TBD: Source code may be provided for the add-in 悬而未决: 是否提供add-in的原代码
Title A Title B Title C Title D Title E
Add link to external Community website List top 3 newsgroups related to this slide 1 2 3 Advise when your next chat is Next user group meeting you will be at Add Other related 3rd party sites
填反馈表
讲师的Chalk Talk和其他Session
与本次主题有关的Session和活动