SlideShare ist ein Scribd-Unternehmen logo
1 von 10
PRISM FORMS TEMPLATE
ROD HEMPHILL
MELBOURNE APP DEVELOPMENT
INTRODUCTION
• This is what I use.
• iOS and Android
• Xamarin Forms
• Prism
• You will get these slides and the repo.
THE APP …
• List of Widgets
• Widget
• Id, Name, Description, Type (enum),
• create/update userId and timestamp
• Pages:
• Tab pages
• List of Widgets
• Display a Widget
• About page
ARCHITECTURE …
• Prism:
• Forms does a lot of MVVM and Prism fills in the blanks and makes a few
things easier.
• Xamarin Evolve 2016: MVVM Made Simple with Xamarin.Forms and Prism –
Brian Lagunas: https://www.youtube.com/watch?v=DYRLcqG2BAY
• https://github.com/qmatteoq/XamarinForms-Prism
• MVVM
• Model, View, ViewModel - the names of the folders
• Prism
• Autowire WidgetPage.xaml line 5
• INavigateAware WidgetPageViewModel line 161, WidgetListPageViewModel line
106
• Binding
• WidgetPage.xaml line 76
• Binds “Name” to ViewModel line line 66, Command line 129
THREE TIER ARCHITECTURE …
• A three tier architecture is the separation of:
• User Interface Views
• Business Logic ViewModel, Model
• Data persistence Database
• Model – logical model (Widget.cs)
• Database / Dto – physical model (WidgetDto.cs)
• Both inherit from a base (see UpdatedTimestamp in BaseModel.cs)
• ModelControllers to handle model wide functions (rather than using statics
methods)
• WidgetDto
• This is a simple app – the value is hard to see.
• In more complex the Dto may bring complex structure from the server like children
records.
• Efficiency is in the Dto’s, Logic is in the models.
GENERAL CODE COMPONENTS …
• Dependency injection
• WidgetListPageViewModel line 29
• Service Locator
• BaseModel.cs line 45
• SQLite
• IDataService implemented by DataService
• View models do not call database services or you will break 3 tier principles.
• Object Disposal
• Line 114 of Widget.cs
• Hockey App
• Crash reporting: Settings.cs line 13
• Event reporting: App.xaml.cs -> OnSleep, OnStart, OnResume Line 78
GENERAL CODE COMPONENTS …
• Batch timer (e.g. for polling server)
• Line 85 of App.xaml.cs
• Message Bus (e.g. notifying a list view to refresh itself when
server changes)
• Subscribe: WidgetListPageViewModel line 39, 47
• Send: WidgetRowViewModel line 151
• Multi-Language
• Resources / AppResources.resx Default English
• Resources / AppResources.es.resx Spanish
• in XAML: WidgetPage.xaml line 59
LIST VIEWS …
• Row as a ViewModel
• E.g. Setting source as an ObservableCollection doesn’t let you put
buttons on a row.
• WidgetListPage line 17 ItemSource = WidgetVM
• WidgetListPageViewModel line 71
• ObservableColection< WidgetRowViewModel >
• Loading them line 138
• WidgetRow.xaml line 55 has the “Sell” button
• On Item Tapped line 102 of List view model
• Pull to refresh line 19, 20, 21 of WidgetListPage.xaml
• Swipe to delete line 13 of WidgetRow.xaml
XAML …
• Grid WidgetRow.xaml line 17
• Converters WidgetPage.xaml lines 7, 21, 112
• CustomControl
• Defined: CustomControl/CustomSwitch
• Implemented: iOS and Droid: CustomControl/CustomerSwitchRenderer
• Styles
• ’Variables’ App.xaml line 14 onwards
• Implicit: App.xaml line 57
• Custom: App.xaml line 128
• Used: WidgetRow.xaml line 39
Enjoy
https://bitbucket.org/MelbourneAppDevelopment/prism-forms-
app/

Weitere ähnliche Inhalte

Was ist angesagt?

Ember App Kit & The Ember Resolver
Ember App Kit & The Ember ResolverEmber App Kit & The Ember Resolver
Ember App Kit & The Ember Resolvertboyt
 
