The Dew Review – DXTREME: Cross-Platform Application Dev Tools by DevExpress

DevExpress has released a new set of cross-platform tools that enable developers to create rich web applications targeting mobile and desktop browsers. DXTREME is the name of the new package that aims to make developers more productive in these scenarios.

Just how easy is it to jump in and build a simple application? I have had little experience developing for platforms other than Windows and Windows Phone, and I have been wanting to find a way to target iOS and Android. So, when I was asked to take a look at DXTREME, I jumped at the opportunity.

Installation and Getting Started

Installation was quick and painless, as is the case with all DevExpress tools (see my review of their WPF suite). After installing, a new DevExpress template category is added in Visual Studio 2012’s New Project dialog. In there, select the  DXTREME 12.2 Application Project template to get started.

NewProject

The default project contains quite a few files. App.html is the default page and acts as the container for all of your views. Index.html is the default view loaded by App.html. Each of these html files has a corresponding .js and .css file. The navigation bar for DXTREME apps has its files located under layoutsNavbar. The default navigation buttons are Home and About (which loads the included About.html file). The datadb.js file performs data retrieval for the app.

SolutionExplorer

Data Retrieval

I am a big fan of the ASP.NET Web API, and I wanted to see how easily I could get a DXTREME application to work with a Web API data source. I downloaded the Contact Manager Web API sample and running in IIS Express on port 8081. Getting the data in my app was as simple as adding this code to db.js.

 1: $(function() {
 2:     ContactSample.db = new DevExpress.data.RestService({
 3:         url: "http://localhost:8081/api/",
 4:         sources: {
 5:             contacts: {
 6:                 read: "Contacts.json"
 7:             }
 8:         }
 9:     });
 10: });

The included DevExpress JavaScript libraries have functions to retrieve data from different types of data sources. The next step is to make the contact data available by calling the data function from the ViewModel (index.js).

 1: ContactSample.index = function(params) {
 2: 
 3:     var viewModel = {
 4:         contacts: {
 5:             store: ContactSample.db.contacts
 6:         }
 7:     };
 8: 
 9:     return viewModel;
 10: };

The View

DXTREME uses knockout.js for binding data in views to the ViewModels. So, the last thing to do to get the main page up and running is adding a few lines of code to index.html.

 1: <div data-role="view" data-name="index" data-title="Home">
 2:     <div data-target-placeholder="content" >
 3:         <h2 style="padding: 4px">My Contacts</h2>
 4:         <p style="padding: 2px">Contact name, email and twitter handle.</p>
 5:         <div data-bind="dxList: { dataSource: contacts }">
 6:             <div data-dx-role="template" data-dx-name="item">
 7:                 <div data-bind="uri: 'ContactDetail/{ContactId}'">
 8:                     <div data-bind="text: Name"></div>
 9:                 </div>
 10:             </div>
 11:         </div>
 12:     </div>
 13: </div>

Now when we run the app, we get a list of contacts from the Web API service in our app. The page can be viewed in simulators for iPad, iPhone, Android or Android tablets. There are also options to view the simulators in portrait or landscape mode. This is what our page looks like in the iPhone simulator.

Sim

Navigation is also very easy to accomplish in DXTREME. I added a second page to display contact details for a selected contact name with very little effort.

Page2

You can download the entire project here.

The Path Forward

As a next step in your DXTREME learning experience, I recommend downloading a trial version here, and then head over to the DXTREME Learning Center. There is a simple app walkthrough with code and a simulator as well as detailed documentation around more advanced controls, data access, routing and navigation.

I enjoyed building with DXTREME and plan to use it on a couple of personal projects in the near future. I recommend giving the tools a try for yourself.

 

Disclosure of Material Connection: I received one or more of the products or services mentioned above for free in the hope that I would mention it on my blog. Regardless, I only recommend products or services I use personally and believe my readers will enjoy. I am disclosing this in accordance with the Federal Trade Commission’s 16 CFR, Part 255: “Guides Concerning the Use of Endorsements and Testimonials in Advertising.

 

The Dew Review – DevExpress DXv2 WPF 2012.1

Intro

