SlideShare a Scribd company logo
NoSQL, MVC, and Rich Forms
by Michael Kennedy | @mkennedy | michaelckennedy.net




                                           DEVELOPMENTOR
Introduction
    * Introduction to NoSQL
    * Why NoSQL
    * CRUD with NoSQL databases
    * HTML Helpers
    * Model Binding
    * Unobtrusive Validation
    * Unified Client and Server Validation
    * View Models
    * JavaScript-Friendly Environment
    * Single-Page Applications (MVC 4)
●



                                             DEVELOPMENTOR
What's Your Experience with NoSQL?




                       DEVELOPMENTOR
What is NoSQL?


 The NoSQL movement is about re-evaluating the
 constraints and scalability of data storage systems in
 the light of the way modern web applications generate
 and consume data.




                                       DEVELOPMENTOR
What is NoSQL?


 The NoSQL movement is about re-evaluating the
 constraints and scalability of data storage systems in
 the light of the way modern web applications generate
 and consume data.




                                       DEVELOPMENTOR
Why NoSQL?



                      Starting from an RDBMS is virtually
                      an axiom of software development.




                                        When was the last time you
                                        consciously evaluated
                                        alternatives to an RDBMS?
Axiom: A proposition whose truth is
so evident that no reasoning or
demonstration can make it plainer.
                                        DEVELOPMENTOR
Why NoSQL?

  You can keep your ‘object / relational
  impedance mismatch’, thank you very much!




                                   DEVELOPMENTOR
MongoDB:
A Powerful NoSQL Database

  Combining the best features of document
  databases, key-values stores, and RDBMS.



    http://www.mongodb.org/




                                    DEVELOPMENTOR
MongoDB:
Just an Example




                  DEVELOPMENTOR
Is NoSQL only for Start-ups?




                        DEVELOPMENTOR
Is NoSQL only for Start-ups?




                        DEVELOPMENTOR
Getting Started




                  DEVELOPMENTOR
The Project: Amazoon




                       DEVELOPMENTOR
The Data Model: Amazoon




                      DEVELOPMENTOR
Programming NoSQL




   Find several provider libraries on NuGet, including the
   Official 10Gen C# driver.
                                                DEVELOPMENTOR
Demo - Part 1:
Amazoon Needs a Data Layer


Time to upgrade Amazoon:

Amazoon needs to be able to do basic queries
and inserts / updates.




                               DEVELOPMENTOR
Demo - Part 1:
Amazoon Needs a Data Layer




                             DEVELOPMENTOR
The GET, POST, Redirect Pattern

                                 GET
                                /book
                                      /edit/4
                                             2


Edit data locally

                                     an  ges
                    POST dit/42 + ch
                          /e
                    /book
                                                         t                   update
                                                   r  ec
                                               ed
                                                  i                          data
                                             -R 2
                                          2 /4
                                        30 ow
                                     TP k/sh
                                  HT oo
                                    /b




                                                             DEVELOPMENTOR
The GET, POST, Redirect Pattern

1


                2

3

      4                     DEVELOPMENTOR
Demo - Part 2:
Forms, Model Binding, and HTML Helpers


"Pure" HTML forms are valid but not optimal in
MVC. Make use of @Html extensions.

   Html.BeginForm(), Html.TextBoxFor(), etc.

Usually, this is far easier with Model Binding.



                                  DEVELOPMENTOR
Demo - Part 2:
Forms, Model Binding, and HTML Helpers


Time to upgrade Amazoon:

Amazoon needs an admin section where we
can create categories and books.




                             DEVELOPMENTOR
Demo - Part 2:
Forms, Model Binding, and HTML Helpers




                           DEVELOPMENTOR
Demo - Part 2:
Forms, Model Binding, and HTML Helpers


Well, that mostly worked. But it was clunky on
several levels.

* ViewBag is untyped and non-discoverable
* Many parameters "capture" the form values
* What about validation?



                                 DEVELOPMENTOR
Demo - Part 3:
View Models and Validation


Now that we got the site working with the new
features, let's clean it up.

* View Models (Model Binding at the next level)
* Validation (is easier with View Models)




                                DEVELOPMENTOR
Demo - Part 3:
View Models and Validation




                             DEVELOPMENTOR