Rails Engines
Rails EnginesRails Engines
Rails Enginessean_todd
 
ASP.NEt MVC and Angular What a couple
ASP.NEt MVC and Angular What a coupleASP.NEt MVC and Angular What a couple
ASP.NEt MVC and Angular What a coupleAlexandre Marreiros
 
RailsAdmin - Overview and Best practices
RailsAdmin - Overview and Best practicesRailsAdmin - Overview and Best practices
RailsAdmin - Overview and Best practicesBenoit Bénézech
 
How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...
How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...
How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...Matt Spradley
 
What's New in Xamarin? - Santo Domingo
What's New in Xamarin? - Santo DomingoWhat's New in Xamarin? - Santo Domingo
What's New in Xamarin? - Santo DomingoJames Montemagno
 
Typescript 102 angular and type script
Typescript 102   angular and type scriptTypescript 102   angular and type script
Typescript 102 angular and type scriptBob German
 
Optimizing and Extending Xamarin.Forms iOS, Android, and UWP Apps
Optimizing and Extending Xamarin.Forms iOS, Android, and UWP AppsOptimizing and Extending Xamarin.Forms iOS, Android, and UWP Apps
Optimizing and Extending Xamarin.Forms iOS, Android, and UWP AppsJames Montemagno
 
Cross platform app dev with xamarin forms
Cross platform app dev with xamarin formsCross platform app dev with xamarin forms
Cross platform app dev with xamarin formsShahriar Hossain
 
Building a Headless Shop
Building a Headless ShopBuilding a Headless Shop
Building a Headless ShopPascalKaufmann
 
tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365 tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365 Fabio Franzini
 
Asp.net introduction
Asp.net introductionAsp.net introduction
Asp.net introductionKshitij Wagle
 
Meetup 2014-12-11
Meetup 2014-12-11Meetup 2014-12-11
Meetup 2014-12-11Peter Major
 
Building High-Performance applications with .NET 5 and Vue JS 3
Building High-Performance applications with .NET 5 and Vue JS 3Building High-Performance applications with .NET 5 and Vue JS 3
Building High-Performance applications with .NET 5 and Vue JS 3Alexandre Malavasi
 

Was ist angesagt? (20)

Ember App Kit & The Ember Resolver
Ember App Kit & The Ember ResolverEmber App Kit & The Ember Resolver
Ember App Kit & The Ember Resolver
 
Evolve 2016
Evolve 2016Evolve 2016
Evolve 2016
 
Rails Engines
Rails EnginesRails Engines
Rails Engines
 
Rhodes
RhodesRhodes
Rhodes
 
ASP.NEt MVC and Angular What a couple
ASP.NEt MVC and Angular What a coupleASP.NEt MVC and Angular What a couple
ASP.NEt MVC and Angular What a couple
 
RailsAdmin - Overview and Best practices
RailsAdmin - Overview and Best practicesRailsAdmin - Overview and Best practices
RailsAdmin - Overview and Best practices
 
How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...
How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...
How We Built a Mobile Electronic Health Record App Using Xamarin, Angular, an...
 
What's New in Xamarin? - Santo Domingo
What's New in Xamarin? - Santo DomingoWhat's New in Xamarin? - Santo Domingo
What's New in Xamarin? - Santo Domingo
 
Typescript 102 angular and type script
Typescript 102   angular and type scriptTypescript 102   angular and type script
Typescript 102 angular and type script
 
Optimizing and Extending Xamarin.Forms iOS, Android, and UWP Apps
Optimizing and Extending Xamarin.Forms iOS, Android, and UWP AppsOptimizing and Extending Xamarin.Forms iOS, Android, and UWP Apps
Optimizing and Extending Xamarin.Forms iOS, Android, and UWP Apps
 
Xamarin - Beyond the Basics
Xamarin - Beyond the BasicsXamarin - Beyond the Basics
Xamarin - Beyond the Basics
 
Intro to Xamarin
Intro to XamarinIntro to Xamarin
Intro to Xamarin
 
