Building the Best Visual Studio Database Applications George


Building the Best Visual Studio Database Applications George F. Goley IV Senior Partner Micro Endeavors Inc. WWW. Micro. Endeavors. Com

Power. Point Template Subtitle color l Select File/Save As l Select File/Slide Setup choose On Screen Show l See next slide for guidelines Sample colors

Overview l Review the Keynote Fox Tennis Club Project Ø l Visual Fox. Pro in a world of components Ø Ø l Review of specs and code When is Fox. Pro alone not enough? When is Fox. Pro needed? Roles of the members of Visual Studio

The Fox Tennis Club Project l Premise Ø Ø Ø l Players want to make reservations: Ø Ø l replace paper system enhance existing fox system add to existing c/s system on the web in person, or on the phone Staff need “view” of courts

Which tools were used? l l l Visual Basic 5 Visual Fox. Pro 5 Visual Inter. Dev 1 IIS and ASP pages SQL Server Internet Explorer

What’s running where

What code runs where? l Internet User Ø l Any browser that supports forms Intranet User Ø Ø Ø Club. Fox. App. exe or Club. VBApp. exe Ø Clireg 32 pointer to foxkeymid clubfoxsvr IE 3 or 4 pointing to foxkeysvr/p. Club. Ax. Doc. htm pclub. ocx(udc. Courts 2. ctl)

What code runs where? l Fox. Key. Mid Ø Ø l clubfoxsvr. exe club. dbc, reservations. dbf foxkeysvr Ø Ø SQL Server members table IIS club. asp & Active. X Document

Why did you do that? ! l l Some corporate data in SQLServer = not File/Server is busy = low Server use Real-time requests= Visual Fox. Pro SPEED! Business rules complex and TSQL is obscure Ø Ø Error messages need to be useful Visual Fox. Pro very flexible/familiar

Why did you do that? ! l Internet = no connection Ø l One or 2 tier solution won’t work Intranet = Different front ends Ø Ø Ø Depends on “Corporate standard du jour” Visual Basic and Visual Fox. Pro apps in office Some users want browser-based Active. X Documents

Why did you do that? ! l Active. X Control Ø l Visual Fox. Pro server Ø Ø l for multiple front ends easy business rule code high speed, especially filtered access to SQL Server available to all front ends ASP pages Ø pure html for Internet

Census l How many use Ø Ø Ø Fox in a 1 tier solution? ? VB in a 1 tier solution? Microsoft SQL Server or other C/S? Visual C++? Visual J++ ? Visual Inter. Dev / ASP pages / IIS

Intranet Specs l l l Present staff with view of courts Use colors for availability Scrollable, resizable, matrix View any day Dbl. Click to schedule

Active. X Control for Courts l l l Written in Visual Basic 5 Can be hosted by almost anything Raise. Event to allow various hosts to: Ø Ø l ev. Get. Data = populate the grid with reservations ev. Make. Reservation = attempt to reserve a court Review udc. Courts 2

Hosts for udc. Courts 2 l l l Visual Fox. Pro exe (clubfoxapp) Visual Basic exe (clubvbapp) Active. X Document (docclubaxdoc. vbd)

Visual Fox. Pro Middle Tier l l l Business rules DBFs and remote views Review of clubfoxsvr (easysvr. udcdatagiver) Ø Ø Ø club. dbc m. Get. Data Ø Fwrite vs. concatenating vars m. Request. Reservation

Web Front-end Specs l l l Must run on all popular browsers Must interact with Intranet data and applications Present user with list of available courts for a specific date User selects date User enters names and Id User chooses from open courts

Web Implementation l l ASP page to produce “pure” HTML to run on all browsers Visual Fox. Pro Server produce list of available courts for a date Visual Fox. Pro Server process reservation requests All business logic in Visual Fox. Pro server

George F. Goley, IV: Web ASP code l l Visual Inter. Dev to produce asp Review club. Asp 2. asp

When is n-tier a good idea? l Low-bandwidth connection Ø Ø Ø l l Over-loaded server Multi-step processing of data Ø l Internet RAS WAN especially heterogeneous data Under-powered work stations

Why use Visual Studio l l Build Active. X Controls Build ASP pages Visual Database Tools Anomaly Tracking System

Why use Visual Fox. Pro l l Currently, the best Microsoft tool for building database applications Great middle tier server Great interactive DBMS tool DBC and ODBC make for fast local data store

When use Visual Studio l l l Other languages in use Moving Visual Fox. Pro to web Improving your resume

When use Visual Fox. Pro l l l Record oriented data smashing Fast, heterogeneous data access Filtered access to large tables Single record retrieval from large tables Complex, changing business rules Any one or two tier database application

Notes: l Scalability Ø Ø l Number of copies of Visual Fox. Pro Servers that “fit” on one machine Individual tables limited to 2 gigabytes Security Ø Handled by MTS

Roles for Visual Studio Members l l l Visual Fox. Pro 6. 0 Visual Basic 6. 0 Visual C++ Visual J++ Visual Inter. Dev

Visual Fox. Pro 6 Role l l l Build all-in-one apps using highspeed DBFs Front-end to 2 -tier applications (Offline views) Middle tier for data warehousing and data manipulation Server for Visual Basic and Browserbased front-ends (Database container) “Father” of ADO/RDO

Visual Basic 6 Role l l l Build Front ends to run in NT/95/98 Build Active. X Controls components for other applications Build Active. X Documents and Active. X Controls for Browser-hosted front ends Build DLLs for business and processing logic in middle tier for MTS and DCOM Create all-in-one apps with MDBs or VFPODBC-hosted DBFs

Visual C++ Role l l Build fast system-level components Build small Active. X Controls for web and Visual Basic Build database apps using OLEDB Faster, smaller, DLLs, OCXs, EXEs

Visual J++ Role Today l l l Cross-platform, Browser-hosted apps Run-time apps without browsers Database support through: Ø Ø l wrapped COM and Active. X Controls Callbacks through sockets “Safe” applets for browsers

Visual J++ Role in future l l l Front end Middle tier No “native” database access No inherent performance benefits Fits COM model for building components

Visual Inter. Dev Role l Create ASP, DHTML, and HTML pages Ø Ø l Server and Client-side scripting Script Wizard, Active. X wizards HTML layouts Visual Inter. Dev not required for ASP and HTML, but does make it easier Deploy browser-based applications

Questions l l l www. microsoft. com/vfoxpro www. microsoft. com/vstudio www. microendeavors. com Ø Ø Ø l Visual Fox. Pro training Visual Fox. Pro Development Microsoft ATEC (Visual Studio) George@microendeavors. com

- Slides: 35