Presentation is loading. Please wait.

Presentation is loading. Please wait.

Building on the.Net Framework Visual Basic Learning User Group May 17, 2004 Creating Professional WinForms Applications.

Similar presentations


Presentation on theme: "Building on the.Net Framework Visual Basic Learning User Group May 17, 2004 Creating Professional WinForms Applications."— Presentation transcript:

1 Building on the.Net Framework Visual Basic Learning User Group May 17, 2004 Creating Professional WinForms Applications

2 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Agenda Where we start Where were going How were going to get there Code examples throughout Reuse – The Results

3 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Novick Software The consulting company of Andrew Novick Business Applications Design – Programming - Project Management Coaching - Training SQL Server, VB, C#, VB.Net, ASP.Net, XML http://www.NovickSoftware.com Home of the http://www.NovickSoftware.com Transact-SQL User-Defined Function of the Week

4 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Where Were Starting Windows Relational Database.Net Framework 4000 Classes Windows Forms 30 + Controls Several Programming Languages C#, VB.Net, Jscript, J#, COBOL, APL

5 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Start Building on the.Net Framework Destination

6 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick The Destination

7 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Typical n-Tier Architecture Application Business Objects Data Access

8 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick What makes an Application Great? Robust User Friendly Supportable Maintainable Attractive/Modern Scalable Secure

9 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Additional Process Objective Programmer Productivity Flexibility – Easily enhanced

10 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick 3 Aspects Built on.Net Business Objects Manage Data Robustness Insure the application delivers its promises Presentation Make it look good and up-to-date.

11 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Business Objects Robustness Tracing Configuration Messages Presentation Application Lifetime Ease of Use Appearance Destination Start How are we going bridge the gap? Deployment Report Display

12 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Extended Framework Architecture Application Business Objects Data Access Configuration Tracing/Support Lifetime Mgmt Appearance Mgmt Deployment Security Etc……

13 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Application 3 Component Relationships Application 2 Application 1 Business Objects Framework Framework Biz Obj CSLA Application Blocks Free Generated Written Once Written

14 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Business Objects/Data Data DB Connection Management Object/Relational Mapping Business Rules SQL Server Replication Reporting Report Distribution Security/Authorization Database Connectivity

15 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Business Objects - Options Data Centric Solutions DataSets - Typed DataSets Deklarit/Component One/Other products Object Oriented UML Object/Relational Mapping Tools Hand crafted business objects

16 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Business Objects - Choice CSLA Visual Basic.Net Business Objects By Rockford Lhokta (Software Legend) ComExpress Generates CSLA Objects Will generate a simple user interface SQL Server Replication

17 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Why CSLA? UI application gets simplified data access. myGrid.DataSource = myOjbect.LoadList (key) Scalable to multiple physical tiers Works fine in 2-tier (Client/Server) Scales to 3-tiers without changes to the application Supports multilevel Undo

18 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Reporting – Options Crystal SQL Server Reporting Brio, ActiveReports, etc…. Roll your own Could use Business Objects

19 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Reporting – Choice Crystal Comes in the box Has a standalone version Has a web based distribution product. Covers most of the bases But It Doesnt … Have a good development environment Use business objects.

20 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Reporting – Code to support Crystal Dynamic database connection Menu Creation Category Menus Report Items Supports Security Parameter Gathering

21 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Replication Create Subscription Update Subscription Check status and clean up. Requires Interop to: SQL-DMO SQL Server ActiveX objects for replication

22 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Database Security Requirements Easy administration Users can not use the database outside of the application. Solution Database access based on a Windows Group (Also known as Integrated Security) The group has no access to database objects SQL Server Application Role has all access rights SQL account needed for Crystal Reports

23 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Database Concurrency - Choices Pessimistic Locking Optimistic Locking Check-in/Check-out

24 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Database Concurrency – Choice Check-in/Check-out (Timestamp) Automated by the application Reservations Expire SysAdmin Override Form Batch Program Can SideStep

25 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Presentation - Options Stick with standard WinForms controls Enhance the standard controls Purchase one or more enhanced controls Component One Sharp (DataDynamics) Janus Infragisitcs Many others

26 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Standard WinForms Controls 30 or so controls Plain – mid 90s look Can be enhanced

27 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Presentation - Choice Infragistics NetAdvantage Suite Covers all the bases Gradients on all controls Borders on all controls Consistent Appearance management

28 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Robustness (1/3) Deployment Initial MSI(.Net Framework, Crystal, Ctlrs) No-Touch Deployment Updater Application Block Handle Application Lifetime Correct number of instances Command line parsing Global Exception Handling

29 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Robustness (2/3) Supportability Event/Exception reporting/Help Desk notification. Tracing Manage Trace Log locations Enhance Trace Contents Configuration Before Application Startup System Wide Individual