I recently had the opportunity to use a beta release of the WPF controls coming in the exciting new 2012.1 release of DevExpress DXv2. This release is a major one for DevExpress’ WPF suite, the biggest addition being a set of Metro-inspired controls. With these controls, developers will have the ability to create desktop applications that look and feel like Windows 8 Metro apps. I had previously only used the ASP.NET controls from DevExpress, and I was pleasantly surprised at how easy it was to pick up the WPF controls and start using them. Here is a quick review of my impressions.

Install Experience

Even the installer has been given the Metro treatment. It looks cool, clean and simple. It feels more like an application than an installer. Kudos to the team for not forgetting how important first impressions can be. Here are a couple of the installer screens.

installer_welcome

Figure 1 – Installer Welcome Screen

installer_readytoinstall

Figure 2 – Ready to Install

Demo Center

After the installer completes, it launches a Metro-styled Demo Center. There are several WPF demo applications to explore, including Video Rental, Realtor World, a Stock Market Trader and a mail client. The full source is available for each of the demo applications as well. I decided to explore the Realtor World app because it looks and feels like a Windows 8 Metro app.

devexpress demo-center

Figure 3 – The Demo Center

wpf-demos

Figure 4 – WPF Demos

Realtor World includes a main screen with Windows 8 styled buttons to navigate to the other screens in the app. The other screens show off controls like a Metro-styled listbox, graphs and charts. It is a cool-looking app that looks like something you would install from the Windows Marketplace in Windows 8.

realtorworld_home

Figure 5 – Realtor World Main Screen

realtorworld_loancalc

Figure 6 – Realtor World Loan Calculator

WPF Project Templates

When you start a new WPF project, you have a couple of options. You can create a regular WPF Application project, or you can use the DXperience v12.1 WPF Application project template that is included with the controls.

newproject

Figure 7 – The New Project Dialog

If you choose the DevExpress template, you are presented with another dialog where you can choose which features to include in the main dialog of your new application, such as Dock Manager, Toolbar Manager, Ribbon, Grid, Theming and others. Each of those features can be tweaked from the dialog. For example, if you choose to include the dock manager, you can select from different styles for the docked windows. One of the styles looks like Visual Studio tool windows which can be pinned, auto-hide or float. The can look even more like Visual Studio windows if you choose the Visual Studio 2010 theme for your application.

Controls

After playing around with the demos and tools for building a new project, I decided to get down to business and start a new project as if I were building a real application from scratch. When I build WPF apps, always use the Model-View-ViewModel (MVVM) pattern and usually use Laurent Bugion’s open source MVVM Light Toolkit. I found that the DXv2 controls’ data binding just works in MVVM applications.

Overall, the controls are intuitive to use and good-looking too. I built a simple music library application on top of the Chinook database. I used a DXRibbonWindow with the MetropolisDark theme, a BarManager, DockLayoutManager, a GridControl, and the TileLayoutControl. I am still working on enhancing the app, but putting together a nice looking read-only UI took only a few hours.

MyMusicLibary_blend

Figure 8 – Building ‘My Music Library’ in Expression Blend (In Progress)

Summary

I had a lot of fun developing with the WPF controls in DXv2. I am really looking forward to spending more time with the controls and enhancing my application. You can download and try a trial version of the tools today. I think you will be as impressed as I was.

Disclosure of Material Connection: I received one or more of the products or services mentioned above for free in the hope that I would mention it on my blog. Regardless, I only recommend products or services I use personally and believe my readers will enjoy. I am disclosing this in accordance with the Federal Trade Commission’s 16 CFR, Part 255: “Guides Concerning the Use of Endorsements and Testimonials in Advertising.

 

Dew Drop – April 11, 2011

Top Links

 

.NET / Visual Studio

 

Web Development

 

Design / Methodology / Testing

 

Silverlight / WPF / Windows Phone

 

Podcasts / Screencasts / Videos

 

Community / Events

 

Database

 

SharePoint

 

Miscellaneous

 

More Link Collections

 

The Geek Shelf

jQuery 1.4 Animation Techniques: Beginners Guide by Dan Wellman