# Tuesday, December 29, 2009

Looking forward to 2010, but here is a funny year in review from our friends at JibJab:

Try JibJab Sendables® eCards today!
posted on Tuesday, December 29, 2009 11:42:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback

With long  travel delays due to snowstorms and terrorism, I got to catch up on some of my reading. One book I read over the break that stood out was an unexpected one: Essential Silverlight 3 by Ashraf Michail. I say it is an unexpected one since the book is not about building business applications with Silverlight so you won’t see a chapter on MVVM or using WCF and asynchronous services. What you will see is a discussion of the internals of Silverlight, the guts of a ZAP file, and how media, layout, text, input, data binding, and the like work.

You maybe thinking, “I am a developer, I don’t care about vector graphics!” I thought the same but read the book anyway and learned a lot about how Silverlight works and how to best debug and performance tune an application. Maybe I am biased since I work at a company that has to know all of the details of the .NET framework to make our products work, however, I think that every developer should take a look “under the hood” and see how Silverlight works.

Ashraf has a very engaging writing style and the book is a quick read, I read it over the course of two or three days (on airplanes and in airports!) He breaks down the chapters really nice and the last part of each chapter is called “under the hood” where you learn something about the internals of Silverlight. I must admit that I did skim some of the advanced material about animations and wrote a note to come back to it if I need to, but the chapters on vector graphics, GPU acceleration, the Silverlight application architecture, and data binding were truly fascinating and will help me with all of my business applications.

If you are new to Silverlight this is the first book you should read, then pick up a book on building applications with Silverlight. If you have been using Silverlight for a while and want to take your development to the next level, read this book as well-epically the “under the hood” sections.

Lastly, if you use Silverlight in a Virtual PC, you will care about vector graphics!

image

Technorati Tags:
posted on Tuesday, December 29, 2009 6:35:08 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Monday, December 28, 2009

About a week ago, I showed a simple demo on my blog of SQL Server PowerPivot for Excel, or just PowerPivot for short. I used SQL Azure as my backend and just did a mapping to a few Northwind tables and then built a pivot table using the Order Details table.

Today I will take that example one small step further and write a custom TSQL query and build a more advanced pivot table against that data source.  In a future post I will build a PowerPivot example against a true OLAP Cube, but that will have to wait for the new year. :)

Here is a TSQL query that shows an Order and joins to get the Product Name and Category as well as the Employee and Customer names. We also do a DATEPART() to get the order year off the Order Date. In addition we also calculate the Total Price. This will allow us to do many different sorts and groupings in a pivot table. The TSQL is here:

Select
od.orderid, o.orderdate,datepart(MONTH,o.orderdate) as OrderMonth,
datepart(YEAR,o.orderdate) As OrderYear,
emp.FirstName + ' ' + emp.LastName as EmployeeName,cust.CompanyName,
cust.City, cust.Country,
cat.CategoryName, p.ProductName,
((od.UnitPrice*od.Quantity) * (1-Discount)) As TotalPrice
from dbo.[Order Details] od
    inner join dbo.Products p
on od.productid=p.productid
    inner join dbo.Categories cat
on cat.CategoryID=p.CategoryID
    inner join orders o
on od.orderid=o.orderid
    inner join dbo.Employees emp
on emp.EmployeeID=o.EmployeeID
    inner join dbo.Customers cust
on cust.customerid=o.customerid

Now we have to connect to our SQL Azure database in PowerPivot. To do this, follow the instructions I placed on my blog last week to connect. After you connect, instead of choosing tables to connect to, choose the query option. Put in the TSQL from above and give your query a friendly name like Steve1 in PowerPivot (or rather NorthwindOrderDetails since we will be using this in our pivot table). Now you can use this query and its data to build a pivot table.

image

Building the PivotTable is pretty easy. Let’s use the TotalSales as our main value and Category Name and Product Name as our row labels. That means that we will see Category and be able to drill down into Product and get a sum for that category or product for each City (the field we choose for our column.) In addition we added a filter for Country that will allow us to see a drop down of each Country and we can filter for as many countries as we want. Lastly, we can add a “vertical slice” of Order Year that will add an additional filter in a graphical style. This filter is applied after your main filter (Country.)

image

I did this part in under a minute. This gives the user an extremely powerful pivot table and the ability to do some pretty sophisticated drill downs and filters. In addition, it is pretty easy to add/remove even more data (Customers and Employees for example) to this pivot table.

image

Enjoy!

posted on Monday, December 28, 2009 5:33:56 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Sunday, December 27, 2009

Here is a special holiday message from Telerik!

PS: I did not make the video cutoff due to travel delays from Hong Kong to the snowstorm on the East Coast.

Enjoy!

posted on Sunday, December 27, 2009 9:26:59 PM (Eastern Standard Time, UTC-05:00)  #    Comments [1] Trackback
# Monday, December 21, 2009

At the PDC Microsoft released the Sync Framework Power Pack for SQL Azure tool. It is a tool built on top of the Sync Framework 2.0 that provides a wizard to keep an on-premises and SQL Azure database in sync as well as a Visual Studio template where you can take a SQL Azure database offline using SQL Compact (or whatever they call it these days.) Lets take a look at the data sync wizard today and soon look at the Visual Studio template.