Demo - Part 3:
View Models and Validation




                             DEVELOPMENTOR
Demo - Part 4:
Adding Real Usability with Client-Side Code


Time to upgrade Amazoon (again):

Comments and discussions around books.
These are already in place, but the full-page
refresh is not usable on these potentially large
pages.



                                  DEVELOPMENTOR
Demo - Part 4:
Adding Real Usability with Client-Side Code




                              DEVELOPMENTOR
Demo - Part 4:
Adding Real Usability with Client-Side Code




                              DEVELOPMENTOR
Fully Client-Side MVC Applications

MVC 4 introduces the concept of Single-Page
Applications (think gmail). These combine
many technologies:

* MVC and ASP.NET Web API
* Knockout.js
* Upshot.js
* HTML5

                               DEVELOPMENTOR
Fully Client-Side MVC Applications




http://bit.ly/sanderson-spa
                              DEVELOPMENTOR
I Want My Management Tools




                      DEVELOPMENTOR
Scaling-Out is Easier With NoSQL
So you say it's fast, eh? What do you mean by fast?


    Dropping ACID with MongoDB on USTREAM




                                            DEVELOPMENTOR
Conclusion (MVC)
Just some of the features we've explored in MVC:

   * HTML Helpers
   * Model Binding
   * Unobtrusive Validation
   * Unified Client and Server Validation
   * View Models
   * JavaScript-Friendly Environment
   * Single-Page Applications (MVC 4)



                                            DEVELOPMENTOR
Conclusion (NoSQL)

Just some of the features we've explored in NoSQL:

   * Your database is a choice you make for each project
   * NoSQL => Non-relational
   * Strongly supports horizontal scale-out
   * LINQ works great




                                      DEVELOPMENTOR
More from DevelopMentor
http://www.develop.com/training-courses/web

                                              * Guerrilla .NET
                                                (May 7th in Boston)

                                              * Essential ASP.NET
                                              MVC

                                              * JavaScript and jQuery

                                              * HTML5

                                              * + lots more

                                              @mkennedy
                                              @DevelopMentor_
                                                   DEVELOPMENTOR
Ad

Recommended

NoSQL Database in .NET Apps
NoSQL Database in .NET Apps
Shiju Varghese
 
FULL stack -> MEAN stack
FULL stack -> MEAN stack
Ashok Raj
 
Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1
asim78
 
Mean stack
Mean stack
RavikantGautam8
 
Drop acid
Drop acid
Mike Feltman
 
Javascript Myths and its Evolution
Javascript Myths and its Evolution
Deepu S Nath
 
Web Applications Development with MEAN Stack
Web Applications Development with MEAN Stack
Shailendra Chauhan
 
Real World Rails Deployment
Real World Rails Deployment
Alan Hecht
 
Mean full stack development
Mean full stack development
Scott Lee
 
Project Dpilot Documentation
Project Dpilot Documentation
DeepAnshu Sharma
 
Flywaydb
Flywaydb
Manuel de la Peña Peña
 
Why we love ArangoDB. The hunt for the right NosQL Database
Why we love ArangoDB. The hunt for the right NosQL Database
Andreas Jung
 
WordPress at Scale Webinar
WordPress at Scale Webinar
Pantheon
 
What is Mean Stack Development ?
What is Mean Stack Development ?
Balajihope
 
CFWheels - Pragmatic, Beautiful Code
CFWheels - Pragmatic, Beautiful Code
indiver
 
What is a good technology stack today?
What is a good technology stack today?
Netlight Consulting
 
MEAN Stack
MEAN Stack
Krishnaprasad k
 
Javascript evolution
Javascript evolution
vinukumar_vs
 
LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :)
Sascha Sambale
 
Asp #2
Asp #2
Joni
 
Orchestrating MySQL
Orchestrating MySQL
Ivan Zoratti
 
JS Lab`16. Андрей Колодницкий: "Разработка REST сервисов на SailsJS"
JS Lab`16. Андрей Колодницкий: "Разработка REST сервисов на SailsJS"
GeeksLab Odessa
 
Lamp technology
Lamp technology
Harish Sabbani
 
Next.js with drupal, the good parts
Next.js with drupal, the good parts
Taller Negócio Digitais
 