Cross platform app dev with xamarin forms
Cross platform app dev with xamarin formsCross platform app dev with xamarin forms
Cross platform app dev with xamarin forms
 
Xamarin.Forms
Xamarin.FormsXamarin.Forms
Xamarin.Forms
 
Building a Headless Shop
Building a Headless ShopBuilding a Headless Shop
Building a Headless Shop
 
tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365 tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365
 
Asp.net introduction
Asp.net introductionAsp.net introduction
Asp.net introduction
 
Meetup 2014-12-11
Meetup 2014-12-11Meetup 2014-12-11
Meetup 2014-12-11
 
Xamarin Forms
Xamarin FormsXamarin Forms
Xamarin Forms
 
Building High-Performance applications with .NET 5 and Vue JS 3
Building High-Performance applications with .NET 5 and Vue JS 3Building High-Performance applications with .NET 5 and Vue JS 3
Building High-Performance applications with .NET 5 and Vue JS 3
 

Ähnlich wie Prism Forms Template for Building Apps with Xamarin Forms

Client Side MVC with Backbone and Rails
Client Side MVC with Backbone and RailsClient Side MVC with Backbone and Rails
Client Side MVC with Backbone and RailsTom Z Zeng
 
Building Serverless Web Applications - May 2017 AWS Online Tech Talks
Building Serverless Web Applications  - May 2017 AWS Online Tech TalksBuilding Serverless Web Applications  - May 2017 AWS Online Tech Talks
Building Serverless Web Applications - May 2017 AWS Online Tech TalksAmazon Web Services
 
Building Serverless Web Applications - May 2017 AWS Online Tech Talks
Building Serverless Web Applications - May 2017 AWS Online Tech TalksBuilding Serverless Web Applications - May 2017 AWS Online Tech Talks
Building Serverless Web Applications - May 2017 AWS Online Tech TalksAmazon Web Services
 
SMC302 Building Serverless Web Applications
SMC302 Building Serverless Web ApplicationsSMC302 Building Serverless Web Applications
SMC302 Building Serverless Web ApplicationsAmazon Web Services
 
Chris O'Brien - Modern SharePoint development: techniques for moving code off...
Chris O'Brien - Modern SharePoint development: techniques for moving code off...Chris O'Brien - Modern SharePoint development: techniques for moving code off...
Chris O'Brien - Modern SharePoint development: techniques for moving code off...Chris O'Brien
 
Ruby on Rails + AngularJS + Twitter Bootstrap
Ruby on Rails + AngularJS + Twitter BootstrapRuby on Rails + AngularJS + Twitter Bootstrap
Ruby on Rails + AngularJS + Twitter BootstrapMarcio Marinho
 
Productionize Serverless Application Building and Deployments with AWS SAM - ...
Productionize Serverless Application Building and Deployments with AWS SAM - ...Productionize Serverless Application Building and Deployments with AWS SAM - ...
Productionize Serverless Application Building and Deployments with AWS SAM - ...Amazon Web Services
 
Non-Microsoft Technologies Which Microsoft is Embracing
Non-Microsoft Technologies Which Microsoft is EmbracingNon-Microsoft Technologies Which Microsoft is Embracing
Non-Microsoft Technologies Which Microsoft is EmbracingElton Stoneman
 
Asp.net With mvc handson
Asp.net With mvc handsonAsp.net With mvc handson
Asp.net With mvc handsonPrashant Kumar
 
Sviluppare applicazioni cross-platform con Xamarin Forms e il framework Prism...
Sviluppare applicazioni cross-platform con Xamarin Forms e il framework Prism...Sviluppare applicazioni cross-platform con Xamarin Forms e il framework Prism...
Sviluppare applicazioni cross-platform con Xamarin Forms e il framework Prism...Codemotion
 
Real life cross-platform application development using Xamarin Forms - Frank ...
Real life cross-platform application development using Xamarin Forms - Frank ...Real life cross-platform application development using Xamarin Forms - Frank ...
Real life cross-platform application development using Xamarin Forms - Frank ...Codemotion
 
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to ServerlessNikolaus Graf
 