I started the wizard via Start|Microsoft Sync Framework|SQL Azure Data Sync Tool for SQL Server. The wizard works by taking a database that is on-premises and creating a new one in SQL Azure and creating the SQL Agent jobs to keep them in sync. I could not find out how to sync two identical databases that already exist. To get started you need to provide your SQL Azure credentials and then the name of the new database that you are going to create in SQL Azure.

image

After you provide your credentials for your local server and select a database, you have to select a database to sync with. The next screen shown here allows you to select the tables you want to keep in sync. You also get to choose who wins in a conflict, the local server or SQL Azure.

image

Next you get to choose the order of your sync. This is a very smart feature, you get to say sync in this order to avoid the classic order detail missing order id problem.

image

After you finish up the wizard, it will go ahead and create the new database in SQL Azure for you as well as the tables and associated tracking tables. It will also create the SQL Server Agent jobs required to keep the data in sync. I noticed that on my local server I did not have SQL Agent running, so no sync was performed and after the wizard ran I had no data. So I had to go into SQL Server Agent and enable it and change the default schedule of my job (which was daily at midnight.)

image

You may want to get more creative with the SQL Server Agent schedule depending on your environment, however, the Data Sync wizard is a handy tool to get you started.

Enjoy!

Technorati Tags:
posted on Monday, December 21, 2009 5:59:41 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Saturday, December 19, 2009

While I love Northwind, would do anything for Northwind, I realize that there really is not enough data in Northwind for meaningful demos. We’ve been using Northwind for 15+ years and the reason why we have not completely abandoned Northwind is because AdventureWorks is such crap. Someone at Microsoft took a relational pill one day and over relationalized AdventureWorks to 100th normal form. It takes about 7 joins to get a list of unique customers and their mailing addresses. Microsoft has admitted their mistake and given us “AdventureWorks Lite” a slimmed down version of AdventureWorks with less joins and less pain in the you know what. (Only 3 joins to get the customers and their mailing addresses.) In addition to ADLite, Microsoft has also given us a data warehouse version of AdventureWorks in star schema for BI testing called AdventureWorksDW.

You can now easily load these databases into SQL Azure. The databases were released on CodePlex along with a loading script that you have to run from the commandline. Be careful, the Datawarehouse database is larger and can cause a timeout on a slow connection, forcing you to do it over again.

image

Enjoy!

posted on Saturday, December 19, 2009 9:45:12 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Friday, December 18, 2009

The Astoria (aka ADO.NET Data Services) team released an updated .NET 3.5 SP1 version of Astoria the other day. There are tons of great new features like projections and my favorite, an inline row count. As I said on my blog yesterday, you have to alert Astoria that you want to use the new V2 features, by default Astoria 2.0 runs in Astoria 1.0 mode. (For backwards compatibility.)

Telerik has enhanced the Data Services Wizard to support Astoria 2.0 (officially the “Data Services update for .NET 3.5 SP1” but I digress….)

Now if you have the updated Data Services DLLs on your machine, you will have the option to create a service using V1 or V2. If you choose V2, we will automatically set the MaxProtocolVersion property to V2 for you.

12-17-2009 5-38-01 PM

Happy Data Servicing!

Technorati Tags: ,
posted on Friday, December 18, 2009 5:41:52 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Thursday, December 17, 2009

The Astoria (aka ADO.NET Data Services) team released an updated .NET 3.5 SP1 version of Astoria last night. This version of Astoria is an inplace update and will overwrite your current version of Astoria (System.Data.Services.*.dll). You can download it from the following locations.

The new version of Astoria has some very useful and powerful features. They include projections, data binding, row count, feed customization, server based paging and better BLOB support. There is one small issue, in order to support these new features you have to tell the framework you are using the new version of Astoria. For backward compatibility reasons, by default Astoria will work in “1.0” mode and none of the new features will work out of the box. To take advantage of the 2.0 features, you have to make two minor changes to the InitializeService method:

   1:  //change the IDataServiceConfiguration to DataServiceConfiguration
   2:  public static void InitializeService(DataServiceConfiguration config)
   3:  {
   4:      config.SetEntitySetAccessRule("*", EntitySetRights.All);
   5:      //take advantage of the "2.0" features
   6:      config.DataServiceBehavior.MaxProtocolVersion =
   7:          System.Data.Services.Common.DataServiceProtocolVersion.V2;
   8:  }

The first thing that you need to change is on line 2, change the interface IDataServiceConfiguration to be just DataServiceConfiguration (I am sure that there is a better way to do this, I have not figured it out yet.). Next, set the MaxProtocolVersion property of DataServiceBehavior to V2. After that you can take advantage of all the new features!

I want to take advantage of my favorite new feature, the inline row count. (I have been asking over and over for this feature, so: Thanks Astoria team!!!) The inline row count will return the number rows in the data feed regardless of paging ($skip, $top etc) as an XML element: <m:count>. This new property makes our RAD Grid and other paging aware controls much easier to perform paging. To make this work, you just add the inlinecount to the querystring:

servicename/entityname?$inlinecount=allpages
 