Melbourne User Group OAK and MongoDB
Melbourne User Group OAK and MongoDB
Yuval Ararat
 
Tech Stack Ideas
Tech Stack Ideas
nsclark
 
Moving to the Cloud: AWS, Zend, RightScale
Moving to the Cloud: AWS, Zend, RightScale
mmoline
 
Technology Stack Discussion
Technology Stack Discussion
Zaiyang Li
 
Building beautiful websites with bootstrap a case study (DevelopMentor webcast)
Building beautiful websites with bootstrap a case study (DevelopMentor webcast)
Michael Kennedy
 
Nosql databases for the .net developer
Nosql databases for the .net developer
Jesus Rodriguez
 

More Related Content

What's hot (20)

Mean full stack development
Mean full stack development
Scott Lee
 
Project Dpilot Documentation
Project Dpilot Documentation
DeepAnshu Sharma
 
Flywaydb
Flywaydb
Manuel de la Peña Peña
 
Why we love ArangoDB. The hunt for the right NosQL Database
Why we love ArangoDB. The hunt for the right NosQL Database
Andreas Jung
 
WordPress at Scale Webinar
WordPress at Scale Webinar
Pantheon
 
What is Mean Stack Development ?
What is Mean Stack Development ?
Balajihope
 
CFWheels - Pragmatic, Beautiful Code
CFWheels - Pragmatic, Beautiful Code
indiver
 
What is a good technology stack today?
What is a good technology stack today?
Netlight Consulting
 
MEAN Stack
MEAN Stack
Krishnaprasad k
 
Javascript evolution
Javascript evolution
vinukumar_vs
 
LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :)
Sascha Sambale
 
Asp #2
Asp #2
Joni
 
Orchestrating MySQL
Orchestrating MySQL
Ivan Zoratti
 
JS Lab`16. Андрей Колодницкий: "Разработка REST сервисов на SailsJS"
JS Lab`16. Андрей Колодницкий: "Разработка REST сервисов на SailsJS"
GeeksLab Odessa
 
Lamp technology
Lamp technology
Harish Sabbani
 
Next.js with drupal, the good parts
Next.js with drupal, the good parts
Taller Negócio Digitais
 
Melbourne User Group OAK and MongoDB
Melbourne User Group OAK and MongoDB
Yuval Ararat
 
Tech Stack Ideas
Tech Stack Ideas
nsclark
 
Moving to the Cloud: AWS, Zend, RightScale
Moving to the Cloud: AWS, Zend, RightScale
mmoline
 
Technology Stack Discussion
Technology Stack Discussion
Zaiyang Li
 
Mean full stack development
Mean full stack development
Scott Lee
 
Project Dpilot Documentation
Project Dpilot Documentation
DeepAnshu Sharma
 
Why we love ArangoDB. The hunt for the right NosQL Database
Why we love ArangoDB. The hunt for the right NosQL Database
Andreas Jung
 
WordPress at Scale Webinar
WordPress at Scale Webinar
Pantheon
 
What is Mean Stack Development ?
What is Mean Stack Development ?
Balajihope
 
CFWheels - Pragmatic, Beautiful Code
CFWheels - Pragmatic, Beautiful Code
indiver
 
What is a good technology stack today?
What is a good technology stack today?
Netlight Consulting
 
Javascript evolution
Javascript evolution
vinukumar_vs
 
LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :)
Sascha Sambale
 
Asp #2
Asp #2
Joni
 
Orchestrating MySQL
Orchestrating MySQL
Ivan Zoratti
 
JS Lab`16. Андрей Колодницкий: "Разработка REST сервисов на SailsJS"
JS Lab`16. Андрей Колодницкий: "Разработка REST сервисов на SailsJS"
GeeksLab Odessa
 
Melbourne User Group OAK and MongoDB
Melbourne User Group OAK and MongoDB
Yuval Ararat
 
Tech Stack Ideas
Tech Stack Ideas
nsclark
 
Moving to the Cloud: AWS, Zend, RightScale
Moving to the Cloud: AWS, Zend, RightScale
mmoline
 
Technology Stack Discussion
Technology Stack Discussion
Zaiyang Li
 

Viewers also liked (9)