30 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Robustness (3/3) Interface Management Application code shouldnt directly access: Win 32 API Office Com Objects Some parts of the.Net Framework Security Who can do what when Auditing/recording of user actions

31 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Robustness - Options Roll-your-own Emerging Open Source Frameworks Gengis Commercial Products None available yet?

32 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Robustness - Choice Roll-your-own Built on a huge amount of example code Google MSDN GotDotNet.com CodeProject.com WinForms.Net Buy components where theyre available

33 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Deployment - Requirements Install COM components Install Components into the GAC Create Event Logs Allow for offline work Update automatically, even when the application is in use. Force update when on-line

34 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Deployment - Choices XCOPY MSI No-Touch Deployment No-Touch with NetRun Updater Application Block (UAB)

35 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Deployment Dimensions DimensionConsiderationPreference 1 st InstallHow is the 1 st install done on each client?Automatic UpdatesHow are updates applied?Automatic OfflineDoes it support offline work?Yes SecurityWhat are the security requirements?Full Trust App.ConfigCan you use an App.Config file?Yes COMCan COM objects be installed and used?Yes GACCan components be installed in the GACYes Other FilesCan other files be deployed?Yes

36 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Deployment - Analysis Type 1 st InstallUpdates Off- lineSecurity App. ConfigCOMGAC Other Files XCOPYManual YesFull TrustYesNo Any MSIManual YesFull TrustYes Any No- Touch Auto NoSandboxNo No- Touch NetRun Auto NoFull TrustYesNo UAB Manual MSI AutoYesFull TrustYesNo Any

37 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Deployment - Choice Initial MSI COM install Crystal component install Installer project to create event log Merge Module for Infragistics Updater Application Block Downloads and applies updates when they become available (5 min lag) The implementation can force a the user to wait for a download during application startup.

38 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Application Lifetime How many instances are allowed at once? One One with many main windows Many Did the application crash the last time? Crete an Exceptional Event Notification Is Windows Shutting Down?

39 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Configuration - Types System information need by.Net Trace Flags Error handling Application information Application wide Before a database is available After a database is available Per User information Before a database is available After a database is available Overrides for Support

40 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Configuration – Options App.Config …. exename.exe.config Database Registry Settings files XML INI Isolated Storage

41 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Configuration – Choice App.Config Needed by.Net (trace flags, UAB, etc.) Before there is a database connection. Distributed with the software. Overrides database setting for support Database – Uniform across the application Isolated Storage Per Application / Per User Can be written to under CAS

42 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Tracing/Exceptional Events Used during both development and production Trace object supplied by.Net Add a trace listener Exceptional Events Event log Send e-mail to the help desk

43 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Interface Management Eliminate Win32 API calls in applications Minimize COM Interop in applications Implement a series of helper classes WordManager, WordDoc SQLReplication, SQLServerManagement

44 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Security Privileges – permission to do something Groups – collections of IDs MayI

45 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Security – Schema

46 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Additional Tools (Free) Documentation VBCommentor PowerToy from GotDotNet NDoc from SourceForge Development RegEx Tester Format Tester Testing N-Unit Fx-Cop CodeSmith Generation of strongly typed collections

47 Software Reuse Dont Start from Scratch

48 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick

49 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Application 3 Component Relationships Application 2 Application 1 Business Objects Framework Framework Biz Obj CSLA Application Blocks Free Generated Written Once Written

50 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Reuse Quantified ComponentK LoC% Application 18 12 Business Objects1828 Framework1524 Framework Biz Obj914 CSLA711 Application Blocks711 Totals64100.Net Framework

51 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Where Did the Code Come From 22 % 42 % 24 % 12 % Available For Free Generated Written Once Application Code

52 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Resources www.windowsforms.net www.codeproject.com www.gotdotnet.com MSDN Windows Forms Programming in Visual Basic.Net by Chris Sells & Justin Gehtland

53 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Transact-SQL User-Defined Functions

54 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick New England Visual Basic Professional User Group 1 st Thursday of each month Microsofts Waltham office Focus on VB.Net Speakers Local Professionals INETA Microsoft www.NEVB.com subscribe@nevb.com www.NEVB.com

55 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick www.NovickSoftware.com

56 VB Learning UG May 17, 2004 www.NovickSoftware.com © Copyright 2004 Andrew Novick Building on the.Net Framework Andrew Novick Thanks for Coming Please send feedback to: anovick@novicksoftware.com www.NovickSoftware.com


Download ppt "Building on the.Net Framework Visual Basic Learning User Group May 17, 2004 Creating Professional WinForms Applications."

Similar presentations


Ads by Google