Let’s implement this with the example I did the other day using Telerik OpenAccess and the Data Service Wizard. If you remembered I built a simple Astoria 1.0 service exposing the Customers entity. We built this using “Astoria 1.0”, however, I upgraded my machine with the release of Astoria 2.0. When I use inlinecount, I get a 404 error. As with a brand new service, we have to tell the framework what version of Astoria we want to use before we can take advantage of inlinecount. I made the same changes as I did above (DataServiceConfiguration and MaxProtocolVersion ) and reran my application. Now when I type this URL: http://localhost:1191/WebDataService.svc/Customers?$inlinecount=allpages&$top=2

I get only the top two records but the total count of records.

image

Awesome.

Enjoy Astoria 2.0!

PS:

I thought that this was called “WCF Data Services”? According to the Astoria team blog:

Since this release is an update to the .NET Framework 3.5 SP1 we kept the name consistent with what was used in the 3.5 SP1 timeframe so that printed documentation, etc is consistent.  Going forward in .NET 4 and onwards you’ll see us use WCF Data Services.

Technorati Tags:
posted on Thursday, December 17, 2009 3:51:54 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Wednesday, December 16, 2009

Far and away the number one Business Intelligence client in the world is Microsoft Excel. While there are tons of data visualization tools out there, Excel is hands down the leader since it is both familiar to users and very powerful. Developers have built tons of business intelligence (BI) apps in Excel using connections to data warehouses (or cubes) and letting the users go crazy with pivot tables and charts.

Things are about to get even better with project Gemini or now  Microsoft SQL Server PowerPivot (we rebel and just call it PowerPivot).  PowerPivot is an add-in for Excel 2010 or Sharepoint. PowerPivot for Excel is a data analyses tool that allows you to connect to a database, download data and store it in a local data engine (VertiPaq) so you can slice and dice it to your heart’s content using familiar Excel tools such as pivot tables and charts. (You can then send it up to SharePoint if you like, but let’s just focus on Excel for now.) PowerPivot works in-memory using your local PC’s processing power and is optimized to handle millions of rows in memory on cheap commodity PCs. The VertiPaq OLAP Engine that is part of PowerPivot  compresses and manages millions of rows of data in memory for you.

There are many awesome features of PowerPivot, but something I learned reading the team’s blog on data importing was that PowerPivot supports SQL Azure natively. This scenario is great since you can download your SQL Azure data, store it locally and slice and dice offline.

Let’s imagine you have this set up in SQL Azure:

  • SQL Azure cloud based online-transaction processing database (OLTP)
  • SQL Azure cloud based online analytical processing data warehouse database  (OLAP)

You don’t have a local server to set up some Analysis services cubes and SQL Azure doesn’t provide that capability. You decide on a hybrid solution and provide a “self-service” distributed OLAP system. Your users, using Excel and PowerPivot, download from the cloud some of the OLAP data from SQL Azure and use their own hardware to do the number crunching. You maybe thinking, “I heard that this VertiPaq engine is great, but how will a laptop handle all of this data/processing?”  Remember if you architect your OLAP database properly, there will be a lot of “pre-crunching” already done, avoiding many segmentations and rollups. I tested about 100 million rows (of old Corzen data) on the “PDC laptop” with 2 GB of RAM and had near instantaneous results.While the cloud is real sexy right now, you can’t perform these type of operations without major latency.

Let’s walk through the basics, just getting some data from SQL Azure into Excel and PowerPivot. First you need Excel 2010 and PowerPivot. You can grab Excel via Microsoft’s web site for free (for now!) since it is in beta and PowerPivot from here. Make sure you download the proper version: x32 or x64.

Once installed, you will see a “PowerPivot” tab in Excel. You can click on on the PowerPivot window icon to get started.

image

The PowerPivot tool is mostly for managing data and connections. You can import data from a variety of data sources, including databases, files,  and services (including RESTful ones.) To connect and download from SQL Azure you have to choose From Database|From Other Sources from the Home tab on the ribbon.

image

This will bring you to a list of available data sources, choose Microsoft SQL Azure.

image

Of course, you will need to log into SQL Azure.

image

Once logged in, you can download data either from a TSQL query or just the tables and views raw. I choose to download just the tables from my Northwind database.

image

There are come cool features like the ability to select one table and then automatically select all related tables. You can also specify some filters to your imports (good if you are segmenting the data by user.) Once you are finished, PowerPivot will now import all of your data for you.

image

Now that your data is in PowerPivot you can play with it very easily. Remember that the data is located on the client in-memory as part of your workbook. (It is compressed.) PowerPivot gives you a tab for each data table you imported and you can go in and in typical Excel fashion, sort and filter, like I did for Barcelona (oh the fond memories of 5 TechEds in Barcelona…..) All of this sorting and filtering is happening in-memory on your machine, you can unplug your network cable if you like, however, you can also refresh your data as you need.  PowerPivot gives the developer several ways to refresh data. Some techniques and guidelines are here.

image

