ASP.NET MVC 4 Mobile App Development


ASP.NET MVC 4 Mobile App Development
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
$22.94
save 15%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
$44.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • Learn and utilize the latest Microsoft tools and technologies to develop mobile web apps with a native feel
  • Create web applications for the traditional and mobile web
  • Discover techniques used to overcome the pitfalls of developing Internet-ready apps

Book Details

Language : English
Paperback : 356 pages [ 235mm x 191mm ]
Release Date : July 2013
ISBN : 1849687366
ISBN 13 : 9781849687362
Author(s) : Andy Meadows
Topics and Technologies : All Books, Application Development, Mobile, Enterprise, .NET

Table of Contents

Preface
Chapter 1: Developing for the Mobile Web
Chapter 2: Homebrew and You
Chapter 3: Introducing ASP.NET MVC 4
Chapter 4: Modeling BrewHow in EF5
Chapter 5: The BrewHow Domain and Domain-driven Design
Chapter 6: Writing Maintainable Code
Chapter 7: Separating Functionality Using Routes and Areas
Chapter 8: Validating User Input
Chapter 9: Identifying and Authorizing Users
Chapter 10: Asynchronous Programming and Bundles
Chapter 11: Coding for the Real-time Web
Chapter 12: Designing Your App for Mobile Devices
Chapter 13: Extending Support for the Mobile Web
Chapter 14: Improving the User Experience with jQuery Mobile
Chapter 15: Reader Challenges
Index
  • Chapter 1: Developing for the Mobile Web
    • History of the mobile web
      • The Nokia 9000
      • Market fragmentation
      • WAP 1.0 and WML
      • WAP 2.0 and XHTML MP
    • Continued development constraints
      • Processing constraints
      • Network constraints
        • Content compression
        • Image optimizations
        • Content Delivery Networks
      • Presentation constraints
        • Single window
        • Lower resolution
        • Content spacing
    • Viewing the mobile web
      • Market percentage
      • Browser variants and compatibility
        • WebKit
        • Trident
        • Gecko
        • Presto
      • Emulating the mobile web
        • Mobile device and browser emulators
        • The user agent
    • Support for the mobile web in ASP.NET MVC 4
    • Summary
    • Chapter 2: Homebrew and You
      • Understanding the homebrew domain
        • Knowing your ingredients
          • Malt
          • Yeast
          • Brewing
          • Fermentation
          • Bottling and kegging
      • About our mobile app
        • App requirements
          • Adding, editing, and deleting recipes
          • Adding recipes to a library
          • Rating recipes
          • Commenting on recipes
          • Anonymous browsing, authenticated contributing
      • The BrewHow solution
        • Creating the project
        • Choosing our template
          • The Empty template
          • The Basic template
          • The Internet Application template
          • The Intranet Application template
          • The Mobile Application template
          • The Web API template
        • Project changes in MVC 4
          • NuGet
          • Global.asax
        • Launching the BrewHow app
          • Responsive design
          • Configuring and launching an emulator
      • Summary
      • Chapter 3: Introducing ASP.NET MVC 4
        • The Model-View-Controller pattern
          • The controller
          • The view
          • The model
        • The MVC pattern and ASP.NET MVC 4
          • Controllers in ASP.NET MVC
            • Creating the Recipe controller
            • Introduction to routing
            • Action methods
            • ActionResults
            • Invoking the Recipe controller
          • Views in ASP.NET MVC
            • Razor
            • Shared views
            • Layouts
            • The _ViewStart file
            • Partial views
            • HTML helpers
            • Display templates
            • Editor templates
            • Creating our Recipe view
          • Returning a model to the view
            • Using ViewData
            • Using ViewBag
            • Using TempData
            • Strongly typed models
            • Returning a Recipe list
        • Summary
        • Chapter 4: Modeling BrewHow in EF5
          • What's new in Entity Framework 5.0?
            • Performance enhancements
            • LocalDB support
            • Enumeration support
          • The BrewHow model
            • Modeling data
              • Recipe
              • Review
              • Style
              • Category
              • The BrewHow context
            • Generating our database
            • Altering the model
              • Adding relationships
              • Overriding conventions
              • Enabling migrations
              • Adding seed data
              • Adding a migration
              • Applying migrations
            • Consuming the model
              • Pagination
          • Summary
          • Chapter 5: The BrewHow Domain and Domain-driven Design
            • Tenets of DDD
              • Domain model
              • Entities
              • Value objects
              • Aggregates
              • Factories
              • Repositories
              • Services
            • BrewHow design
              • BrewHow entities
              • BrewHow repositories
              • Consuming the domain
                • Recipe view model
                • Recipe controller
                • Recipe views
            • Summary
            • Chapter 6: Writing Maintainable Code
              • The SOLID principles
                • Single Responsibility Principle
                • Open Closed Principle
                • Liskov Substitution Principle
                • Interface Segregation Principle
                • Dependency Inversion Principle
              • SOLIDifying BrewHow
                • Adding interfaces
                  • Infrastructure
                • Dependency Injection
                • Service locator
                  • Managed Extensibility Framework
                  • MEF Service Locator
                • Dependency Resolver
                  • The MefDependencyResolver class
                • Completing the conversion
                  • IBrewHowContext
                  • Repositories
                  • Registering dependencies
              • Summary
              • Chapter 7: Separating Functionality Using Routes and Areas
                • Routes
                  • Locating by style
                    • Routing constraints
                    • Style interaction
                  • Slugging BrewHow
                    • Model slugs
                • Areas
                  • Creating the review area
                  • Registering the Review area
                  • The Recipe review controller
                    • Recipe review view models
                    • Recipe review action methods
                    • Creating the views
                    • Area route values
                    • Routing namespaces
                • Summary
                • Chapter 8: Validating User Input
                  • Data validation
                    • Data annotations
                      • MetadataType attribute
                      • Updating the database
                      • Validating the validations
                  • Cross-Site Request Forgery (CSRF)
                    • ValidateAntiForgeryToken
                  • Cross-Site Scripting (XSS)
                    • ValidateInput attribute
                    • AllowHtml
                    • Html.Raw
                  • Summary
                  • Chapter 9: Identifying and Authorizing Users
                    • User authentication
                      • Windows authentication
                      • Forms authentication
                    • Authenticating BrewHow users
                      • SimpleMembership
                      • Customizing authentication
                        • SimpleMembership initialization
                        • Unifying contexts
                        • The UserProfile repository
                        • AccountController contexts
                      • Registering and logging in
                      • External authentication
                        • Registering with an external account
                        • Associating an external account
                    • Authorization
                      • Restricting access
                        • The Authorize attribute
                        • Authorizing user contributions
                        • Cleaning the UI
                      • Content ownership
                        • Enabling ownership
                        • Assigning ownership
                        • Enforcing ownership
                      • A recipe library
                        • The library data model
                        • The library repository
                        • The library controller
                        • The library view
                    • Summary
                    • Chapter 10: Asynchronous Programming and Bundles
                      • Asynchronous programming
                        • Task Parallel Library
                          • Task
                        • Async
                        • Await
                        • Asynchronous controller action methods
                          • Creating asynchronous actions
                          • An asynchronous recipe controller
                      • Bundles
                        • Creating bundles
                          • Bundle types
                          • Wildcard support
                        • Consuming bundles
                      • Summary
                      • Chapter 11: Coding for the Real-time Web
                        • Simulating a connected state
                          • Long polling
                          • Forever Frame
                          • Server-Sent Events
                          • WebSockets
                        • SignalR
                          • Persistent connections
                          • Hubs
                        • Real-time recipe updates
                          • Installing and configuring SignalR
                          • Creating the recipe hub
                          • Modifying the recipe list view
                          • Publishing event notifications
                        • Summary
                        • Chapter 12: Designing Your App for Mobile Devices
                          • HTML5
                            • Markup changes
                              • The DOCTYPE tag
                              • The character set
                              • Type attributes
                              • Visual Studio 2012 support
                            • Semantic tags
                              • The article tag
                              • The header tag
                              • The section tag
                              • The nav tag
                              • The footer tag
                              • Modifying recipe details
                            • Custom data attributes
                            • Form controls
                            • Local storage
                            • Geolocation
                          • CSS3
                            • Media types
                            • CSS selectors
                              • Type selectors
                              • ID selectors
                              • Attribute selectors
                              • Class selectors
                              • Universal selectors
                              • Pseudo-class selectors
                            • CSS media queries
                              • Media features
                          • The viewport meta tag
                          • A responsive design
                            • A responsive list
                        • Summary
                          • Chapter 13: Extending Support for the Mobile Web
                            • Mobile views
                              • A .Mobile layout
                              • Mobilizing BrewHow
                                • Removing content
                                • Prioritizing content
                              • How it works
                            • Display modes
                              • Supporting Asus Nexus 7
                              • Creating the display mode
                              • Registering the display mode
                              • Testing with Nexus 7
                            • Summary
                            • Chapter 14: Improving the User Experience with jQuery Mobile
                              • Installing jQuery Mobile
                                • Enabling the jQuery Mobile bundle
                                • Viewing the results
                              • jQuery Mobile's layout
                                • Data-roles and data attributes
                                • Form elements
                                • Themes
                                • $.mobile
                                • View switcher
                              • Mobilizing BrewHow
                                • Adjusting the header
                                  • The home button
                                  • Logging in users
                                  • Site navigation
                                • Creating a footer
                                  • Desktop footer
                                • Configuring content
                                  • Recipe list
                                  • Recipe details
                                  • Recipe edits
                                  • Reviews
                              • Summary
                              • Chapter 15: Reader Challenges
                                • Full-text search
                                  • Embedded search
                                    • Search boxes
                                    • APIs
                                  • Lucene.NET
                                  • SQL Server Full-text Search
                                • Socialization
                                  • Social media support
                                    • Recipe additions
                                    • Recipe sharing
                                  • Offline support
                                  • Push notifications
                                • Going native
                                  • ASP.NET Web API
                                  • Developing native apps
                                    • PhoneGap and Appcelerator
                                    • Xamarin
                                • Summary

                                Andy Meadows

                                Andy Meadows has been in a love affair with technology since his third-grade teacher introduced him to her TRS-80 Model III in 1981. After several months of typing "Go North" on the keyboard, he began his foray into BASIC programming. The TRS-80 Model III begat a Commodore 64 and an introduction to Pascal. By 1988, he was spending his summers earning money by writing software in C for local small businesses. While attending college at the University of Georgia, Andy developed his passion for web development and, of course, beer. His first web application was a series of CGI scripts that output content for NCSA Mosaic and by 1994, he was designing web interfaces for global information systems. After college, Andy wandered listlessly through the IT world spending time in several verticals using several different languages, but he always returned home to web development. In 2002, he began his foray into mobile development beginning with native Java development, and quickly moving into the mobile web space where he began marrying his two passions: mobile web development and .NET. Since then, Andy has worked on several projects involving mobile development, web development, or both. He is extremely excited about the future of the mobile web made possible by the newest generation of mobile devices. He is currently working at a startup in Atlanta, where he lives with his wife and two children.
                                Sorry, we don't have any reviews for this title yet.

                                Code Downloads

                                Download the code and support files for this book.


                                Submit Errata

                                Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


                                Errata

                                - 3 submitted: last submission 21 Nov 2013

                                Errata type: Typo | Page number: 62

                                Partial views may be returned directly from a controller using the PartialView method, or directly returning a PartialReviewResult return type.

                                Should be

                                Partial views may be returned directly from a controller using the PartialView method, or directly returning a PartialViewResult return type.

                                Errata type: Code | Page number: 82

                                public class Recipe
                                {
                                ...
                                public Style Style { get; set; }
                                ...
                                
                                }

                                Should be:

                                public class Recipe
                                {
                                ...
                                public string Style { get; set; }
                                ...
                                
                                }

                                Sample chapters

                                You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                                Frequently bought together

                                ASP.NET MVC 4 Mobile App Development +    Oracle Database 11gR2 Performance Tuning Cookbook =
                                50% Off
                                the second eBook
                                Price for both: €32.60

                                Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                                What you will learn from this book

                                • Understand the differences between developing traditional web apps and apps targeting the mobile web
                                • Learn to use the conventions and configurations used by Entity Framework 5.0 to tailor our model to suit our requirements
                                • Secure your apps and protect your users from Internet attacks like XSS and CSRF
                                • Familiarize yourself with HTML 5 and CSS 3 to develop next-generation web apps
                                • Socialize your app using SignalR and WebSockets to provide real-time features to your users
                                • Create highly-optimized multi-threaded mobile apps using the new async and await keywords and content bundles

                                In Detail

                                The ASP.NET MVC 4 framework is used to build scalable web applications with the help of design patterns and .NET Framework. The Model-View-Controller (MVC) is a design principle which separates the components of a web application. This separation helps you to modify, develop, and test different components of a web application.

                                ASP.NET MVC 4 Mobile App Development helps you to develop next generation applications, while guiding you to deal with the constraints the mobile web places on application development. By the end of the book, you will be well versed with all the aspects of mobile app development.

                                ASP.NET MVC 4 Mobile App Development introduces you to developing mobile web apps using the ASP.NET MVC 4 framework. Walking you through the process of creating a homebrew recipe sharing application, this book teaches you the fundamentals and concepts relevant to developing Internet-ready mobile-enabled web apps. Through the sample application, you will learn how to secure your apps against XSS and CSRF attacks, open up your application to users using third party logins such as Google or Facebook, and how to use Razor, HTML 5, and CSS 3 to create custom views and content targeting mobile devices. Using these custom views, you will then learn how to create web apps with a native mobile device feel using jQuery mobile. By the end of the book, you will be presented with a set of challenges to prove to yourself that you now have the skills to extend your existing web applications to the mobile web or create new mobile web apps.

                                Approach

                                A step-by-step tutorial to get acquainted with the ASP.NET MVC4 Framework and its features in order to discover how to develop web applications using them.

                                Who this book is for

                                This book is targeted at people who are familiar with C# development on the .NET platform and are interested in web development with the ASP.NET development framework. No prior web or mobile development experience is required.

                                Code Download and Errata
                                Packt Anytime, Anywhere
                                Register Books
                                Print Upgrades
                                eBook Downloads
                                Video Support
                                Contact Us
                                Awards Voting Nominations Previous Winners
                                Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                                Resources
                                Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software