Building beautiful websites with bootstrap a case study (DevelopMentor webcast)
Building beautiful websites with bootstrap a case study (DevelopMentor webcast)
Michael Kennedy
 
Nosql databases for the .net developer
Nosql databases for the .net developer
Jesus Rodriguez
 
Step by Step - AngularJS
Step by Step - AngularJS
Infragistics
 
Introduction to AngularJS
Introduction to AngularJS
Jussi Pohjolainen
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get started
Stéphane Bégaudeau
 
AngularJS Architecture
AngularJS Architecture
Eyal Vardi
 
MS SQL SERVER: Time series algorithm
MS SQL SERVER: Time series algorithm
DataminingTools Inc
 
Modern Frontend
Modern Frontend
Cihad Horuzoğlu
 
Angular workflow with gulp.js
Angular workflow with gulp.js
Cihad Horuzoğlu
 
Building beautiful websites with bootstrap a case study (DevelopMentor webcast)
Building beautiful websites with bootstrap a case study (DevelopMentor webcast)
Michael Kennedy
 
Nosql databases for the .net developer
Nosql databases for the .net developer
Jesus Rodriguez
 
Step by Step - AngularJS
Step by Step - AngularJS
Infragistics
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get started
Stéphane Bégaudeau
 
AngularJS Architecture
AngularJS Architecture
Eyal Vardi
 
MS SQL SERVER: Time series algorithm
MS SQL SERVER: Time series algorithm
DataminingTools Inc
 
Angular workflow with gulp.js
Angular workflow with gulp.js
Cihad Horuzoğlu
 
Ad

Similar to BUILDING WEB APPS WITH ASP.NET MVC AND NOSQL (20)

M is for modernization
M is for modernization
Red Pill Now
 
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
Gabriel Villa
 
MWLUG 2014: Modern Domino (workshop)
MWLUG 2014: Modern Domino (workshop)
Peter Presnell
 
The Recent Pronouncement Of The World Wide Web (Www) Had
The Recent Pronouncement Of The World Wide Web (Www) Had
Deborah Gastineau
 
An Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDB
William LaForest
 
Beginning Aspnet 45 Databases 3rd Edition Sandeep Chanda Damien Foggon
Beginning Aspnet 45 Databases 3rd Edition Sandeep Chanda Damien Foggon
tworldmaansi
 
M is for modernization
M is for modernization
Red Pill Now
 
Big data hadoop-no sql and graph db-final
Big data hadoop-no sql and graph db-final
ramazan fırın
 
Big Data (NJ SQL Server User Group)
Big Data (NJ SQL Server User Group)
Don Demcsak
 
Building a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
Building a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
St. Petersburg College
 
Big Data Israel Meetup : Couchbase and Big Data
Big Data Israel Meetup : Couchbase and Big Data
Tugdual Grall
 
NOSQLEU - Graph Databases and Neo4j
NOSQLEU - Graph Databases and Neo4j
Tobias Lindaaker
 
Beginning ASP NET 4 5 Databases 3rd Edition Sandeep Chanda 2024 scribd download
Beginning ASP NET 4 5 Databases 3rd Edition Sandeep Chanda 2024 scribd download
uratajavad45
 
Intro to mobile web application development
Intro to mobile web application development
zonathen
 
Programming for non tech entrepreneurs
Programming for non tech entrepreneurs
Rodrigo Gil
 
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
Chalermpon Areepong
 
Social Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech Day
TechMaster Vietnam
 
Tools For jQuery Application Architecture (Extended Slides)
Tools For jQuery Application Architecture (Extended Slides)
Addy Osmani
 
Software development - the java perspective
Software development - the java perspective
Alin Pandichi
 
What ya gonna do?
What ya gonna do?
CQD
 
M is for modernization
M is for modernization
Red Pill Now
 
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
Gabriel Villa
 
MWLUG 2014: Modern Domino (workshop)
MWLUG 2014: Modern Domino (workshop)
Peter Presnell
 
The Recent Pronouncement Of The World Wide Web (Www) Had
The Recent Pronouncement Of The World Wide Web (Www) Had
Deborah Gastineau
 
An Introduction to Big Data, NoSQL and MongoDB
An Introduction to Big Data, NoSQL and MongoDB
William LaForest
 
