1 / 23

Access to .NET

Access to .NET. Reasons, Strategies and Tools. Overview of Talk. Why move to .NET? What Access can teach us How tools can help preserve assets. Why move to .NET?. .NET and Java, through their frameworks and languages, dominate all new development since 2002 Microsoft ongoing development

ishana
Télécharger la présentation

Access to .NET

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Access to .NET Reasons, Strategies and Tools

  2. Overview of Talk • Why move to .NET? • What Access can teach us • How tools can help preserve assets

  3. Why move to .NET? • .NET and Java, through their frameworks and languages, dominate all new development since 2002 • Microsoft ongoing development • .NET and languages (C#, F#, Python, Ruby) • Sharepoint and Office • SQL Server, BizTalk, other servers • Microsoft Dynamics

  4. The train left the station • Like it or not earlier, valuable systems are vestiges that Microsoft is eager to lose • FoxPro • Access • Microsoft has a desktop database replacement for Access • SQL Server Express 2008 • Access has much less use than rest of Office

  5. Talent • New talent is in short supply • Knowledgeable of Object-Based environments • Experienced with Web-design in some form • They know .NET, Java, Python, PHP • Not eager to work with legacy languages or systems

  6. Are your systems built to outlast you? • A good computer system can be written in any language/product. • Regardless of a language/products merits it may or may not have a following in decades to come. • Do you owe it to your clients to future-proof the maintenance of their systems?

  7. You can’t chase technologies • Constant change from system to system is not productive. • Incremental change is productive. • Changing to meet availability of talent resources is a good strategy. • Changing to add new features is desirable.

  8. C# Language • Complete language • Turing complete • Has been used to create other languages • Has run-time compiler features • Statically typed • Object-Oriented • Some dynamic feature • Supports Generics like Java, like C++ Templates

  9. .NET Framework • Very large Framework or set of libraries • Handles • IO • Data Access Layer • Graphics • Multimedia • Regular Expressions • Security and more….

  10. .NET Exclusive Features • XML* (Yes you can do this with VBA but..) • Object Relational Mapping • LINQ • ADO.Net Entity Framework • nHibernate • Parallel and Multi-Threaded Programming • F# • .NET Threads Library

  11. More features • GUI Toolkits • ASP.NET • WinForms • WPF • Third-party and open-source libraries • Frameworks, Software Patterns • Tools • Code Generation/ Analysis

  12. What can we learn from Access • Various object models including • Access Object model • DAO (Data Access Object) • Jet SQL (More of a data definition language) • Writing VBA programs with these models prepares us for similar interface-based programming in .NET

  13. Composite Design Pattern

  14. Traversing collections • We can inventory many assets by traversing the collections found in the object models. ' Search for open AccessObject objects For Each obj In dbs.AllForms Debug.Print "[Form:" + obj.Name + "]" Next obj

  15. Containers • Containers contain collections which are container/composite types. • Forms contain a collection of Form objects • A Form has a collection of control objects • A control has a collection of properties • A property has a value and a type

  16. The Forms Hierarchy

  17. Inspecting the Access Object Model • VBA is the best for inspecting the model • We can use .NET up to a point • Problems with many of the Access components that use the earlier dispatch interfaces from early COM • .NET Com Interop does not understand the dispatch model

  18. Use VBA to store information • We can write VBA code to store the information on these assets. • We can reference MS XML • Easier to write to some text file • Use that text to rewrite as XML in .NET or with XSLT

  19. Take XML Storage • Taking the XML Storage of these assets we can • Show the inventory of the object model • Use to reconstruct similar forms, reports

  20. How VBA and .NET Relate • Both VBA and .NET use programming to interfaces • VBA/COM: • Dim f2 as form2 • Set f2 = forms[0] • ‘ Get the form2 interface supported by the form class • .NET • Example of using the same interface on two collections

  21. class Program { static void Main(string[] args) { int[] nums = new int[10] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; List<int> dynNums = new List<int>(nums); PrintNums(nums); PrintNums(dynNums); } static void PrintNums(IEnumerable<int> ie) { foreach (int j in ie) Console.WriteLine(j); } }

  22. End of program • Show examples (WinForms, XAML) • Marc Temkin • 773-274-6544 • mtemkin@speakeasy.net • www.chicagoacm.net • Upcoming events on 3/11 and 4/17

More Related