Next you can create some PivotTables, charts, or combination. Just choose PivotTable from the Home menu and then choose a PivotTable type. I will just make a dirt simple Pivot table to give you an idea of some of the interactivity you can build pretty rapidly. (I am also using the OLTP version of Northwind for this walk through, so I did not create any cool queries to work with yet. I’ll do another blog post with some more sophisticated demos after the holidays.)

image

Here is a very simple, yet super powerful PivotTable that I built in 30 seconds using the PowerPivot tools. Of course I just used the raw Order table and my lookups (ShipVia and Employee) are showing their integer value, but work with me. I have a pivot table where I can view the total amount each customer spent on freight in all of our orders,by country/city broken out by the employee who took the order. I can also dynamically filter the data set by the Country and also further filter it by the ShipVia data set.

This creates a very interactive data analysis “report” for your users. (Or they can create it themselves if they are Excel savvy.) In a few seconds the users can see multiple versions of the data, changing the filters (and sorts) on the fly. All shippers in all cities for all employees. No problem. Shipper ID 2 in USA only. Sure. You get the drift. (What is cool is that the users can share this via PowerPivot for SharePoint if they like!)

image

Here is what I did:

I Dragged the ShipCity and CustomerID to the “Row Labels” box to use ShipCity and CustomerID as the main data elements in our rows. I dragged Freight into the Values box to sum on freight for each CustomerID. (Customers have many orders with different freight costs, so freight is a good item to sum up.) I choose Country as a dynamic filter and will break out the Freight totals by EmployeeID (in the Column Labels box). Lastly, I added a Vertical Slicer where I see a slice of all shippers (ShipVia) and can do additional filters on all current data selections.

Pretty easy. Now combine this with some pre-built views on the server and your users can really go to town. All without a persistent connection back up to SQL Azure.

Enjoy!

Technorati Tags: ,
posted on Wednesday, December 16, 2009 5:14:02 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Tuesday, December 15, 2009

Last week Telerik released the December CTP of the Data Services Wizard. I posted on my blog a video that shows how to get started, however, for those of you that like walkthroughs better, here is one using a WCF Data Services (Astoria) service.

Getting Started: Mapping Data With OpenAccess

To get started, first download and install the Data Services Wizard. After that, fire up Visual Studio and create a new Class library application named Telerik.DSW.Demo.Astoria.DAL. Run the OpenAccess “Enable Project to use ORM” wizard and then run the Reverse Mapping Wizard and map to your database. For this demo I mapped the Northwind database.

Map as many tables as you like, you can also manually remove the complex properties (Customer Collection from the Order entity for example) via the mapping wizard if you want to use that entity in your service. (Don’t worry we will have a solution for this when we have our January beta!)

Note: your wizard may not have created the ObjectScopeProvider in your DAL project. If you don’t have one in your DAL project via the main menu choose Telerik|Open Access|Configuration|Connection Strings. Then select the ObjectScopeProvider check box showed in the dialog below and click on ok.

image

Next Up: Using the Wizard

The WCF Data Service that the wizard will create has to reside in another (Web) project. So let’s create a Web project named Telerik.DSW.Demo.Astoria.Web.

image

Now it is time to start the wizard. Just select from the main menu Telerik|Data Services Wizard.

image

This will bring up the first page of the wizard, Select DAL Project. Here you select the name of the project that has your OpenAccess entities. Select the DAL project and click Next.

image

The Select Data Service screen is where you have to enter in some important information.

First put in the namespace, this is the namespace of your web project. (Future versions of the wizard will default to this namespace), and the name of your service, I choose Northwind as my creative service name. Also select which entities to generate as part of your service. I choose Customer, Order, and OrderDetail. Lastly, select which type of Service to create, in this case a WCF Data Service (our wizard did not catch up with the name, so you have to select ADO.NET Data Service (Astoria).)

image 

After you click next, you can preview the generated code on the View Output screen.

image

Click next and then you will be asked to choose which project to add the service to on the Finish screen. Select the web project, or Telerik.DSW.Demo.Astoria.Web and click next.

image

Now the wizard does a lot of work for you.

First it sets a reference to all of the WCF Data Services libraries (System.Data.Services and System.Data.Services.Client.) Next it sets a reference to the DAL project for you (in our case Telerik.DSW.Demo.Astoria.DAL) and also sets a reference to the Telerik OpenAccess DLLs for you (Telerik.OpenAccess and Telerik.OpenAccess.Query.) Lastly, the wizard created the Northwind.cs OpenAccess reference file as well as the actual data service (svc and cs) files.

image

The last step is to run the service. Just right click on the SVC file and choose View in Browser from the context menu. You will see your RESTful service come up in the browser. From here you can set up a client to consume the service in ASP.net, Silverlight, or any other Microsoft and non-Microsoft technology.

image

Enjoy!

Technorati Tags:
posted on Tuesday, December 15, 2009 5:06:18 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Monday, December 14, 2009

Thursday, December 17, 2009
Application Development for the Windows Azure Platform

Subject: 
You must register at https://www.clicktoattend.com/invitation.aspx?code=143228 in order to be admitted to the building and attend.
At PDC 09 Microsoft did announce commercial availability of the Windows Azure Platform. This presentation will cover the key features of the Windows Azure distributed fabric based operating system that make it possible to build applications leveraging distributed computation and storage capabilities in the cloud. It will also cover higher-layer .NET Services such as SQL Azure, Microsoft’s distributed SQL Server database in the cloud and the .NET Services that provide extended connectivity and security across cloud and on-premise applications.
The focus will be on developing applications using the various platform APIs for development, deployment and management of Windows Azure Platform services.