Building Serverless Web Applications
Building Serverless Web Applications Building Serverless Web Applications
Building Serverless Web Applications Amazon Web Services
 
Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)Visug
 
Introduction to web application development with Vue (for absolute beginners)...
Introduction to web application development with Vue (for absolute beginners)...Introduction to web application development with Vue (for absolute beginners)...
Introduction to web application development with Vue (for absolute beginners)...Lucas Jellema
 

Ähnlich wie Prism Forms Template for Building Apps with Xamarin Forms (20)

Client Side MVC with Backbone and Rails
Client Side MVC with Backbone and RailsClient Side MVC with Backbone and Rails
Client Side MVC with Backbone and Rails
 
What's New with AWS Lambda
What's New with AWS LambdaWhat's New with AWS Lambda
What's New with AWS Lambda
 
Building Serverless Web Applications - May 2017 AWS Online Tech Talks
Building Serverless Web Applications  - May 2017 AWS Online Tech TalksBuilding Serverless Web Applications  - May 2017 AWS Online Tech Talks
Building Serverless Web Applications - May 2017 AWS Online Tech Talks
 
Building Serverless Web Applications - May 2017 AWS Online Tech Talks
Building Serverless Web Applications - May 2017 AWS Online Tech TalksBuilding Serverless Web Applications - May 2017 AWS Online Tech Talks
Building Serverless Web Applications - May 2017 AWS Online Tech Talks
 
Cassandra 3.0
Cassandra 3.0Cassandra 3.0
Cassandra 3.0
 
SMC302 Building Serverless Web Applications
SMC302 Building Serverless Web ApplicationsSMC302 Building Serverless Web Applications
SMC302 Building Serverless Web Applications
 
Intro to ColdBox MVC at Japan CFUG
Intro to ColdBox MVC at Japan CFUGIntro to ColdBox MVC at Japan CFUG
Intro to ColdBox MVC at Japan CFUG
 
Chris O'Brien - Modern SharePoint development: techniques for moving code off...
Chris O'Brien - Modern SharePoint development: techniques for moving code off...Chris O'Brien - Modern SharePoint development: techniques for moving code off...
Chris O'Brien - Modern SharePoint development: techniques for moving code off...
 
Ruby on Rails + AngularJS + Twitter Bootstrap
Ruby on Rails + AngularJS + Twitter BootstrapRuby on Rails + AngularJS + Twitter Bootstrap
Ruby on Rails + AngularJS + Twitter Bootstrap
 
Productionize Serverless Application Building and Deployments with AWS SAM - ...
Productionize Serverless Application Building and Deployments with AWS SAM - ...Productionize Serverless Application Building and Deployments with AWS SAM - ...
Productionize Serverless Application Building and Deployments with AWS SAM - ...
 
Non-Microsoft Technologies Which Microsoft is Embracing
Non-Microsoft Technologies Which Microsoft is EmbracingNon-Microsoft Technologies Which Microsoft is Embracing
Non-Microsoft Technologies Which Microsoft is Embracing
 
Asp.net With mvc handson
Asp.net With mvc handsonAsp.net With mvc handson
Asp.net With mvc handson
 
Sviluppare applicazioni cross-platform con Xamarin Forms e il framework Prism...
Sviluppare applicazioni cross-platform con Xamarin Forms e il framework Prism...Sviluppare applicazioni cross-platform con Xamarin Forms e il framework Prism...
Sviluppare applicazioni cross-platform con Xamarin Forms e il framework Prism...
 
Operating your Production API
Operating your Production APIOperating your Production API
Operating your Production API
 
Real life cross-platform application development using Xamarin Forms - Frank ...
Real life cross-platform application development using Xamarin Forms - Frank ...Real life cross-platform application development using Xamarin Forms - Frank ...
Real life cross-platform application development using Xamarin Forms - Frank ...
 
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to Serverless
 
What's New with AWS Lambda
What's New with AWS LambdaWhat's New with AWS Lambda
What's New with AWS Lambda
 
Building Serverless Web Applications
Building Serverless Web Applications Building Serverless Web Applications
Building Serverless Web Applications
 
Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)Building your first android app using xamarin (Gill Cleeren)
Building your first android app using xamarin (Gill Cleeren)
 
