
Getting Started with Knockout.js for .NET Developers
Beschreibung
This book is intended for .NET developers who want to use the MVVM design pattern to create powerful client-side JavaScript linked to server-side C# logic. Basic experience with ASP.NET, Razor, and creating web applications is needed.
Alle Preise
Weitere Details
Weitere Ausgaben
Inhalt
- Cover
- Copyright
- Credits
- About the Author
- About the Reviewers
- www.PacktPub.com
- Table of Contents
- Preface
- Chapter 1: Introduction to Knockout.js
- Knockout.js overview
- What is Knockout.js?
- The best features
- MVVM design pattern
- Installing Knockout.js
- Method 1 - official site
- Method 2 - NuGet
- Method 3 - CDNs
- Method 4 - GitHub
- Knockout.js fundamentals
- Creating a View
- Adding a ViewModel
- Adding a data binding
- Adding an observable
- Subscribing to observables
- Updating View in a forced way
- Delaying and suppressing change notifications
- Adding dynamic behavior
- A binding diversity
- Single and multiple bindings
- Value representation
- White spaces
- Skipping the value
- Useful links
- Summary
- Chapter 2: Creating a Simple Knockout.js Application
- Creating the Model, View, and ViewModel
- Text and appearance bindings
- The text binding
- The html binding
- The css binding
- The style binding
- The attr binding
- The visible binding
- Form fields bindings
- The value binding
- The click binding
- The submit binding
- The event binding
- The checked binding
- The enable and disable binding
- The options binding
- The selectedOptions binding
- Control flow bindings
- The foreach binding
- The if and ifnot bindings
- The with binding
- Computed observables
- Using a computed observable
- Computed observable features
- Observable arrays
- Using an observable array
- Adding to an observable array
- Removing from an observable array
- Manipulating an observable array
- Summary
- Chapter 3: Integrating Knockout.js in ASP.NET MVC Applications
- Creating an application without Knockout.js
- Creating a new project
- Adding models
- Adding views
- Adding the Controller
- Running the application
- Creating an application with Knockout.js
- Motivation
- Creating a new project
- Adding models
- Adding views
- Adding the controller
- Running the application
- Summary
- Chapter 4: Creating a Web Application with Knockout MVC
- Getting started with Knockout MVC
- Motivation
- When you should use Knockout MVC
- Installation
- Useful links
- Working with the Hello World example in Knockout MVC
- Adding the model
- Adding the controller
- Adding the view
- Running the application
- Under the hood
- Developing a Knockout MVC application
- Adding the model
- Adding the controller
- Adding the view
- Running the application
- Under the hood
- Summary
- Chapter 5: Advanced Features of Knockout.js
- Loading and saving JSON data
- Converting data to JSON
- Converting JSON to data
- Introducing Knockout mapping
- A manual mapping example
- An automatic mapping example
- Mapping in Knockout MVC
- Mapping unique values
- Partial mapping - create
- Partial mapping - update
- Partial mapping - ignore
- Multiple mappings
- Advanced mapping
- Binding context
- Custom bindings
- Registering a new binding
- Binding callbacks' parameters
- A custom binding example 1 - slideVisible
- A custom binding example 2 - hasFocus
- Extending observables
- Creating an extender
- An extending observables example 1 - numeric
- An extending observables example 2 - required
- Custom functions
- An example with array filtering
- Different templating approaches
- A simple named template
- Template in the foreach mode
- The foreach template with alias
- Choosing a template dynamically
- Summary
- Chapter 6: Advanced Features of Knockout MVC
- Regions
- The foreach region
- The with region
- The if region
- Complex bindings
- Sending parameters to the server
- Inner computed properties
- Multiple view models
- Lazy loading
- Writing user scripts
- Summary
- Appendix: A Brief on Knockout MVC References and Features
- Working with KnockoutContext
- Basic data binding
- Form objects
- Nested contexts
- Sending requests to the server
- Adding user-defined scripts
- Forming a model and using computed properties
- Special addressing forms
- Summary
- Index
Systemvoraussetzungen
Dateiformat: ePUB
Kopierschutz: Adobe-DRM (Digital Rights Management)
Systemvoraussetzungen:
- Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).
- Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions oder die App PocketBook (siehe E-Book Hilfe).
- E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)
Das Dateiformat ePUB ist sehr gut für Romane und Sachbücher geeignet – also für „fließenden” Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an.
Mit Adobe-DRM wird hier ein „harter” Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.
Bitte beachten Sie: Wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!
Weitere Informationen finden Sie in unserer E-Book Hilfe.
Dateiformat: PDF
Kopierschutz: Adobe-DRM (Digital Rights Management)
Systemvoraussetzungen:
- Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).
- Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions oder die App PocketBook (siehe E-Book Hilfe).
- E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)
Das Dateiformat PDF zeigt auf jeder Hardware eine Buchseite stets identisch an. Daher ist eine PDF auch für ein komplexes Layout geeignet, wie es bei Lehr- und Fachbüchern verwendet wird (Bilder, Tabellen, Spalten, Fußnoten). Bei kleinen Displays von E-Readern oder Smartphones sind PDF leider eher nervig, weil zu viel Scrollen notwendig ist.
Mit Adobe-DRM wird hier ein „harter” Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.
Bitte beachten Sie: Wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!
Weitere Informationen finden Sie in unserer E-Book Hilfe.