Speaker: 
Bill Zack, Microsoft
Bill Zack is an Architect Evangelist with Microsoft. He comes to this role after serving as a Solutions Architect in the Financial Services Group of Microsoft Consulting Services. His experience includes developing, supporting and evangelizing .NET/SOA based frameworks used to jump-start development projects for financial services companies. Prior to joining Microsoft he acted as a Consultant, Architect, Administrator, Developer, and System Integrator. He has also authored several computer books and white papers. He is the Founder and President of the New York chapter of the International Association of Software Architects (IASA) and a member of the IASA Board of Directors He is also Co-Moderator of the New York City .NET Developers Group, founder and past president of the New York Enterprise Windows User Group, and the founder and past president of several other computer user groups.

Date: 
Thursday, December 17, 2009

Time: 
Reception 6:00 PM , Program 6:15 PM

Location:  
Microsoft , 1290 Avenue of the Americas (the AXA building - bet. 51st/52nd Sts.) , 6th floor

Directions:
B/D/F/V to 47th-50th Sts./Rockefeller Ctr
1 to 50th St./Bway
N/R/W to 49th St./7th Ave.

Technorati Tags:
posted on Monday, December 14, 2009 3:38:48 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Friday, December 11, 2009

As a person who gives a lot of presentations, I was looking forward to reading Confessions of a Public Speaker by Scott Berkun. I figured that I could gain some insight from another speaker and pick up a few tips. The book was far better than that! I learned a tremendous amount about how to prepare and deliver professional presentations in a very relaxed and enjoyable way. The book was very readable, funny, and quite informative. Scott shares with us his secrets and emphasis on preparation, and how being prepared can get you out of trouble if things start to go wrong in your presentation.

Scott tells a great story and gives great advice both to people new to speaking and folks like me who have been doing it a long time. Scott's style and good humor will make the book interesting for people who don't have to give presentations as well. His stories are honest as well as funny and make reading the book quite enjoyable. Lastly, I read this book in the Kindle format and was quite impressed with the layout and graphics (these days if it is not on the Kindle it doesn’t exist to me.)  I highly recommend it to everyone needing to communicate effectively.

image

posted on Friday, December 11, 2009 1:27:17 AM (Eastern Standard Time, UTC-05:00)  #    Comments [1] Trackback
# Thursday, December 10, 2009

This week we released our third “alpha” CTP build of our Telerik OpenAccess Data Services Wizard on Telerik Labs. We have received tons of feedback on the tool and look forward to more feedback. The wizard’s development team and the entire OpenAccess team have come up with a roadmap and would like some feedback from the community on it. In the spirit of a transparent design, I am going to publish the entire roadmap here for community review. Of course all of this can change blah blah blah. (The lawyers made me say that.)

Beta 1: January 2010

  • Using T4 Code generation instead of text templates
  • VB.NET code generation (we had a ton of requests for this one!) 
  • Add WCF Data Services 1.5 full integration using the new Data Service Provider (of course we need to make changes to OpenAccess core to implement the DSP, however, the DSP is currently not fully documented by Microsoft, so we don’t know how much work this is just yet.)
  • Generate only the primitive types and prevent generation of complex entities for all services. (WCF barfs on complex types and entities.)

Beta 2: February 2010

  • Full support for WCF RIA Services
  • Full support for Azure Services
  • If you use the wizard to build a service, give you the option to automatically create a Silverlight client along with some code generation to consume the service to get you started
  • ASP.NET Dynamic Data support

Release: Telerik Q1 2010 Release

  • Full integration with OpenAccess’ installer. No longer making the wizard a separate install, it will just install as part of OpenAccess
  • Use of OpenAccess internal APIs
  • Visual Studio 2010 support
  • WCF 4.0 Support. We currently require the WCF 3.5 REST Starter Kit for two of our output modes: REST Collection and AtomPub. .NET 4.0 mode will eliminate this dependency and give you the option to produce WCF 4.0 REST services, etc.

After the Q1 release the roadmap is not super clear. I will assume that core development will slow down a little and that we will then focus mostly on adding support for new service types. I am sure that by next spring, there will already be some new service types to support like the release build of WCF RIA Services, maybe a new CTP of Astoria, etc.

Drop me a line and let me know what you think! Also, the tech support team is adding a separate Data Service Wizard forum in the Telerik support forums, so even though the wizard is technically a “lab” project and not supported, drop by and ping the team with your questions there. We’ll answer all your support questions there as well.

Enjoy and thanks for any feedback you send.

Technorati Tags: ,
posted on Thursday, December 10, 2009 8:10:33 AM (Eastern Standard Time, UTC-05:00)  #    Comments [1] Trackback
# Wednesday, December 09, 2009

Telerik released the December CTP of the Data Services Wizard earlier this week. Here is a video by .NET Ninja in training Peter Bahaa on using the wizard:

