Upload
francine-lang
View
223
Download
4
Tags:
Embed Size (px)
Citation preview
Access Web Apps –
OK, Now What?
EXTENDING ACCESS WEB APPSG e o r g e Yo u n g
D a w s o n B u t t e S o f t w a r eg c y o u n g @ d a w s o n b u t t e . n e t
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
Access Web AppsUI is HTML forms
Data is in SQL Server
HTML hosted in SharePoint
SQL database is hosted in Windows Azure (Azure SQL Database)
There is no client code!
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
Access Web App vs. Access ClientPros
Standardized User InterfaceOne-click DeploymentSQL Server (Azure SQL Database) BackendAuthentication handled by SharePoint
ConsLimited User Interface OptionsNo VBA (just macros)Requires SharePoint or Office 365 for BusinessNo inherent Report functionality
ACCESS DAY – OCTOBER 2014 - DENVER, CO
OK, Now What?Azure SQL Database means that the data is now available from anywhere
UI can be anything that can access a SQL Server database (including a full Access client)
The application can live outside of SharePoint
SharePoint / Office 365 / Active Directory authentication can be used, if desired
ACCESS DAY – OCTOBER 2014 - DENVER, CO
Extending Access Web Apps ExamplesFull Access Client application
Cloud Business App
App for SharePoint (MVC)
Active-Directory-Authenticated Web App (MVC)
Windows 8 Phone App (Web API)
ACCESS DAY – OCTOBER 2014 - DENVER, CO
Full Access Client ApplicationUse Web App database credentials to link tables using an ODBC connection
From within your Web App open in Access:Click FILE to open the “Back Stage”Click the Manage button in the Connections sectionIndicate which type of connections and which locations to allowClick the Manage button again and select View Connection InformationCreate a Blank Desktop Database in AccessCreate a Machine ODBC connection using these credentialsLink to the SQL database tables using the connectionDesign your Client application
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
SQL Server Management StudioWe can view our Web App data in Azure SQL Database in SSMS
If you haven’t already specified access From Any Location in your Web App:Click FILE to open the “Back Stage”Click the Manage button in the Connections sectionIndicate From Any LocationClick the Manage button again and select View Connection InformationCopy that information somewhere handy (and secure, if production)
Open SSMS to a new connection and enter the credentialsMake sure to enter the database name on the Options tab
NOTE: Schema is managed in the Access designer, not in SSMS (unlike “normal” SQL Server)
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
Extending Access using Visual StudioFour examples:
Cloud Business AppApp for SharePoint (MVC)ASP.NET web app (MVC)Windows 8 Phone App consuming an ASP.NET Web API interface to database
Cloud Business Apps and Apps for SharePoint live in SharePoint and require a “dev site”
ASP.NET web apps can live on any IIS server
Visual Studio 2013 Professional or Express Web/Phone (free)
ACCESS DAY – OCTOBER 2014 - DENVER, CO
Cloud Business App (Visual Studio)
WYSIWYG development environment (between Access Web App and “normal” web app)
Can combine multiple data sources, including SQL Server, Azure SQL database, SAP, and SharePoint data (users, lists, etc)
Canned UI (set of templates)View, Add, Edit and Search supported out of the box
Two components:Server: Data SourcesHTML Client: Screens
Development:Select Office/SharePoint > Cloud Business AppSpecify SharePoint development siteSpecify Data Source(s)Design ScreensRun (deploys to SharePoint dev site)
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
App for SharePoint (Visual Studio)
We now step away from “canned UI” to full-blown ASP.NET web apps that use the SQL database
App for SharePoint accessed in SharePoint
Can be MVC or Web Forms. We’ll use MVC.
Create the blank MVC ApplicationOpen Visual Studio 2013 (or Visual Studio Express 2013)Select File > New Project > Web > ASP.NET Web ApplicationSelect MVC
Set Authentication to No Authentication Uncheck Host in the Cloud
Connect to the Azure SQL DatabaseRight-click on the Models folder and select Add > ADO.NET Entity Data ModelSelect EF Designer from DatabaseClick New Connection and enter the credentialsSelect the six data tablesSave and Build
ACCESS DAY – OCTOBER 2014 - DENVER, CO
Quick Aside: What is MVC?
ACCESS DAY – OCTOBER 2014 - DENVER, CO
App for SharePoint (Visual Studio)Development:
Select Office/SharePoint > App for SharePointSpecify SharePoint development siteSpecify Project type (MVC) and Authentication (Online or On-Premise)Specify Data Source – Models (right-click) > Add > ADO.NET Entity Data ModelBuild SolutionGenerate Controller(s) and Views – Controllers (right-click) > Add > New Scaffolded ItemRun (deploys to SharePoint dev site)
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
Active-Directory Authenticated MVC Application
Now, web applications that may be accessed anywhere (not just in SharePoint)
We can allowOpen (unauthenticated) accessIndividual user access (stand-alone or federated)Cloud Active Directory (SharePoint/Office 365) authentication
Azure Active Directory can be used to augment SharePoint/Office 365 Active Directory)
On-Premise Active Directory
We’ll build an ASP.NET MVC web application using cloud Active Directory Select Web > ASP.NET Web ApplicationSpecify MVC Specify Organizational Authentication and enter your domain credentialsGenerate site as for App for SharePointThe web app is on the public internet, but access requires Active Directory authentication
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
Windows Phone 8 AppWe can also interact with our Access Web App database in mobile device apps
Two components:Back end data interface: ASP.NET WebAPIFront-end user interface: Windows Phone 8 (Databound App)
ACCESS DAY – OCTOBER 2014 - DENVER, CO
Windows Phone 8 App Backend:ASP.NET Web APIAlmost identical to MVC web application
Development:New Project > Web > ASP.NET Web ApplicationSelect Web APIChange Authentication to No AuthenticationGenerate Model as for App for SharePointRemove “virtual” keyword from generated classesAdd > New Scaffolded Item > Web API 2 Controller with actionsRunPublish to Azure: Right click on project name > Publish
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
Windows Phone 8 App Frontend:Databound AppWindows Phone 8 Databound App
Broadest reachLots of churn in Universal Apps right now
Development:New Project > Store Apps > Windows Phone Apps > Databound App (Windows Phone Silverlight)Add Model classEdit ItemViewModel.cs and MainViewModel.csEdit MainPage.xaml and DetailsPage.xamlRun
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ACCESS DAY – OCTOBER 2014 - DENVER, CO
SummaryAccess 2013/365 opens new scenarios for Access developers to extend their applications to:
SharePoint and Office 365Public and authenticated web sitesMobile device applications
Access developers might consider acquiring basic Visual Studio / MVC skills (or partnering with someone having them) to offer these new scenarios to their customers.
Access developers and their clients may benefit from “thinking outside of the box”.
The “classic” Access client forms application can still be at the center of this new web-based extensible set of applications.
ACCESS DAY – OCTOBER 2014 - DENVER, CO
ResourcesPlease see the following web site for:
A list of resources for learning more about the applications covered in this talkThe sample Northwind Orders database used in these demosA copy of this PowerPoint presentation
http://www.dawsonbutte.com/accesstoazure/
For additional questions or comments, please email me at: [email protected]
Thank you for attending Access Day Denver 2014!