Code Central is here!

ctodx
10 July 2008

Over the past two or three months we've been implementing a new feature of our Support Center web site that we're calling Code Central. We've been dropping hints for a little time while we've been testing it internally, but it's come to the point that we really need to get it out in front of you, our customers.

I'm sure you know the feeling: there's a problem with your code, you stare at it, stare at it and you just can't see it, then someone comes along and points out the issue straight off. It's the same with Code Central in a way: we think it's great tool and we've covered all the bases and we've stared at it and stared at it, but it's time for new eyes to look at it and give us feedback.

So, what its it? At it's most basic it's a search engine for finding and using sample code. But that's doesn't even begin to explain why we're so buzzed about it and, indeed, if that was all it was, we'd have released it ages ago.

Code Central is both a web application and painstakingly indexed and updated data and code. It was designed to make it easier for you to locate sample code, knowledgebase code, code provided by us as part of solving a support incident, etc. Normally at this stage, once you've located the sample or demo code you want to look at, you have to download it, unzip it into some folder, update the assembly references using the ProjectConverter tool (because you can bet that you have a different version of DXperience than the code was written for), load it into Visual Studio, and then finally compile and run it.

Of course, you're always a little anxious as to whether the code will actually work with your version of DXperience anyway. Maybe it was written for an older version and no longer applies. There's nothing worse than downloading some sample code, going through that entire process, only to find it won't compile or run.

We looked at this scenario and recognized that it's not exactly conducive to efficient and helpful use of our sample code. In fact, the basic scenario is downright pathetic. So, we decided to do something about it as part of Code Central.

The first part was taking our sample and demo code and meticulously checking, tagging, and categorizing it. We worked out which versions of DXperience it was valid for. Sometimes we found that the sample code applied to various versions of DXperience but was different for the later ones, maybe due to a later breaking change, so we created different samples in those cases. We created, in essence, a large database of indexed and categorized sample code.

Next up, and note I still haven't reached the customer-facing parts of Code Central yet, we thought long and hard about how to maintain the validity of the data in the database. After all, it'd be bad to allow the data to "decay" having spent all that time verifying and classifying the sample code. We're releasing new versions of DXperience all the time (three major releases per year, and roughly one minor release every 3 or 4 weeks) and any release has the potential to "break" sample code.

Once phrased like that, the solution was obvious: the sample code database must become part of our internal automated testing suite. That was the next stage of the Code Central project. We now get bug reports if the code changes we make for DXperience breaks the sample code. Breakages can be as simple as the sample code no longer compiles, or more complex such as when the behavior of a sample changes. In either case the automatic bug report means that a developer looks at the issue and makes a decision: was the change buggy, in which case it should be fixed, or is this a valid change, what we call a breaking change, in which case the developer has to create a new sample to reflect the new code in DXperience. Either way, you, the users of Code Central, can rest assured that the sample you download will work.

Put another way, this merging of our sample code into our automated test system has the benefit of giving us a body of test code to help make sure we don't inadvertently introduce breaking changes where there shouldn't be any.

At this stage we had a body of verified, indexed, categorized sample code waiting for the next improvement in the customer scenario: the download, compile and run experience. A few discussions later, we had the answer: a simple program called Example Runner needed to be written. What this program does is to execute all that tedious workflow of unzipping the sample code into its own folder, running ProjectConverter on it, and loading the sample project into Visual Studio so that you can compile and run it.

DevExpress' Example Runner is simple to use. We've renamed our sample code zip files with a unique extension, dxsample, and Example Runner, on install, registers itself to open those kinds of files. It has two configuration options: the root folder in which to unpack the dxsample files and the version of Visual Studio to use to load the samples (after all, you may have two or more versions of Visual Studio on your development machine). Once that's all set up, Example Runner does its job: unpacking, updating references, loading the sample in Visual Studio. All you need to do is click on the sample download button on the website, answer the browser's "what should I do with this file?" security dialog, and after a moment or two you'll be presented with the sample project in Visual Studio ready for you to peruse the code, or compile and run it.

After all that, we were ready to write the actual Code Central web application, the one that lets you search our sample code database, sort or group or filter the results (yes, we're using ASPxGridView, of course), view a preview of the sample in the grid, or click on it to see the whole thing.

Rather than me describe it in utter detail, you should just go and use it. At the present time, we're publishing Code Central as a beta. We're anxious to get feedback on it, so that we can smooth out any rough edges we may have missed. Please use our usual support channels to report problems or to request enhancements.

Enjoy!

Free DevExpress Products – Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We’ll be happy to follow-up.
Neil D
Neil D

This is a fantastic idea...definitely a great help.  The support center was becoming more and more difficult to find quality code examples.

Keep up the great work :)

10 July 2008
Jim Clay
Jim Clay

One word --- WOW!

That is way cool.  I am looking forward to playing and seeing how it works.

Thanks!

10 July 2008
Neal
Neal

Sounds good, looking forward to code samples!  Sure would be neat to have a plug-in for VS.NET "Search DevExpress" and I could see this right inside the IDE! (cough cough hint hint).

I checked out the CC site, it's a bit, umm, buggy.  Can't get beyond page 2 or it errors out.  Clicking several articles causes errors too.  I'll give it a few days and if it remains I'll report it via the SC.

