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

More Related Content

PPTX
NoSQL Database in .NET Apps
PPTX
FULL stack -> MEAN stack
PDF
Asp.Net 3 5 Part 1
PPTX
Mean stack
PPTX
Drop acid
PPTX
Javascript Myths and its Evolution
PPTX
Web Applications Development with MEAN Stack
PPT
Real World Rails Deployment
NoSQL Database in .NET Apps
FULL stack -> MEAN stack
Asp.Net 3 5 Part 1
Mean stack
Drop acid
Javascript Myths and its Evolution
Web Applications Development with MEAN Stack
Real World Rails Deployment

What's hot (20)

PPTX
Mean full stack development
PDF
Project Dpilot Documentation
PDF
Why we love ArangoDB. The hunt for the right NosQL Database
PDF
WordPress at Scale Webinar
PPTX
What is Mean Stack Development ?
PDF
CFWheels - Pragmatic, Beautiful Code
PPTX
What is a good technology stack today?
PDF
MEAN Stack
PPTX
Javascript evolution
PDF
LAMP is so yesterday, MEAN is so tomorrow! :)
PPT
Asp #2
PDF
Orchestrating MySQL
PDF
JS Lab`16. Андрей Колодницкий: "Разработка REST сервисов на SailsJS"
PPTX
Lamp technology
PDF
Next.js with drupal, the good parts
PPTX
Melbourne User Group OAK and MongoDB
PDF
Tech Stack Ideas
PPTX
Moving to the Cloud: AWS, Zend, RightScale
PPTX
Technology Stack Discussion
Mean full stack development
Project Dpilot Documentation
Why we love ArangoDB. The hunt for the right NosQL Database
WordPress at Scale Webinar
What is Mean Stack Development ?
CFWheels - Pragmatic, Beautiful Code
What is a good technology stack today?
MEAN Stack
Javascript evolution
LAMP is so yesterday, MEAN is so tomorrow! :)
Asp #2
Orchestrating MySQL
JS Lab`16. Андрей Колодницкий: "Разработка REST сервисов на SailsJS"
Lamp technology
Next.js with drupal, the good parts
Melbourne User Group OAK and MongoDB
Tech Stack Ideas
Moving to the Cloud: AWS, Zend, RightScale
Technology Stack Discussion
Ad

Viewers also liked (9)

PDF
Building beautiful websites with bootstrap a case study (DevelopMentor webcast)
PDF
Nosql databases for the .net developer
PPTX
Step by Step - AngularJS
PDF
Introduction to AngularJS
PDF
AngularJS 101 - Everything you need to know to get started
PPTX
AngularJS Architecture
PPTX
MS SQL SERVER: Time series algorithm
PDF
Modern Frontend
PDF
Angular workflow with gulp.js
Building beautiful websites with bootstrap a case study (DevelopMentor webcast)
Nosql databases for the .net developer
Step by Step - AngularJS
Introduction to AngularJS
AngularJS 101 - Everything you need to know to get started
AngularJS Architecture
MS SQL SERVER: Time series algorithm
Modern Frontend
Angular workflow with gulp.js
Ad

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

PDF
Net Microservices Architecture For Containerized Net Applications V70 Updated...
PDF
Net Microservices Architecture For Containerized Net Applications V60 Updated...
PPTX
Plone FSR
PPTX
Webpack/Parcel: What’s Happening Behind the React App?
PDF
Red Hat Forum Benelux 2015
PDF
learning react
PPTX
PPTX
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
PDF
HPC Cloud Burst Using Docker
DOCX
How backbone.js is different from ember.js?
PPTX
Web Techdfasvfsvgsfgnolofgdfggy Unit I.pptx
PDF
NET Microservices Architecture for Containerized NET Applications Cesar De La...
PPT
Node js
PDF
.NET 8Developer Roadmap By Scholarhat PDF
PPTX
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
PPTX
Onion Architecture with S#arp
PDF
Ruby on Rails
PPTX
Introduction to meteor
PDF
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
PPTX
Net Microservices Architecture For Containerized Net Applications V70 Updated...
Net Microservices Architecture For Containerized Net Applications V60 Updated...
Plone FSR
Webpack/Parcel: What’s Happening Behind the React App?
Red Hat Forum Benelux 2015
learning react
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
HPC Cloud Burst Using Docker
How backbone.js is different from ember.js?
Web Techdfasvfsvgsfgnolofgdfggy Unit I.pptx
NET Microservices Architecture for Containerized NET Applications Cesar De La...
Node js
.NET 8Developer Roadmap By Scholarhat PDF
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
Onion Architecture with S#arp
Ruby on Rails
Introduction to meteor
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf

Recently uploaded (20)

PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
STKI Israel Market Study 2025 version august
PPT
Geologic Time for studying geology for geologist
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
Statistics on Ai - sourced from AIPRM.pdf
PPTX
Training Program for knowledge in solar cell and solar industry
PDF
Five Habits of High-Impact Board Members
PPT
Module 1.ppt Iot fundamentals and Architecture
PPTX
Modernising the Digital Integration Hub
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
CloudStack 4.21: First Look Webinar slides
PPTX
TEXTILE technology diploma scope and career opportunities
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PPTX
Microsoft Excel 365/2024 Beginner's training
PDF
Architecture types and enterprise applications.pdf
OpenACC and Open Hackathons Monthly Highlights July 2025
Final SEM Unit 1 for mit wpu at pune .pptx
STKI Israel Market Study 2025 version august
Geologic Time for studying geology for geologist
A review of recent deep learning applications in wood surface defect identifi...
Taming the Chaos: How to Turn Unstructured Data into Decisions
Statistics on Ai - sourced from AIPRM.pdf
Training Program for knowledge in solar cell and solar industry
Five Habits of High-Impact Board Members
Module 1.ppt Iot fundamentals and Architecture
Modernising the Digital Integration Hub
NewMind AI Weekly Chronicles – August ’25 Week III
Zenith AI: Advanced Artificial Intelligence
CloudStack 4.21: First Look Webinar slides
TEXTILE technology diploma scope and career opportunities
Getting started with AI Agents and Multi-Agent Systems
Credit Without Borders: AI and Financial Inclusion in Bangladesh
The influence of sentiment analysis in enhancing early warning system model f...
Microsoft Excel 365/2024 Beginner's training
Architecture types and enterprise applications.pdf

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