Beginning Aspnet 45 Databases 3rd Edition Sandeep Chanda Damien Foggon
Beginning Aspnet 45 Databases 3rd Edition Sandeep Chanda Damien Foggon
tworldmaansi
 
M is for modernization
M is for modernization
Red Pill Now
 
Big data hadoop-no sql and graph db-final
Big data hadoop-no sql and graph db-final
ramazan fırın
 
Big Data (NJ SQL Server User Group)
Big Data (NJ SQL Server User Group)
Don Demcsak
 
Building a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
Building a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
St. Petersburg College
 
Big Data Israel Meetup : Couchbase and Big Data
Big Data Israel Meetup : Couchbase and Big Data
Tugdual Grall
 
NOSQLEU - Graph Databases and Neo4j
NOSQLEU - Graph Databases and Neo4j
Tobias Lindaaker
 
Beginning ASP NET 4 5 Databases 3rd Edition Sandeep Chanda 2024 scribd download
Beginning ASP NET 4 5 Databases 3rd Edition Sandeep Chanda 2024 scribd download
uratajavad45
 
Intro to mobile web application development
Intro to mobile web application development
zonathen
 
Programming for non tech entrepreneurs
Programming for non tech entrepreneurs
Rodrigo Gil
 
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
Chalermpon Areepong
 
Social Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech Day
TechMaster Vietnam
 
Tools For jQuery Application Architecture (Extended Slides)
Tools For jQuery Application Architecture (Extended Slides)
Addy Osmani
 
Software development - the java perspective
Software development - the java perspective
Alin Pandichi
 
What ya gonna do?
What ya gonna do?
CQD
 
Ad

Recently uploaded (20)

FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Safe Software
 
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
 
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
 
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
 
Creating Inclusive Digital Learning with AI: A Smarter, Fairer Future
Creating Inclusive Digital Learning with AI: A Smarter, Fairer Future
Impelsys Inc.
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
SOFTTECHHUB
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
High Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdf
Safe Software
 
Supporting the NextGen 911 Digital Transformation with FME
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
Safe Software
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Safe Software
 
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Safe Software
 
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
 
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
 
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
 
Creating Inclusive Digital Learning with AI: A Smarter, Fairer Future
Creating Inclusive Digital Learning with AI: A Smarter, Fairer Future
Impelsys Inc.
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
SOFTTECHHUB
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
High Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdf
Safe Software
 
Supporting the NextGen 911 Digital Transformation with FME
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
Safe Software
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Safe Software
 
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 