Telerik OpenAccess Data Services Wizard December CTP from Stephen Forte on Vimeo.

Technorati Tags: ,
posted on Wednesday, December 09, 2009 10:33:31 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Tuesday, December 08, 2009

When: Friday, December 18, 2009, 6:30-10pm
Where: Microsoft NYC Headquarters, 1290 Avenue of the Americas, MPR room, 6th Fl
Sponsored by: Microsoft
Limited Advance Sale Tickets: $15 (per person)
http://www.ggdnyc.com/?page_id=14

You’re invited to an evening of conversation, inspiration and dinner! Join us to mix and mingle with other women working in technology. Dinner, dessert, wine and beverages will be served. We’ll culminate the evening with a raffle to win great prizes. The first 50 people to purchase tickets online will receive a gift bag from Microsoft.
Subject & Speakers:
Bonnie Halper, Founder of StartupOneStop.com
Peter Laudati, Developer Evangelist, Microsoft
Melek Pulatkonak, President & COO of Hakia.com

*Please Note* Tickets for this event can be purchased online only. Tickets are non-refundable. If you want to bring a guest, you must purchase a ticket for them. Attendees must bring photo identification and order number to event. There will be no ticket sales at the door.

flyer

posted on Tuesday, December 08, 2009 7:42:06 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Monday, December 07, 2009

We are proud to announce our December CTP of the Telerik OpenAccess Data Services Wizard (formerly known as the WCF Services Wizard). The Data Services Wizard (DSW) allows you to easily create a CRUD data service layer for your application. The DSW does this by using a data access layer already built by OpenAccess and automatically generating the C# code for your endpoints. The types of endpoints you can create are:

  • WCF Data Services (FKA Astoria and also FKA ADO. NET Data Services)
  • Raw WCF endpoints
  • WCF REST Collection endpoints
  • WCF ATOMPub endpoints

This version of the Data Service Wizard is very robust; we have made lots of changes based on your feedback. Our #1 piece of feedback from customers has been to integrate the DSW with OpenAccess and Visual Studio. I am proud to announce that in this version the DSW is fully integrated with Visual Studio!

We have also started to integrate the DSW into the OpenAccess product itself. No longer is the DSW a standalone product; the wizard is now  located under the “Telerik” menu in Visual Studio and looks like the other OpenAccess wizards. Integration will get tighter in the near future and soon just be part of OpenAccess proper, not a separate download.

The basics of the wizard are the same. The DSW will ask you which project your OpenAccess entities are located in and then which entities you will expose in your endpoint.

ScreenShot1

After you choose the entities you want to expose and what type of service you want to build (WCF, Astoria, etc), you can preview the code that is generated.

ScreenShot2

A major improvement with the December CTP is that you can now automatically insert these service endpoint files into a project, eliminating the manual step of copying them on over. This will make building the services so much easier!

image011

Go grab the wizard here. It is still considered a Telerik Labs project, but we will move it to a fully supported beta in January with our next build. On the dock for the next build (early January) are:

  1. Using T4 Code generation instead of text templates
  2. VB.NET code generation
  3. Add WCF Data Services 1.5 full integration (using the new Data Service Provider)
  4. Prevent the generation of complex entities for all services

Future versions of the product will be fully part of OpenAccess and will also support RIA Services, Azure Services, and Visual Studio 2010 and WCF 4.0. Download today and send us feedback!

posted on Monday, December 07, 2009 9:39:31 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Friday, December 04, 2009

I was talking to a fellow MVP here in Hong Kong today about the PDC. He said that since I get to go to all of these events as a speaker it must be great to watch all of the sessions and learn about all of the new technology. The problem is that when you are speaking you almost never get to attend other sessions. If you have a few sessions, you are always either getting ready, speaking, or relaxing after your talk. (Believe it or not, it is tiring to speak at these events.)

I only had one talk at the PDC and it was a BOF, so I did get to attend a few sessions. The funny thing is that I circled 10 sessions. Three where when I was speaking, two had conflicts with others, one was at 8:30am, and one conflicted with a RD meeting. So I attended 3 sessions besides the keynotes. That actually is a lot for me at one of these events.

The good news is that the PDC puts all of its sessions online for free. Why free? Read the book “Free” by Chris Anderson, it will explain how putting the sessions online for free actually increases the prestige of the conference and allows them to make more money.

You can watch all of the videos online for free at the PDC website. If you want to watch them offline you can also download all of the videos to your hard drive. The directions are on the PDC page, however, I had to use the 32 bit version of the cURL tool to get it to work on x64 Windows 7 for some reason. You may want to download the X32 version and save yourself the trouble.

Now you can download all the videos and watch them at your own pace.  I have watched about 15 sessions in the past two weeks since I have been home. Enjoy!

image

posted on Friday, December 04, 2009 1:27:33 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Wednesday, December 02, 2009

Yesterday I showed how to use Telerik OpenAccess, Telerik Reporting, and SQL Azure to create reports and view them in ASP.NET. Today i will show how to view that same report in Silverlight using the industry’s first native Silverlight report viewer. All of this is in the Telerik documentation, however, since we have our cool SQL Azure demo already up and running from yesterday, I figured it would be fun to show how to reuse the same report and view it in Silverlight.

