The documentation for Prism 4 has been completely rewritten and includes the architectural overview, design, and technical concepts for composite applications, applied patterns, two chapters covering Model-View-ViewModel (MVVM), application navigation, Stock Trader Reference Implementation (Stock Trader RI) and MVVM Reference Implementation (MVVM RI) overview, QuickStart overviews, and deployment topics. Much of this guidance is applicable even if you are not using the Prism Library, but you want to know best practices for creating composite applications
Prism 4.0 – November 2010
The guide contains the following topics:
- Patterns in the Prism Library – an overview on common patterns used in “Composite Application” & Prisim Library.
- Prism Library – the organization of the Prism Library into 4 different assemblies. (WP7 has only 2 assemblies)
- Extending Prism e.g. custom logging.
- Reference Implementations
- Appendix H: Prism Hands-On Labs
Class Library References:
Desktop Class Library
Phone Class Library
Silverlight Class Library
Here is a Expression Blend project for sharing XAML based resources for creating consistent Windows Phone 7 user experiences. The templates are based on the UI Design and Interaction Guide for Windows Phone 7 and Design Templates for Windows Phone 7 (a collection of 28 layered Photoshop template .pdf files and the Segoe WP font family for use in application layouts and UI development). With these templates you can easily create common Windows Phone UI layouts by simply copying and pasting the desired page. The Blend team has taken care of the margins, styling, and custom controls that may not be available in the platform.
With Expression Blend, open the project and the WP7 Design Templates.xaml and MainPage.xaml pages should be opened by default. The WP7 Design Templates.xaml page displays all of the available templates in one page. By running the project (F5), you can browse through all of the available templates via the Windows Phone 7 Emulator.
You can download the templates here … http://wp7designtemplates.codeplex.com/
This guide steps you through the process of creating icons for your Windows Phone 7 application as well as for the Marketplace Hub and Marketplace catalog.
Read more here
A collection of 21 FAQs/tutorials tips on CSS (Cascading Style Sheets) basic. Clear answers are provided with tutorial exercises on CSS syntax basics, contextual, class, and id selectors, CSS cascading order rules, grouping CSS definitions, browswer default CSS definitions Topics included in this collection are:
- What Is CSS (Cascading Style Sheets)?
- What Is the Basic Unit of CSS?
- How Many Ways to Attach CSS to HTML Documents?
- How To Include CSS Inside a HTML Tag?
- How To Include CSS Inside the HEAD Tag?
- How To Store CSS Definitions in External Files?
- How Many Ways to Select HTML Tag Instances?
- What Is a Class Selector?
- What Is a ID Selector?
- What Is a Contextual Selector?
- What Is a Group Selector?
- What Is a Mixed Selector?
- What Are the Pseudo Classes on <A> Tags?
- How To Group CSS Definitions Together?
- What Is Style Property Inheritance?
- What Is CSS Cascading?
- What Are the CSS Cascading Order Rules?
- How To Remove the Top White Space of Your Web Page?
- How To Set Different Text Fonts Inside Tables?
- How To Use Class Selectors to Differentiate Tag Instances?
- How To Use IDs to Override Classes?
Answers: CSS Tutorials – Introduction To CSS Basics
Jason Dolinger’s a presentation on design in WPF(also applicable to Silverlight) with the Model-View-ViewModel pattern and the Unity dependency injection framework.
Jason started with an application that one would write in a “traditional” way, with button clicks handled by event-handlers in the code-behind that then updated other parts of the UI. Using WPF data-binding, Commands, and Unity, he transformed it, piece by piece, in a much more manageable, encapsulated, readable, and testable M-V-VM design. It was awesome.
Traditional way 6:00 – 13:00
MVP 13:30 – 17:00
MVVP Overview 17:17 – 22:00
Unit Test 51:30
Moq Mocking Framework the DataSource 52:43 – 57:30
Dependency Injection – Unity – App.xaml 57:45 – 1:09:45
Static Data display in Expression Blend 1:10:15
Create a Row-level ViewModels for Grid & ItemSources control 1:15:50
Note: Jason creates ViewModels that are DependencyObjects. However,DataContexts in Silverlight cannot be DependencyObject descendants. That means that you need to implement ViewModels as INotifyPropertyChanged.
Silverlight does not support bindings for Commands out of the box. It does, however, expose the ICommand interface. With just a little bit more work using an “Attached Behavior” approach, we can get the kind of Commanding that Jason uses in Silverlight as well. Check out the description here.
Via Jason Dolinger on Model-View-ViewModel » Lab49 Blog
Let us use a bookmark service as an example.
We can use PUT to create new user accounts because the client is the one picking the username that forms the new resource’s URI. If the client is successful, the service will return a 201 (“Created”) response. If the client attempts to use an existing username, the service will return a 401 (“Unauthorized”) response. When issuing the PUT request to create a user account, the client will provide a user account representation in the HTTP request body containing the user’s information.
For individual bookmark resources, we’ll support GET, POST, PUT, and DELETE requests. If a particular bookmark is marked as private, only the owner can retrieve it, but if it’s public, anyone can retrieve it. When a user creates a new bookmark, the service is responsible for assigning it a unique bookmark Id. Hence, the client won’t know the Id to use in the URI ahead of time. So, instead of using a PUT request, we’ll have users POST bookmarks to the user’s bookmark collection resource. The handler for the POST request will create the new bookmark, assign it an Id, and return a 201 (“Created”) to the client, specifying the URI of the new bookmark resource in the Location header.
This explains when to use POST or PUT for creating new resources. The answer ultimately lies in who is responsible for determining the new resource’s URI. If the client is in charge, the client can use PUT to the new URI (like we did for user accounts) and the service can return a response code of 201 (“Created”). However, if the service is in charge of generating the new URI, the client should POST the new resource to a factory URI like we’ve done for bookmarks. Then, the service can return a response code of 201 (“Created”) along with the URI of the new resource in the response “Location” header.
Once clients know the bookmark ID’s, they can issue PUT and DELETE requests to individual bookmark URIs to update and delete bookmarks.
Key REST principles
Most introductions to REST start with the formal definition and background. I’ll defer this for a while and provide a simplified, pragmatic definition: REST is a set of principles that define how Web standards, such as HTTP and URIs, are supposed to be used (which often differs quite a bit from what many people actually do). The promise is that if you adhere to REST principles while designing your application, you will end up with a system that exploits the Web’s architecture to your benefit. In summary, the five key principles are:
- Give every “thing” an ID
- Link things together
- Use standard methods
- Resources with multiple representations
- Communicate statelessly
Let’s take a closer look at each of these principles.
Via InfoQ: A Brief Introduction to REST