BUILDING WEB APPS WITH ASP.NET MVC AND NOSQL

  • 1. NoSQL, MVC, and Rich Forms by Michael Kennedy | @mkennedy | michaelckennedy.net DEVELOPMENTOR
  • 2. Introduction * Introduction to NoSQL * Why NoSQL * CRUD with NoSQL databases * HTML Helpers * Model Binding * Unobtrusive Validation * Unified Client and Server Validation * View Models * JavaScript-Friendly Environment * Single-Page Applications (MVC 4) ● DEVELOPMENTOR
  • 3. What's Your Experience with NoSQL? DEVELOPMENTOR
  • 4. What is NoSQL? The NoSQL movement is about re-evaluating the constraints and scalability of data storage systems in the light of the way modern web applications generate and consume data. DEVELOPMENTOR
  • 5. What is NoSQL? The NoSQL movement is about re-evaluating the constraints and scalability of data storage systems in the light of the way modern web applications generate and consume data. DEVELOPMENTOR
  • 6. Why NoSQL? Starting from an RDBMS is virtually an axiom of software development. When was the last time you consciously evaluated alternatives to an RDBMS? Axiom: A proposition whose truth is so evident that no reasoning or demonstration can make it plainer. DEVELOPMENTOR
  • 7. Why NoSQL? You can keep your ‘object / relational impedance mismatch’, thank you very much! DEVELOPMENTOR
  • 8. MongoDB: A Powerful NoSQL Database Combining the best features of document databases, key-values stores, and RDBMS. http://www.mongodb.org/ DEVELOPMENTOR
  • 9. MongoDB: Just an Example DEVELOPMENTOR
  • 10. Is NoSQL only for Start-ups? DEVELOPMENTOR
  • 11. Is NoSQL only for Start-ups? DEVELOPMENTOR
  • 12. Getting Started DEVELOPMENTOR
  • 13. The Project: Amazoon DEVELOPMENTOR
  • 14. The Data Model: Amazoon DEVELOPMENTOR
  • 15. Programming NoSQL Find several provider libraries on NuGet, including the Official 10Gen C# driver. DEVELOPMENTOR
  • 16. Demo - Part 1: Amazoon Needs a Data Layer Time to upgrade Amazoon: Amazoon needs to be able to do basic queries and inserts / updates. DEVELOPMENTOR
  • 17. Demo - Part 1: Amazoon Needs a Data Layer DEVELOPMENTOR
  • 18. The GET, POST, Redirect Pattern GET /book /edit/4 2 Edit data locally an ges POST dit/42 + ch /e /book t update r ec ed i data -R 2 2 /4 30 ow TP k/sh HT oo /b DEVELOPMENTOR
  • 19. The GET, POST, Redirect Pattern 1 2 3 4 DEVELOPMENTOR
  • 20. Demo - Part 2: Forms, Model Binding, and HTML Helpers "Pure" HTML forms are valid but not optimal in MVC. Make use of @Html extensions. Html.BeginForm(), Html.TextBoxFor(), etc. Usually, this is far easier with Model Binding. DEVELOPMENTOR
  • 21. Demo - Part 2: Forms, Model Binding, and HTML Helpers Time to upgrade Amazoon: Amazoon needs an admin section where we can create categories and books. DEVELOPMENTOR
  • 22. Demo - Part 2: Forms, Model Binding, and HTML Helpers DEVELOPMENTOR
  • 23. Demo - Part 2: Forms, Model Binding, and HTML Helpers Well, that mostly worked. But it was clunky on several levels. * ViewBag is untyped and non-discoverable * Many parameters "capture" the form values * What about validation? DEVELOPMENTOR
  • 24. Demo - Part 3: View Models and Validation Now that we got the site working with the new features, let's clean it up. * View Models (Model Binding at the next level) * Validation (is easier with View Models) DEVELOPMENTOR
  • 25. Demo - Part 3: View Models and Validation DEVELOPMENTOR
  • 26. Demo - Part 3: View Models and Validation DEVELOPMENTOR
  • 27. Demo - Part 4: Adding Real Usability with Client-Side Code Time to upgrade Amazoon (again): Comments and discussions around books. These are already in place, but the full-page refresh is not usable on these potentially large pages. DEVELOPMENTOR
  • 28. Demo - Part 4: Adding Real Usability with Client-Side Code DEVELOPMENTOR
  • 29. Demo - Part 4: Adding Real Usability with Client-Side Code DEVELOPMENTOR
  • 30. Fully Client-Side MVC Applications MVC 4 introduces the concept of Single-Page Applications (think gmail). These combine many technologies: * MVC and ASP.NET Web API * Knockout.js * Upshot.js * HTML5 DEVELOPMENTOR
  • 31. Fully Client-Side MVC Applications http://bit.ly/sanderson-spa DEVELOPMENTOR
  • 32. I Want My Management Tools DEVELOPMENTOR
  • 33. Scaling-Out is Easier With NoSQL So you say it's fast, eh? What do you mean by fast? Dropping ACID with MongoDB on USTREAM DEVELOPMENTOR
  • 34. Conclusion (MVC) Just some of the features we've explored in MVC: * HTML Helpers * Model Binding * Unobtrusive Validation * Unified Client and Server Validation * View Models * JavaScript-Friendly Environment * Single-Page Applications (MVC 4) DEVELOPMENTOR
  • 35. Conclusion (NoSQL) Just some of the features we've explored in NoSQL: * Your database is a choice you make for each project * NoSQL => Non-relational * Strongly supports horizontal scale-out * LINQ works great DEVELOPMENTOR
  • 36. More from DevelopMentor http://www.develop.com/training-courses/web * Guerrilla .NET (May 7th in Boston) * Essential ASP.NET MVC * JavaScript and jQuery * HTML5 * + lots more @mkennedy @DevelopMentor_ DEVELOPMENTOR