Getting Started

Remember from yesterday that we have three projects in our solution:

  • Telerik.Reporting.DAL-the class library project containing our OpenAccess entities (mapped back to SQL Azure tables)
  • Telerik.Reporting.RptLib-the class library project containing our Telerik report using the DAL project as a data source
  • Telerik.Reporting.Web-the ASP.NET application containing our Report Viewer control, allowing the users to view the report

Now we will add a Silverlight project named Telerik.Reporting.SL that will use the Telerik.Reporting.Web application as its ASP.NET host.

image

The Telerik Reporting WCF Service

Since all data access in Silverlight has to be an asynchronous service, we have to send our report down to our Silverlight application as a WCF service. At the end of the day a Telerik Report is just a plain old .NET class, so we can easily send it down via WCF. The good news is that a lot of the WCF plumbing has been taken care of for you by the Telerik Reporting service. Let’s get started.

First we have to set a reference in our ASP.NET host application (Telerik.Reporting.Web) to Telerik.Reporting.Service. Next add a WCF service to your project, named ReportService.svc. This will also automatically add a reference to System.ServiceModel for you.

Now delete everything in the SVC file and replace it with this:

<%@ServiceHost Service="Telerik.Reporting.Service.ReportService, Telerik.Reporting.Service, 
Version=3.2.9.1113, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE" %>

Note: you have to make sure that the version number you are using is the same as mine. You can get your version number by clicking on the Telerik.Reporting.Service reference in the solution explorer and looking at the version property.

image

Next you will have to add the WCF endpoint to the configuration section of the web.config of the same ASP.NET project that has the ReportService.svc WCF service. (You can copy this code to paste as is into your application from the Report Service support page.)

 
 <system.serviceModel>
   <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
   <services>
     <service name="Telerik.Reporting.Service.ReportService" 
        behaviorConfiguration="ReportServiceBehavior">
      <endpoint address="" binding="basicHttpBinding"
        contract="Telerik.Reporting.Service.IReportService">
         <identity>
           <dns value="localhost" />
         </identity>
       </endpoint>
       <endpoint address="resources" 
          binding="webHttpBinding"
          behaviorConfiguration="WebBehavior" 
          contract="Telerik.Reporting.Service.IResourceService"/>
       <endpoint address="mex" binding="mexHttpBinding" 
          contract="IMetadataExchange" />
     </service>
   </services>
   <behaviors>
     <serviceBehaviors>
       <behavior name="ReportServiceBehavior">
         <serviceMetadata httpGetEnabled="true" />
         <serviceDebug includeExceptionDetailInFaults="false" />
       </behavior>
     </serviceBehaviors>
     <endpointBehaviors>
       <behavior name="WebBehavior">
         <webHttp />
       </behavior>
     </endpointBehaviors>
   </behaviors>
 </system.serviceModel>

 

That is it for the Telerik WCF Reporting Service. Now let’s add a ReportViewer to our Silverlight application.

Using the Telerik Silverlight Report Viewer Control

The Telerik Silverlight Report Viewer offers native report viewing support for Silverlight. It uses the same rendering engine and offers the same functionalities as the other Telerik viewers, so your report will render the same in Silverlight as in Windows Forms as ASP.NET. To get started, you need to add a reference to the Telerik Silverlight controls in your Telerik.Reporting.SL project:

  • Telerik.Windows.Controls.dll
  • Telerik.Windows.Controls.Input.dll
  • Telerik.Windows.Controls.Navigation.dll

These controls are located in the following folder:

Program Files\Telerik\RadControls for Silverlight Q3 2009\Binaries\Silverlight\

In addition, you need to add a reference to the ReportViewer:

  • Telerik.ReportViewer.Silverlight.dll

This library is located in Program Files\Telerik\Reporting Q3 2009\Bin\

Lastly, add a reference to our report project: Telerik. Report.RptLib.

Now you can add the report viewer namespace and control to your XAML:

   1:  <UserControl
   2:      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
   3:      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   4:      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
   5:      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
   6:      mc:Ignorable="d" 
   7:      xmlns:Telerik_ReportViewer_Silverlight=
   8:       "clr-namespace:Telerik.ReportViewer.Silverlight;
   9:        assembly=Telerik.ReportViewer.Silverlight" 
  10:      x:Class="Telerik.Reporting.SL.MainPage"
  11:      d:DesignWidth="640" 
  12:      d:DesignHeight="480">
  13:    <Grid x:Name="LayoutRoot">
  14:        <Telerik_ReportViewer_Silverlight:ReportViewer 
  15:          Margin="0,0,20,8" 
  16:          ReportServerUri="../ReportService.svc" 
  17:          Report="Telerik.Reporting.RptLib.CustomerRpt, 
  18:              Telerik.Reporting.RptLib, Version=1.0.0.0, 
  19:              Culture=neutral, 
  20:              PublicKeyToken=null"/>                                                  
  21:    </Grid>
  22:  </UserControl>

 