10 July 2008
Steven Rasmussen
Steven Rasmussen

This looks to be very interesting.  I tried it out briefly and would like to report what I think is a bug, but did not find a 'Code Central' category in Support Center to log it under.  Where would you like me to put it?

10 July 2008
Serge (DevExpress Support)
Serge (DevExpress Support)

Neal: All exceptions are reported to Support and our webmasters.  We do our best to fix them immediately.

Steven: Code Central is in the DX Services group, if you want to post a new report to the Support Center.

10 July 2008
Rory Becker - DevExpress
Rory Becker - DevExpress

> Once phrased like that, the solution was obvious: the sample code database must become part of our internal automated testing suite.

Suite!!!

10 July 2008
david sexton_1
david sexton_1

might i suggest 1 addition to your project. 1st my problem: I have a win xp64, which means that their is no odbc or any other means that i have found to get to access tables. None of your sample run on my machine. What i currently do is run the program on your web site and view the source code on mine, but that never let me play with the code. so my suggestion is convert your access data to ms SQL and put that in the app data folder. In my little world that would make this perfect :)

10 July 2008
Anonymous
Doug

I would love to see the ASP.Net tutorials (demos.devexpress.com/Tutorials)  disappear (or at least be copied to) the new code central location.  The idea being just one place to look for code samples.

10 July 2008
Julian Bucknall (DevExpress)
Julian Bucknall (DevExpress)

David

We know of the issue and we're currently discussing how to change our demos that use lots of data and how best to package that data for them. It's not going to be a quick fix, unfortunately, but we are considering various options.

Cheers, Julian

10 July 2008
Julian Bucknall (DevExpress)
Julian Bucknall (DevExpress)

Doug

Excellent point, and I've just now smacked myself upside the head.

I'd completely forgotten to mention that, yes, all of the samples in the ASP.NET tutorials page you mentioned are part of Code Central, and, what is more, Code Central has the ability to run ASP.NET samples directly from the sample page. You don't even have to download it to see an ASP.NET sample in action: you can run it right there.

Now how could I forget that? It's been a day...

Cheers, Julian

10 July 2008
Anonymous
heather field

Great addition to an already wonderful experience with Devexpress!!  Keep it coming Julian - I swear sometimes you guys are reading our minds.  :)

Customer solutions like this are a perfect example that shows a company is using its own products for its solutions.  Speaks volumes for your long-term success.

10 July 2008
Juan Betancourt
Juan Betancourt

In the filter combo, doesn't appear many products, like XtraGrid, XtraPivotGrid, XtraBars, etc. only ASPXPerience, ASPxGridView, XtraReports, XtraCharts & XPO. After searching choosing "All products", none of the mentioned products above appears.

10 July 2008
Chris W Walsh
Chris W Walsh

great job guys, though the codecentral demo site is painfully slow for "US" down here in Australia, i suggest contacting your hosting provider "reliableservers" *cough* *cough* and see if they limit the international links uplinks.

10 July 2008
Luc DEBRUN
Luc DEBRUN

I knew I made the right choice with Devexpress.

Please keep up the great work.

Luc

(not a professional programmer - now he is so happy!).

10 July 2008
Holger Persch [DX-Squad]
Holger Persch [DX-Squad]

One word only: Amazing!

11 July 2008
Anonymous
Ian Ringrose

Sounds great, two things that will provide the icing on the cake.

a) Provide a compiled version of each sample that is setup to work with “click once” so I can try out a sample without having to download the source code and compile it.

b) Use terminal server with the activeX viewer, so I can play with the sample running on your server without having to install anything on  my machine (sometimes I work at sites that are locked down.)

11 July 2008
Robert Johnson
Robert Johnson

YES!!!!!

11 July 2008
Anonymous
Adam Leffert

Outstanding!

Have you considered releasing the source code to CodeCentral as part of the DXperience subscription?

Of course, we might have to wait a year or more for the code to settle down.  There are costs associated with releasing it, but you guys seem to be good at balancing the costs/benefits and managing the processes.

I can already think of a number of different ways to use it in my business, for things other than source code, e.g. report templates.

Adam

11 July 2008
Kevin White
Kevin White

That is fantastic, I can see that really helping.

11 July 2008
Anonymous
The ASPx Blog

Check out this 7 minute video on how to use CodeCentral . To learn a new product or tool, I find one

30 July 2008
Adam Leffert
Adam Leffert

I'm a huge fan of CodeCentral.

Two suggestions:

1) Please name the solutions something shorter.  I had to do a search and replace to get "HowToExtendApplicationModelAndSchema" to compile on my machine.

No big deal, but we want to remove all the speed bumps, especially for trial users.

2) david sextion_1: I had the same problem running the examples on my 64-bit Vista machine.

The problem is that the specified driver does not run in 64-bit mode.

If you follow these steps, the sample will run:

1) Right-click on the solution in Visual Studio and choose "Configuration Manager".

2) In the "Platform" column, change all the drop-downs to "x86".  The solution will run in 32-bit mode, but it will run.

Best,

Adam Leffert

3 August 2008

Please login or register to post comments.