Let's get started with Cocktail. We'll discuss prerequisites, how to acquire the source from the Cocktail Project on CodePlex, and how to explore Cocktail through the sample applications.
Cocktail is designed for XAML business application development in WPF 4 and Silverlight 4 or 5. You'll need:
Cocktail works just fine with SQL Server or any Entity-Framework-friendly relational database. You only need Silverlight 4 or 5 if you intend to write a Silverlight applications.
1. Register to download Cocktail and receive the required DevForce Express product key via email.
Note: Existing DevForce customers should use their current key rather than the DevForce Express key.
2. Click Cocktail to download Cocktail from the registration Thank you page.
3. Click the recommended download.
Unblock the zip file to satisfy Windows Security; if you neglect this step, you won't be able to read the help file and Visual Studio will pester you about "unsafe" assemblies downloaded from the web.
4. Right-click the zip file and select Properties.
5. Click the Unblock button at the bottom of the dialog as shown:
6. Unzip it into the directory of your choice and examine its contents.
The zip file high-level items are as follows:
Cocktail applications depend upon DevForce for entity model definition, persistence, and client-side model services.
If you're already a DevForce developer with DevForce installed on your machine you can skip these instructions.
If you are not yet a DevForce developer, you're in for a treat. The installer included with the zip gives you a perpetual free trial of DevForce which is more than sufficient to explore Cocktail and its sample applications.
You do have to actually install DevForce which adds a Visual Studio extension, PostSharp AOP, and some custom Visual Studio templates.
1. Register online to get your free product key; it's emailed to you immediately.
2. Double-click DF2010.Setup...exe and follow its brief instructions. You'll need to enter the product key that was emailed to you.
Important: You must install DevForce after installing Silverlight 4 or 5. If you don't, Cocktail and application projects won't find the DevForce Silverlight libraries. If Cocktail won't build and the complaint is about missing "IdeaBlade..." assemblies, you may have installed DevForce before Silverlight 4 or 5. The easiest resolution is to reinstall DevForce.
Documentation for Cocktail is right here in the Document Resource Center where you'll also find loads of information about the DevForce component of a Cocktail application.
Ease into Cocktail with the Happy Hour Tutorial, a Silverlight application that you build from scratch by following short lessons on Cocktail development.
Or dive deeply into the TempHire reference application. "TempHire" has most of the features you'll need in a production application.
Both "Happy Hour" and "TempHire" are located in the src/samples directory.
Ask questions in our community forum and get real answers from our support engineers, our MVPs, and from developers just like you.
The most important Cocktail artifacts are located in the bin, doc, and src whose high level structure is as follows:
You can build the Cocktail libraries independently and start referencing them in your own WPF and Silverlight applications.
The Cocktail project uses Subversion as the underlying source control system. Maintaining your own working copy is a good way to stay current with the Cocktail project as it evolves.
This source package is much smaller than the zip file because it excludes the 30 Mb DevForce.setup.exe file which you only need once in order to install DevForce.
URL: https://cocktail.svn.codeplex.com/svn
Username: <your codeplex user name>
Password: <same as your website password>
TortoiseSVN is a popular free Subversion client that we use at IdeaBlade to obtain the source code. It integrates directly into Windows Explorer.
Cocktail is also available as a NuGet package and the source code is published to SymbolSource.org.
To install Cocktail, run one of the following commands in the Package Manager Console depending on your platform.