Project Silk Road Map
About the Topic Areas - Immersive Web Applications, Technology Choices, Mileage Stats, Widgets, UI and UX Design, Modularity, Data, Client-Side HTML, Communication, Navigation, Application Notifications, Server-Side Implementation, Security, Unit Testing, Automated Acceptance Testing |
This topic presents a road map that will help you locate the appropriate guidance topics within Project Silk: Client-Side Web Development for Modern Browsers.
About the Topic Areas
To help you find relevant content, this document divides the topics into particular areas, and then drills down into each of them. It provides a brief overview of the topic area, followed by considerations and recommendations for each topic area and the location of the relevant guidance content. The high-level topic areas are:
- Immersive Web Applications
- Technology Choices
- Mileage Stats
- Widgets
- UI and UX Design
- Modularity
- Data
- Client-Side HTML
- Communication
- Navigation
- Application Notifications
- Server-Side Implementation
- Security
- Unit Testing
- Automated Acceptance Testing
The following sections describe the content and reference materials for each of these topic areas.
Immersive Web Applications
There is a spectrum of web applications being built today. While there are many types of modern web applications that address many different needs, they all have some common characteristics.
What are the different kinds of web applications?
- "Spectrum of Web Applications" in Chapter 1, "Introduction"
- "Characteristics of Modern Web Applications" in Chapter 1, "Introduction"
Technology Choices
The Project Silk team built the Mileage Stats Reference Implementation (Mileage Stats) using JavaScript, jQuery, jQuery UI, the BBQ plug-in, the jqPlot plug-in, Ajax, Modernizr, QUnit, ASP.NET MVC, xUnit.net, Moq, the Entity Framework, Unity Application Block, HTML5, and CSS3.
What are the technology choices I should consider when building a web application?
- "Technologies" in Chapter 1, "Introduction"
- "Architectural Alternatives" in Chapter 2, "Architecture"
What do jQuery and jQuery UI offer?
- "Introduction" in Chapter 3, "jQuery UI Widgets"
Mileage Stats
Mileage Stats is a comprehensive sample application demonstrating a real-world, interactive, cross-browser, consumer-facing, rich web application. This reference implementation is intentionally incomplete, but does illustrate the core concepts, design patterns, coding patterns, security requirements, web technologies, and unit testing necessary to be successful. Below you will find the locations of material that will answer the following questions.
What is Mileage Stats?
- "Exploring the Mileage Stats Reference Implementation" in Chapter 1, "Introduction"
- "Introduction" in Chapter 2, "Architecture"
How do I install Mileage Stats?
How did the design of Mileage Stats evolve?
- "Designing the Mileage Stats Reference Implementation" in Chapter 4, "Design and Layout"
How does Mileage Stats implement modularity?
- "JavaScript Module Implementations" in Chapter 5, "Modularity"
How does Mileage Stats manage and centralize application data requests?
- "Data Request" in Chapter 6, "Client Data Management and Caching"
- "Providing Data Asynchronously" in Chapter 11, "Server-Side Implementation"
How does Mileage Stats cache data?
- "Data Cache" in Chapter 6, "Client Data Management and Caching"
How does Mileage Stats use data- attributes?
- "Using Data- Attributes" in Chapter 7, "Manipulating Client-Side HTML"
- "Providing HTML Structure" in Chapter 11, "Server-Side Implementation"
How does Mileage Stats generate HTML dynamically?
- "Generating HTML Dynamically with JavaScript and jQuery" in Chapter 7, "Manipulating Client-Side HTML"
How does Mileage Stats generate jQuery templates?
- "Server-Side Rendering and jQuery Templates" in Chapter 7, "Manipulating Client-Side HTML"
How does Mileage Stats choose between various communication options?
- "Finding the Right Balance" in Chapter 8, "Communication"
How does Mileage Stats implement direct method invocation between widgets?
- "A Helper for Method Invocation" in Chapter 8, "Communication"
- "Method Invocation in Mileage Stats" in Chapter 8, "Communication"
How does Mileage Stats raise and handle events?
- "Raising and Handling Events" in Chapter 8, "Communication"
How does Mileage Stats implement pub/sub?
- "Pub/Sub in Mileage Stats" in Chapter 8, "Communication"
How does Mileage Stats keep users within a single-page interface?
- "Supporting the Single-Page Interface Pattern" in Chapter 9, "Navigation"
How does Mileage Stats modify the URLs sent from the server?
- "Modifying Hyperlinks" in Chapter 9, "Navigation"
How does Mileage Stats respond to the user clicking on a link?
- "Responding to User Actions" in Chapter 9, "Navigation"
How does Mileage Stats manage the browser's history?
- "Responding to User Actions" in Chapter 9, "Navigation"
How does Mileage Stats coordinate widget transitions between the various layouts?
- "The Layout Manager" in Chapter 9, "Navigation"
How does Mileage Stats animate screen transitions?
- "Animating Screen Transitions" in Chapter 9, "Navigation"
How does Mileage Stats implement Pinned Sites?
- "Pinned Sites in Mileage Stats" in Chapter 10, "Application Notifications"
What does Mileage Stats server-side architecture look like?
- "Introduction" in Chapter 11, "Server-Side Implementation"
How does Mileage Stats implement the Repository Pattern?
- "Implementing the Repository Pattern" in Chapter 11, "Server-Side Implementation"
How are data annotation attributes used in Mileage Stats?
- "Data Annotation Attributes" in Chapter 11, "Server-Side Implementation"
How does Mileage Stats implement authentication?
- "Authentication" in Chapter 12, "Security"
How does Mileage Stats validate input?
- "Input Validation" in Chapter 12, "Security"
What security measures were implemented in Mileage Stats?
- "Mileage Stats Application Security" in Chapter 12, "Security"
What tools were used to facilitate unit testing in Mileage Stats?
- "Introduction" in Chapter 13, "Unit Testing Web Applications"
What is an example of a unit test on the client side in Mileage Stats?
- "Creating Unit Tests" in Chapter 13, "Unit Testing Web Applications"
What is an example of a unit test on the server side in Mileage Stats?
- "Testing Your ASP.NET MVC Controllers" in Chapter 13, "Unit Testing Web Applications"
Widgets
When building rich, client-side web applications, some of the visual elements on the page will naturally take on roles, responsibilities, and state. A concept that is central to jQuery UI is the widget.
What is a widget?
- "Introduction" in Chapter 3, "jQuery UI Widgets"
What is an example of a widget?
- Chapter 14, "Widget QuickStart"
- "Factors That Influence a Modular Design" in Chapter 5, "Modularity"
- "Using Widgets as Modules" in Chapter 5, "Modularity"
How do I define and apply widgets?
- "Defining a Widget" in Chapter 3, "jQuery UI Widgets"
- "Using a Widget" in Chapter 3, "jQuery UI Widgets"
How do I manage the lifetime of widgets?
- "Managing Lifetime" in Chapter 3, "jQuery UI Widgets"
How do I define default options that permit overrides and change notifications?
- "Defining Options" in Chapter 3, "jQuery UI Widgets"
How do I decouple widget behavior?
- "Functions as Options" in Chapter 3, "jQuery UI Widgets"
How do I define and use public methods, properties, and events?
- "The Widget Method" in Chapter 3, "jQuery UI Widgets"
How do I use private methods to improve the readability of the code?
- "Private Members" in Chapter 3, "jQuery UI Widgets"
How do I define a variable that's available to all instances of the widget, but nowhere else?
- "Static Members" in Chapter 3, "jQuery UI Widgets"
How should widgets communicate with each other?
- "Events" in Chapter 3, "jQuery UI Widgets"
How do I inherit from a base widget?
- "Inheritance" in Chapter 3, "jQuery UI Widgets"
UI and UX Design
The design process includes the collaboration of stakeholders and team members with different skills and perspectives. If your team invests in a design process, you are more likely to create an application that users enjoy, find useful, and continue to use. Your user experience (UX) design specifies the site's structure, the web pages it uses, what actions users can perform on each page, and the transitions that can occur after a user performs an action. Your user interface (UI) design should be unified and provide a visual signal to your audience that all your elements belong together.
What is the value of design?
- "Design is a Worthwhile Investment" in Chapter 4, "Design and Layout"
What are the designer roles?
- "Web Project Designer Roles" in Chapter 4, "Design and Layout"
What are UX and UI design artifacts?
- "Design Prototyping" in Chapter 4, "Design and Layout"
What are UX considerations?
- "User Experience Design Considerations" in Chapter 4, "Design and Layout"
What are UI considerations?
- "User Interface Design Considerations" in Chapter 4, "Design and Layout"
What are some guidelines for assigning IDs to elements and naming CSS classes?
- "CSS Organization" in Chapter 4, "Design and Layout"
What are vendor-prefixed attributes?
- "Vendor-Prefixed Attributes" in Chapter 4, "Design and Layout"
How do I debug CSS styles?
- "Debugging" in Chapter 4, "Design and Layout"
Modularity
A modular design can make it easier for you to develop, test, deploy, and extend your application. Modular designs also have well-understood benefits that help you unit test your applications and make them easier to maintain over time. However, achieving a modular design in a complex JavaScript application requires specific techniques that may not be immediately obvious.
What are the benefits of modularity when building hybrid-designed web applications?
- "Modularity" in Chapter 2, "Architecture"
- "Benefits of Modularity for Hybrid-Design Web Applications" in Chapter 5, "Modularity"
What are the factors that influence a module's boundaries?
- "Factors that Influence a Modular Design" in Chapter 5, "Modularity"
What are the types of modules to consider in your application?
- "Functional Roles and Categories for Modules" in Chapter 5, "Modularity"
When should I use a JavaScript object, a jQuery plugin, or a jQuery UI Widget?
- "JavaScript Module Implementations" in Chapter 5, "Modularity"
Data
In rich, interactive, client-centric applications, users expect the application to respond quickly to mouse gestures, page transitions, and the saving of form data. Delays caused by data retrieval or saving data can negatively impact the user's experience and enjoyment of the site. Therefore, carefully managed data retrieval and caching is critical to today's web applications.
How can a loosely coupled data layer simplify caching for client-side data requests?
- "Data" in Chapter 2, "Architecture"
- Chapter 6, "Client Data Management and Caching"
Why do I need a client-side data management strategy?
- "Introduction" in Chapter 6, "Client Data Management and Caching"
What are the benefits of a client-side data manager and the abstraction of data requests?
- "Benefits of the Data Manager Abstraction" in Chapter 6, "Client Data Management and Caching"
How do I improve application performance by caching and prefetching data?
- "Client-Side Data Design" in Chapter 6, "Client Data Management and Caching"
Client-Side HTML
Both hybrid and single-page interface web applications that do not perform full-page post backs in order to change the rendered UI must use client-side techniques for manipulating the document object model (DOM). The three client-side technologies you can use when implementing these techniques are HTML, cascading style sheets (CSS) and JavaScript.
What are options and strategies for getting the right HTML to the client?
- "Structure" in Chapter 2, "Architecture"
- Chapter 7, "Manipulating Client-Side HTML"
What are the roles and responsibilities of HTML, CSS, and JavaScript within a client application?
- "The Roles and Responsibilities of Client-Side Languages" in Chapter 7, "Manipulating Client-Side HTML"
How do I use jQuery to select and manipulate HTML elements?
How do I use jQuery to generate new HTML within the client?
- "Generating and Loading New HTML in a Page" in Chapter 7, "Manipulating Client-Side HTML"
How do I use jQuery Templates to generate new HTML within the client?
- "Using Templates to Retrieve and Generate HTML" in Chapter 7, "Manipulating Client-Side HTML"
How do I choose the most appropriate option when manipulating HTML?
- "Structure, Appearance, and Behavior" in Chapter 7, "Manipulating Client-Side HTML"
Communication
In a client-side application composed of discrete objects, many of those objects need to communicate with one another. You have a few options when choosing how they do this. Generally, your options are direct method invocation, and an indirect communication mechanism such as events.
What are the options for communicating between objects?
- "Communication" in Chapter 2, "Architecture"
- Chapter 8, "Communication"
How can the Publish/Subscribe (pub/sub) pattern be used for loosely coupled communication?
- "Loose Communication" in Chapter 2, "Architecture"
- "Publishing and Subscribing" in Chapter 8, "Communication"
How do I implement direct method invocation between widgets?
- "Direct Method Invocation" in Chapter 8, "Communication"
What are the advantages and disadvantages of direct method invocation?
- "Direct Method Invocation" in Chapter 8, "Communication"
How do I implement event triggering and handling between widgets?
- "Raising and Handling Events" in Chapter 8, "Communication"
How do I control dependencies between the objects triggering events and those handling them?
- "Publishing and Subscribing" in Chapter 8, "Communication"
When should I use the Publish/Subscribe (pub/sub) pattern?
- "Finding the Right Balance" in Chapter 8, "Communication"
How do I use pub/sub to manage multiple handlers and reduce coupling?
- "Publishing and Subscribing" in Chapter 8, "Communication"
Navigation
When a user performs an action such as selecting a hyperlink or clicking a button, the application modifies the current web page without reloading the entire page, resulting in a more responsive, less jarring experience. Adherence to the Single-Page Interface pattern presents a number of navigation challenges. These challenges include managing the browser's history mechanism so that the back button works as expected, providing direct access to a specific layout or state of the page (deep linking), and implementing anchors that allow users to bookmark the application so that it displays in a specific state.
How do I solve browser history and back-button problems when the site doesn't perform full-page reloads?
- "Navigation" in Chapter 2, "Architecture"
- Chapter 9, "Navigation"
How do I keep users within a single-page interface?
- "Supporting the Single-Page Interface Pattern" in Chapter 9, "Navigation"
How do I manage hyperlinks and respond to user actions?
- "Modifying Hyperlinks" in Chapter 9, "Navigation"
- "Responding to User Actions" in Chapter 9, "Navigation"
When do I rewrite URLs and when should I handle the click event?
- "Modifying Hyperlinks" in Chapter 9, "Navigation"
How do I ensure that deep linking, bookmarking, and the back button work as expected?
- "Browser History and the Back Button" in Chapter 9, "Navigation"
How do I coordinate and animate screen transitions?
- "Animating Screen Transitions" in Chapter 9, "Navigation"
Application Notifications
Web applications that users consider responsive have one thing in common: they provide appropriate and timely feedback to the user. How the application displays the notifications to the user is almost as important as the information itself.
How do I provide unobtrusive user notification messages?
- "Where Notification Messages are Displayed" in Chapter 10, "Application Notifications"
How do I handle multiple simultaneous notification messages raised by the application?
- "How Individual or Multiple Notification Messages are Displayed" in Chapter 10, "Application Notifications"
What are the benefits of encapsulating the display and management of user notification in a single JavaScript object?
- "Where Notification Messages are Displayed" in Chapter 10, "Application Notifications"
How do I display a helpful global error page?
- "Website Error Notification" in Chapter 10, "Application Notifications"
How do I set up a global error handler for Ajax requests?
- "User Session Timeout Notification" in Chapter 10, "Application Notifications"
What are alternatives to modal dialogs for prompting users?
- "Prompting Users" in Chapter 10, "Application Notifications"
How do I enable application notifications on the desktop with the Pinned Sites API?
- "Desktop Notifications" in Chapter 10, "Application Notifications"
Server-Side Implementation
Crafting a well-architected web server application requires meeting the needs of the web client while properly factoring the Microsoft® .NET Framework code on the web server. A web server application is responsible for more than just returning HTML content. Web server applications also involve data models, data access and storage, security, communication, and resource management.
How do I use ADO.NET Entity Framework and the Microsoft® SQL Server® Compact Edition to create a data model?
- "Rapid Data Modeling Using the ADO.NET Entity Framework and SQL Server Compact" in Chapter 11, "Server-Side Implementation"
How do I store loosely typed data?
- "Using View Model and View Bag" in Chapter 11, "Server-Side Implementation"
How do I separate concerns between my data model, business logic, and user interface?
- "Composing Application Logic" in Chapter 11, "Server-Side Implementation"
What are the different kinds of models in an MVC application?
- "Factoring Application Code with ASP.NET MVC" in Chapter 11, "Server-Side Implementation"
What are the things I should think about when designing my MVC application?
- "Design Checklist for MVC Applications" in Chapter 11, "Server-Side Implementation"
Should I create a business services layer?
- "Creating a Business Services Layer" in Chapter 11, "Server-Side Implementation"
How do I support interactive web clients with asynchronous data?
- "Providing Data Asynchronously" in Chapter 11, "Server-Side Implementation"
What are the different types of data that web clients request from the server and what are the differences between these types?
- "Choosing a Data Format" in Chapter 11, "Server-Side Implementation"
How do I manage data validation at each level of the stack?
- "Data Validation" in Chapter 11, "Server-Side Implementation"
How do I create custom validation attributes?
- "Creating Custom Validation Attributes" in Chapter 11, "Server-Side Implementation"
What other things should I consider when designing my server-side architecture?
- "Other Considerations" in Chapter 11, "Server-Side Implementation"
Security
You should think about security threats that need to be addressed in any web application and what you should do to mitigate these threats.
What are key security threats that I should address in my web application?
- "Security Threats" in Chapter 12, "Security"
What security features are built into ASP.NET MVC?
- "Web Platform Security" in Chapter 12, "Security"
How do I protect my application from Cross-Site Request Forgery (CSRF)?
- "Anti-Forgery" in Chapter 12, "Security"
How do I protect my application against JSON hijacking?
- "JSON Hijacking Prevention" in Chapter 12, "Security"
How do I secure communication between the client and server?
- "Securing Communication between Client and Server" in Chapter 12, "Security"
What are security modifications I should think about to adjust for changes in the deployment environment and security requirements for the application?
- "Additional Security Considerations" in Chapter 12, "Security"
Unit Testing
Unit testing, sometimes referred to as developer testing, focuses on testing small pieces of code, such as a class, that a developer is writing. These tests are critical for helping you ensure that the pieces you build work as expected and will operate correctly when combined with other parts of the application. Such testing helps support management of the application over time by ensuring that changes you make don't inadvertently affect other parts of the system.
How do I get started unit testing my JavaScript code?
- "JavaScript Unit Testing" in Chapter 13, "Unit Testing Web Applications"
How do I get started unit testing my ASP.NET MVC code?
- "Server-Side Unit Testing" in Chapter 13, "Unit Testing Web Applications"
What is the arrange-act-assert unit test structure?
- "Creating Unit Tests" in Chapter 13, "Unit Testing Web Applications"
What are techniques to isolate my tests and components?
- "Isolating Your Tests" in Chapter 13, "Unit Testing Web Applications"
- "Isolating Your Components" in Chapter 13, "Unit Testing Web Applications"
What are things I should consider when testing my jQuery UI Widgets?
- "jQuery UI Widget Testing" in Chapter 13, "Unit Testing Web Applications"
What are things I should consider when testing my ASP.NET MVC controllers?
- "Testing Your ASP.NET MVC Controllers" in Chapter 13, "Unit Testing Web Applications"
Automated Acceptance Testing
Automated acceptance tests are tests that use code to implement a manual test. Automated acceptance tests are usually written at the user interface level and can validate a high-level of functionality.
How do I ensure that the UIElement properties are displayed with the correct values?
How do I test the error handling capability of the application at the user level?
How do I create an automated test for my web application using Coded UI Test in Microsoft Visual Studio® 2010 Premium or Ultimate edition?