Introduction to web application development with Vue (for absolute beginners)...
Introduction to web application development with Vue (for absolute beginners)...Introduction to web application development with Vue (for absolute beginners)...
Introduction to web application development with Vue (for absolute beginners)...
 

Kürzlich hochgeladen

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 

Kürzlich hochgeladen (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 

Prism Forms Template for Building Apps with Xamarin Forms

  • 1. PRISM FORMS TEMPLATE ROD HEMPHILL MELBOURNE APP DEVELOPMENT
  • 2. INTRODUCTION • This is what I use. • iOS and Android • Xamarin Forms • Prism • You will get these slides and the repo.
  • 3. THE APP … • List of Widgets • Widget • Id, Name, Description, Type (enum), • create/update userId and timestamp • Pages: • Tab pages • List of Widgets • Display a Widget • About page
  • 4. ARCHITECTURE … • Prism: • Forms does a lot of MVVM and Prism fills in the blanks and makes a few things easier. • Xamarin Evolve 2016: MVVM Made Simple with Xamarin.Forms and Prism – Brian Lagunas: https://www.youtube.com/watch?v=DYRLcqG2BAY • https://github.com/qmatteoq/XamarinForms-Prism • MVVM • Model, View, ViewModel - the names of the folders • Prism • Autowire WidgetPage.xaml line 5 • INavigateAware WidgetPageViewModel line 161, WidgetListPageViewModel line 106 • Binding • WidgetPage.xaml line 76 • Binds “Name” to ViewModel line line 66, Command line 129
  • 5. THREE TIER ARCHITECTURE … • A three tier architecture is the separation of: • User Interface Views • Business Logic ViewModel, Model • Data persistence Database • Model – logical model (Widget.cs) • Database / Dto – physical model (WidgetDto.cs) • Both inherit from a base (see UpdatedTimestamp in BaseModel.cs) • ModelControllers to handle model wide functions (rather than using statics methods) • WidgetDto • This is a simple app – the value is hard to see. • In more complex the Dto may bring complex structure from the server like children records. • Efficiency is in the Dto’s, Logic is in the models.
  • 6. GENERAL CODE COMPONENTS … • Dependency injection • WidgetListPageViewModel line 29 • Service Locator • BaseModel.cs line 45 • SQLite • IDataService implemented by DataService • View models do not call database services or you will break 3 tier principles. • Object Disposal • Line 114 of Widget.cs • Hockey App • Crash reporting: Settings.cs line 13 • Event reporting: App.xaml.cs -> OnSleep, OnStart, OnResume Line 78
  • 7. GENERAL CODE COMPONENTS … • Batch timer (e.g. for polling server) • Line 85 of App.xaml.cs • Message Bus (e.g. notifying a list view to refresh itself when server changes) • Subscribe: WidgetListPageViewModel line 39, 47 • Send: WidgetRowViewModel line 151 • Multi-Language • Resources / AppResources.resx Default English • Resources / AppResources.es.resx Spanish • in XAML: WidgetPage.xaml line 59
  • 8. LIST VIEWS … • Row as a ViewModel • E.g. Setting source as an ObservableCollection doesn’t let you put buttons on a row. • WidgetListPage line 17 ItemSource = WidgetVM • WidgetListPageViewModel line 71 • ObservableColection< WidgetRowViewModel > • Loading them line 138 • WidgetRow.xaml line 55 has the “Sell” button • On Item Tapped line 102 of List view model • Pull to refresh line 19, 20, 21 of WidgetListPage.xaml • Swipe to delete line 13 of WidgetRow.xaml
  • 9. XAML … • Grid WidgetRow.xaml line 17 • Converters WidgetPage.xaml lines 7, 21, 112 • CustomControl • Defined: CustomControl/CustomSwitch • Implemented: iOS and Droid: CustomControl/CustomerSwitchRenderer • Styles • ’Variables’ App.xaml line 14 onwards • Implicit: App.xaml line 57 • Custom: App.xaml line 128 • Used: WidgetRow.xaml line 39