Note: The Telerik support page for the Silverlight Report Viewer is a good reference for the code needed and you can copy and paste from there instead of from here. Alternatively, you can use Expression Blend to add the report to your XAML form and you don’t have to worry about the namespaces and XAML for the ReportViewer, Blend will take care of that for you, all you have to worry about are the ReportServiceUri and Report properties. If you are not using Blend, just make sure that the properties are in the correct order in the XAML (ReportServiceUri first, Report second) or you will get some nutty bugs. (Ask me how I know this!)

You are going to have to set two properties of the ReportViewer control (either manually in XAML or in Blend):


  • ReportServiceUri: or the absolute or relative path back to the WCF service in the ASP.NET solution
  • Report: or the assembly qualified name of your report class

<Sidebar>

How to find the assembly qualified name of your report? I was confused at first too. There are some PowerShell tools, etc, but I am PowerShell challenged. Instead, just add a label to an ASP.NET WebForm in the Telerik.Reporting.Web project and on the page load event add this code:

   1:  Type ty = typeof(Telerik.Reporting.RptLib.CustomerRpt);
   2:  Label1.Text = ty.AssemblyQualifiedName;

Then run the page in the browser and copy and paste the fully qualified assembly name into your XAML as I did. :)

</Sidebar>

That is it. Next step is to set your Slverlight test page as startup and F5. The ReportViewer supports native printing and export capabilities to PDF, XLS, Excel, etc. Pretty cool.

image

Enjoy!

Technorati Tags:
posted on Wednesday, December 02, 2009 7:20:54 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback
# Tuesday, December 01, 2009

Telerik Reporting is a great reporting package. If you using it, you may be happy to know that you can use Telerik OpenAccess as a data source. Let’s take a look at how to use it with a SQL Azure Database as a back end.

Getting Started

First you need to map your SQL Azure tables to OpenAccess entities. I demonstrated this before on my blog, if you have not used OpenAccess and SQL Azure yet, read this post. (Don’t worry I’ll wait.) What I did for this demo is create a library project called Telerik.Reporting.DAL and mapped all of the Northwind tables in my SQL Azure database to OpenAccess entities in a class library.

Next I created another library project to contain the reports called Telerik.Reporting.RptLib. This solution will contain all of your reports. It is good to create all of the reports inside one isolated solution so you can reuse these reports in an ASP.NET solution as well as other projects like Silverlight. After we created this project, I ran the OpenAccess enable project wizard to get all of the proper references set up to use OpenAccess. In addition, I set a reference to our Telerik.Reporting.DAL project so we can see the entities we just mapped.

Creating a Report

Now it is time to create a report. Just right click on the project and select Add| New Item and choose the Telerik Report Q3 2009 template from the Reporting category.

image

The Telerik Reporting Wizard will come up. Select the option to build a new report and a new data source. For a data source type, select Business Object from the options available.

image

Next drill down into the Telerik.Reporting.DAL namespace and then select the Customer entity.

image

The next few pages of the wizard ask you how to lay out your report and what data fields to choose from. The wizard is self explanatory, so I will not go into detail here, but just choose any style that you like and show some customer fields on the report. I choose to show Customer ID and Company Name in standard report. My report looks pretty basic in design view:

image

 

Wiring up the data

We are almost there. Next step is to write a little LINQ code behind your report to wire up the OpenAcces data source with your report. Right click on the design canvas of the report and select “View Code.” That will take you to the code behind. Create a function like the one below that uses the OpenAccess LINQ implementation and return all of the customers (We could more complex LINQ queries here if we wanted to. )

   1:  public static List<Customer> GetCustomers()
   2:  {
   3:      //LINQ Query to fetch all of the Customers via OpenAccess            
   4:      //data context (IObjectScope)
   5:      IObjectScope dat = ObjectScopeProvider1.GetNewObjectScope();
   6:      //Get a ILIst of Customers
   7:      List<Customer> result = (from c in dat.Extent<Customer>() select c).ToList();
   8:      return result;
   9:  }

The function above returns a List of Customers. The IObjectScope in line 5 is the data context and the LINQ statement is in line 7.

But we have one problem. While we set all of the proper references, we are missing a bunch of using statements. You can manually add them here:

   1:  using System.Collections.Generic;
   2:  using System.Data;
   3:  using System.Linq;
   4:  using Telerik.OpenAccess;
   5:  using Telerik.Reporting.DAL;

 

Or you can use the new Telerik JustCode tool to organize and fix your using statements:

image

You need to add one more line of code to your report. Add the following to the report’s construtctor, it will wire up your function as the data source of the report:

   1:  DataSource = GetCustomers();

The ReportViewer Control

Now it is time to view the report. To do that create a new ASP.NET application called Telerik.Reporting.Web. Set a reference to the Telerik.Reporting.RptLib project where the report you just created is located. After that drag a Telerik ReportViewer control from your palate to the ASP.NET web form.

image

All you need to do now is add one line of code to the page load event (or a button click event, etc) to load the CustomerRpt we just built into the ReportViewer.

   1:  if (!IsPostBack) { ReportViewer1.Report = new CustomerRpt(); }

Next step is to run it and see your report in action!

image

Enjoy!

Technorati Tags:
posted on Tuesday, December 01, 2009 9:24:03 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] Trackback