in
Forums
Blogs
Files
Devexpress.Com
ClientCenter
DevExpress Channel

ctodx

Discussions, news and rants from the CTO of Developer Express, Julian M Bucknall

July 2008 - Posts

  • XtraTreeList: binding to IList<T>

    Holger Flick has just published a great post on using the XtraTreeList and binding it to a standard IList<T>. Pretty clever considering that an IList is a one-dimensional list. So how did he get the hierarchy?

    Check it out.

  • Using the source as documentation

    A common issue we get dinged on is that our official documentation (by "official" I mean, in essence, our help files) is not complete, and that sometimes topics, how-tos and other things are missing. My response to this is: be specific and I can do something about it and get it fixed, but be general and there's nothing I can do but make reassuring noises. (It's like saying the roads in Colorado are awful, well, sure some are, here's the ones I know, but by no means can I extend the specific anecdotes to a general rule.)

    Sometimes I point out that our documentation also encompasses the knowledgebase and the support center and the forums. In an ideal world we'd merge all this data into the help so you wouldn't have to use these online services, but there's always more things to document and so this project gets pushed back. Personally I prefer to use a browser and Google to search for information on our own products (the help is completely online and hence indexed by the search engines). Google has changed permanently what it means to search and the rest of the world is still catching up.

    Another source of documentation -- and it can be said to be the ultimate source, since it can never be wrong --- is the source code itself.

    So here's a specific case that came up this morning on a phone call I had with a customer. He was having an issue with, wait for it, DXValidationProvider. Yeah, I know, you WinForms pros have got this particular component nailed and are nodding your heads sagely, but for me and the customer we were having some issues understanding how it worked.

    If you drop a DXValidationProvider onto the form, you can modify how it validates the values of various controls on the form. There's a smart tag for the component and one of the options is to customize the validation rules. Click it and up comes the following dialog.

    image

    The customer wanted to use the Conditional Validation option. So we clicked it:

    image

    All very well, but what are Value1, Value2, and Values, and what are they used for? The customer was using "Contains" as the ConditionOperator. He wasn't sure what it really meant but was assuming "is contained in the Values collection" was close and had set up the Values collection accordingly. However he was finding that it wasn't working. Go to the help, is what I said. So we did:

    "To create validation rules at design time and associate them with editors, use the 'Customize Validation Rules' editor"

    And that, unfortunately, was that, as regards the help. I did ascertain that ConditionValidationRule was the class I should be interested in, but I couldn't find out very much about it in the help.

    At which point I went to the source. I pulled up DXValidationProvider.cs and browsed. I found the ConditionValidationRule class and it's Validate method looked like this:

    public override bool Validate(Control control, object value) {
    return ValidationHelper.Validate(value, ConditionOperator,
    Value1, Value2, Values, CaseSensitive);
    }

    OK, let's take a look at ValidationHelper. It's in the same file. Its main Validate() method (there were a few overloads) was most informative. I won't repeat it here since the lines are long enough to throw off the blog display, but suffice it to say that it consists of a large switch statement on the ConditionOperator value passed in.

    Most of the code in each case block  makes calls to another set of methods (EvaluateIsBlankOperator is an example). Nevertheless we don't need to look any further than this to get some helpful information about the ConditionOperator, Value1, Value2, and Values, and in fact to answer the customer's actual problem.

    • Equals: checks the control's value against Value1 to be equal
    • NotEquals: the negation of Equals
    • Between: checks the control's value to be between Value1 and Value2
    • NotBetween: the negation of Between
    • Less, Greater, GreaterOrEqual, LessOrEqual: checks the control's value to be less, greater, etc, than Value1
    • BeginsWith: checks whether the control's value begins with Value1. Both are assumed to be strings. Value1 cannot contain a percent sign.
    • EndsWith: checks whether the control's value ends with Value1. Both are assumed to be strings. Value1 cannot contain a percent sign.
    • Contains: checks whether the control's value contains Value1. Both are assumed to be strings. Value1 cannot contain a percent sign.
    • NotContains: the negation of Contains.
    • Like: checks whether the control's value is "like" Value1, that is, Value1 is assumed to contain a text pattern, and the control's value is matched (or not) against that pattern. Metacharacters are '%' for zero or more characters, '_' for a single character. (Note, to find the metacharacters took more time than I took finding the switch statement.)
    • NotLike: the negation of Like.
    • IsBlank: checks whether the control's value as a string is null or empty.
    • IsNotBlank: the negation of IsBlank.
    • AnyOf: checks whether the control's value is one of the values in the Values collection. If the collection is null or empty, the control's value is assumed valid (this seems wrong to me, so I'll ask).
    • NotAnyOf: checks whether the control's value is not one of the values in the Values collection. If the collection is null or empty, the control's value is assumed valid.

    So the basic solution to the customer's issue was to use AnyOf instead of Contains.

    Now, let me lay down some thoughts on this small episode. First of all, I agree that this information should be in the help. No arguments from me on that score.

    The customer could have pinged our support team with this problem and obtained the same answer, albeit a day later.

    And, by the way, I'm certainly not advocating that we don't bother with providing help at all and just ask our support team to always respond with "use the source, Luke".

    Nevertheless, with only a short time browsing the source code (less time than it's taken me to write this blog post), I came up with the answer. I hasten to add that I am not very familiar with the source -- it's not like I read a DevExpress source file every night before switching off the light -- but even so, I was able to unblock someone relatively quickly.

    So, all I'm saying is, if you're stuck on something, maybe browsing the source is one way to find out the answer. I know it's worked for me with .NET in general; so much so, that Reflector is one of my primary tools.

    [General preemptive note: if you find that the help is missing something or is confusing, don't get mad, get even. File a bug report and track it. Don't post it as a comment here: it'll get overlooked or lost. Throw it at the support team, and they'll in turn push it onto the documentation team. Most importantly of all, it'll get registered in our support database and someone will have to do something about it. I won't accept "Accepted - Release TBD" either. Documentation is not code.]

    [Another preemptive note: behave if you want to comment, or I will turn off comments on this post faster than a hot knife through butter. This post has all the hallmarks of attracting anonymous ranters.]

  • Our oldest, but very active, customer

    Dennis in our support team IMed me yesterday in some excitement. "We have the oldest customer!" was the message. I asked for more details. Dennis pointed me to Q180012. I'll quote:

    ...born April 27, 1927. I'm a veteran of 3 wars and was involved in testing atomic bomb effects on Eniwetok and the Nevada Proving Grounds. I've witnessed over 12 blasts from 15 miles away. I was a Navy Chief Petty Officer with the distinction of making chief at a younger age than any. I absolutely love programming. I knew and regularly spent time with Leslie Solomon of MITS Altair fame. In my view you folks make the finest tools in the business but they are also very learning intensive. Keeps my mind young and active I believe.

    It seems that Bud may very well be our oldest customer at 81. And actively programming to boot. I raise my glass to him: that is awesome.

    I'll note in passing that Dennis is one of our youngest support engineers -- I think he's still in his teens...

    Mind you, it's the first time I've heard that our products have a rejuvenating effect alongside their ability to help you create state-of-the-art Windows and web applications. I'll tell you this: I'm instituting a regimen of learning something new about our products every day and maybe I'll live to be a Grand Old Man like Bud.

    And before anyone says "but Julian you are already a grand OLD man", I know where you live.

  • New MS operating systems?

    OK, chalk this one up the the Weird Coincidence Department.

    Last week the news was all about the new Mojave operating system. In essence, Microsoft gathered a group of people with negative impressions of Vista, all of whom were running XP instead, to a meeting where they were individually shown what they were told was a forthcoming new Microsoft operating system, codenamed Mojave. They were then asked for their impressions of it vis-à-vis Windows XP. To a man (or woman) they were highly complimentary about this new operating system and much preferred it to their XP.

    At which point it was revealed that Mojave was nothing more than that reviled Vista.

    This certainly was a fun experiment, and I understand that Microsoft might use the result of it in their promotions in the future.

    Of course, as many people have pointed out, the main reasons that Vista has gained the reputation it has is because of driver issues and underpowered machines, especially in the early days (and I can relate to that, since I removed Vista from my Dell notebook over a year ago now). But now that SP1 is out, the driver issues have largely disappeared, and people have newer faster machines, these are no longer problems we face particularly. And, yes, my desktop runs Vista and my wife's notebook (a year younger than mine) runs Vista perfectly well, Aero and all.

    And then today David Worthington of SDTimes published an in-depth article about a really new and real operating system called Midori (Japanese for "green"). This operating system seems to have grown out of the Singularity operating system, an experiment in writing a managed code OS done by Microsoft Research. Rumors have been slipping out for a little while (see Mary Jo Foley's article for one), but this is the first in-depth discussion I've seen.

    This OS is particularly fascinating. Not only is it all written in managed code, but it's written with concurrency firmly in mind, both task-based and cloud-based (an always-present network is assumed). The managed code means the OS gains better security (no overwrites or memory trashing), something that still causes problems even now. Apparently it's also being designed to run well in a Hyper-V host.

    Midori certainly sounds more intriguing than Mojave, but a caveat is that, if it ever appears at all, it'll be a long way away. Windows 7 it is not.

  • ASP.NET controls: support for stronger, more flexible validation

    There's a product out there for ASP.NET that's been through a few iterations, but that has gained and maintained an impressive reputation for being the best in its field. I remember evaluating it way back when I first started writing ASP.NET applications. In fact it and its brethren were so successful that its writer, Peter Blum, gave up his day job to create and run a company to sell, improve and market them.

    The product I'm referring to here was originally called Professional Validation and More (VAM) and is now part of his Data Entry Suite. VAM took the concept of validators introduced in ASP.NET 1.0 and went wild with them. The most interesting thing for me at this point in time is that these validators are not limited to just the controls Peter provides, but can extend to other ASP.NET controls as well, such as the ones we sell.

    I contacted Peter towards the end of last week wondering if there was anything we could do to help him provide support for our ASP.NET controls with his validators. You know, a nice leisurely contact email. This morning I get an email saying that the support is already completed and will be released in version 4.0.4 of his Data Entry Suite (as part of the DES Validation framework -- the new name for VAM). Wow, that was quick.

    In detail:

    • Support has been added for these controls: ASPxButtonEdit, ASPxCheckBox, ASPxComboBox, ASPxDateEdit, ASPxListBox, ASPxMemo, ASPxRadioButton, ASPxRadioButtonList, ASPxSpinEdit, ASPxTextBox, and ASPxHtmlEditor. Support not only has been added at run-time (well, duh!, that's the whole point Wink), but also at design-time. Cool.
    • Peter's Web Application Updater utility includes our DXperience ASP.NET in its list of supported third party controls. As the user adds DES to their web app, they merely check off "DevExpress 8" and the utility installs the necessary files to use DevExpress' controls with his validators.
    • Client-side and server-side validation is supported.
    • Full documentation is provided on how to use the validators with our controls.
    • You can continue to use ASPxButton to submit a page. Peter provides easy instructions to enable both client- and server-side validation using that control.

    This validates (ho, ho, pun intended) something I've been ruminating on for a while. Much as we'd like to be the only provider of UI controls and frameworks in the world -- cue maniacal laughter à la Dr Evil -- in reality, we have to co-exist with all manner of other third-party products, from databases to controls to frameworks to, as in this case, validators. For those products that don't infringe directly on our specific area of the market, it makes sense for us to support them and to help our customers who are having problems with using both products in the same application. I'll have something more to say about this in the future.

    Anyway, many thanks to Peter Blum for providing this valuable support (over the weekend too!) and, if you own his Data Entry Suite as well as DXperience, I'd recommend asking him for version 4.0.4 right away and get validating.

  • Video: DXperience v2008 vol 2 released

    Earlier on today we released DXperience v2008 vol 2. Loads of great features and enhancements, such as the gauges, the wizard, the improved HTML editor, and so on.

    But...

    Coincidence or not? Yesterday afternoon I blogged about the delay in releasing the latest version, and this morning I found this video on my desk, with a note from the cleaners that they'd found it behind the filing cabinet. Scribbled on the label was The DXperience Project, nothing else, no name, nothing.

    It's suddenly gone quiet here in the office.

    Where is everyone? What's going on?

    image

  • Major release on its way

    Something came up today in sales-land, both in a phone call and in a couple of emails.

    "When's v2008 vol 2 going to be released?"

    "Any day now. We discovered a showstopper bug that would affect too many customers, and needed to fix it prior to release."

    "OK, I'll wait until it's released before buying DXperience."

    To which I was stumped. First, DXperience licenses are sold on a subscription basis. All of our .NET products, even if you buy the controls individually, are sold on a subscription basis. If you buy a product today, you will automatically get all minor updates and major upgrades for a full year. That's 365 days in an ordinary year, or 366 days in a leap year. We just don't sell our .NET products in a grab-your-money-and-run basis, and then charge you big bucks for upgrades. We love our customers and we'd like to see them all in a year's time Smile.

    If the showstopper bug were horrendous enough, it could be a week before we get it sorted out (and, yes, heads would roll). Presumably these potential customers are ready right now to use DXperience: I don't think waiting for a week is going to help their development schedules. They can download either the latest full release, v2008.1.6, or the release candidate of v2008.2 and use them immediately, and -- it bears repeating -- because DXperience sells on a subscription basis, they'll get a download link for v2008.2 the moment it's ready. And v2008.3. And v2009.1. And most probably 2009.2 (I don't know what the schedule is for next year -- heck, we're still finalizing what to do for v2008.3).

    The other point to make is that we do have a rock-solid 60-day no-questions-asked money back guarantee. You want to return a product within the first 60 days: we'll give you your money back. Period. Maybe not as a stack of used bills in a leather briefcase, but you get the idea. (OK, I might ask one question: how we failed so badly that you're abandoning us, but you can just ignore me. Not answering is acceptable.) 

    So, in summary, you lose nothing by buying DXperience whenever you've decided you need it. You needn't be constrained by our release schedule or our ability to find showstopper bugs on time. You will get our updates and upgrades for a full year (and, some people even moan that we provide too many Smile) and, by gum, we'll do everything we can through providing great new features and enhancements and world-class support to make sure you renew after that time.

    (And before someone comments that DevExpress is obviously running on empty and need all the cashflow they can get, puh-leaze, give me a break. I'm more concerned that potential customers are artificially putting roadblocks in front of their own development progress.)

  • WPF Datagrid video: using cell templates

    This video explores how to create a cell template for a column in the DXGrid for WPF.

    image

  • WPF Datagrid video: using unbound columns

    Being in the office this week, under Jeff's firm nagging about recording more videos, I can continue the tutorials about using DXGrid for WPF.

    Here's one about how to create an unbound column for the datagrid.

    image

    I note on watching it that I neglected to show that the unbound column is fully supported by the grid's sorting and grouping facilities with no extra code. You just click on the column header to sort on the unbound data, or drag the column header to the group box to group on it. Didn't even think about this at the time, sigh.

  • WinForms Scheduler: setting up a toolbar and ribbon

    I quickly recorded a couple of videos this morning on setting up a toolbar or a ribbon tab to quickly and easily select the various views in a scheduler control.

    Both the ViewSelector and the RibbonViewSelector are DXperience-level composite controls since they use features that are not part of XtraScheduler (in particular they're part of XtraBars). So you'll need DXperience WinForms, Enterprise, or Universal to emulate the work done in the videos.

    The first video describes how to set up and use the ViewSelector:

    image

    The second video describes how to set up and use the RibbonViewSelector:

    image

    Before anyone comments that there's nothing particularly new here, let me say that these have been on my todo list for a while and I'm glad to have finally got them done.

  • Betas and forums for WPF grid and charts

    A two-headed post: first of all, the betas for both our DXGrid (the data grid) and DXCharts for WPF (3D charting) are now part of the DXperience install. These two are betas (not release candidates), since there is still quite a bit to add to each (for example, editing for the grid, and 2D charts for the charting product), but we're anxious to get some feedback on them both, especially the grid. We'll be releasing new betas for each as we go through the development cycle for v2008 vol 3.

    In order that you can provide said feedback, we've opened up some new forums for our WPF products. First of all there's a general forum for all discussions WPF, and then we have one forum each for DXGrid and for DXCharts.

  • Data maps? Map charts? Dashboard maps? Interactive maps?

    I bet there's a name for this, but it's not coming to me right now. Sigh.

    Oh well, since a picture is worth a thousand words, take a look at this:

    image

    This is a "proof of concept" that the Gauges team came up with. A new developer needed to come up to speed with what the team had implemented with our new WinForms gauges product, XtraGauges, especially the vector rendering engine and he wrote a preliminary datamap control. The image shows the demo program (Windows, not WPF, remember), which is loaded with some freely available state statistics (here showing the number of electors, and the shade of blue for the state denotes the elector count in the state).

    What I've also tried to capture in this static image is that the current state is highlighted with a red border as the mouse hovers over it; in this case, Colorado.

    The map is a vector drawing with the GIS information stored in an XAML file. Since it's rendered as a vector image, it grows and shrinks without pixellation as the form is grown/shrunk. And yes it's very smooth at doing so.

    As I said, at present this is a quick experiment to show that our XAML rendering engine is able to display other kinds of images and figures than it was first designed for. Yet I can guess that many of our customers would be interested in seeing this fleshed out into an actual product. But, instead of saying, would you like to have this product?, to which everyone would say, sure, next week would be great thanks, I'm going to couch this in a different way:

    1. If it were a choice between gauges for ASP.NET and this product, which would you choose? How about between gauges for WPF and this? Gauges for Silverlight and this?

    2. If this were an extra-cost product because we had to purchase/license the GIS data for other countries or for counties within a state/country, etc, would you still be interested?

    3. If this were a product without data, and you had to license the actual GIS data from a third-party (maybe we only had some basic free GIS data we shipped with the product itself, like the US or Europe), would you be bothered about it?

    Let me know. All feedback is welcome.

  • Labels, Grid with formatted text

    Someone in WinForms R&D obviously finished his work early and decided to add something we've been talking about for a little while: formatted text for labels and such like. It's not in the Release Candidate, but will be in the v2008 vol 2 release itself.

    The Label, CheckEdit, and GridView have all been enhanced to accept HTML-like markup in their text properties. Since a picture is worth a thousand words, here's what I'm talking about:

     clip_image002

    Obviously we're not suggesting you change all your business apps to look like ransom demands, but at least this gives a flavor of what you can do.

    The look of the label above was created with this text:

    <size=20><color=green>Color</color></size><br>labels<br><u>underline</u> and <b>bold</b>

    The look of the third column header was created with this text:

    Do<br><size=20>a<size=+2>n<size=+2>y<size=+2>t<size=-2>h<size=-2>i<size=-2>n<size=-2>g</size>

    Another thing we've added to the design-time experience with our controls is a new smart tag menu option called "Get support".

    clip_image002[4]

    If you are online, this starts up your browser and loads the Support Center search page, passing along the name of the product you're using and the control name itself.

    IE7 screenshot

    Clicking on "Report a Bug" or "Ask a Question" from here will also give you forms pre-filled with the version numbers of DXperience and Visual Studio that you're developing with.

  • Getting your fix: the DevExpress way

    We've recognized for a while that there's a minor flaw in how we disseminate fixes to our products. Sure, the primary method of doing so is to issue a new release, either minor or major, but sometimes it's necessary to post an intermediate fix in some fashion. At present this process is a little inefficient: you write to support asking for a fix, this message goes into the maw of our support system, lands on someone's desk and they then email you the required files.

    Now, in actuality, not everyone wants intermediate fixes. They'll use a workaround until the next release is published and then start using the new version. However, sometimes there is no workaround and we jump into this somewhat inefficient process.

    We thought about it a while and came to the conclusion that if we produce a code fix for an issue, we should make it available via the Support Center web UI for customers who need it urgently, as part of the page for that issue. We also decided that if no one actually wanted the fix that urgently, we should try and avoid doing the extra work in creating/updating the files (be they source files, DLLs, or assemblies) that a customer would need to download.

    In other words, the code fix would be available by request only. The first customer that wanted the fix would trigger the extra work on our side to prepare a download package. Subsequent customers who wanted the same fix would just download the already prepared package. In essence, we should have a "load on demand" type system.

    There are several types of fixes we produce

    • A small code fix for a certain file. This is of greatest benefit for our VCL customers since they are well used to modifying source code and recompiling. I would venture that our .NET customers wouldn't be that interested in this kind of fix. The extra work on our part here is not that great at all.
    • A complete set of source code files to replace the original files you've installed. Again this is of primary benefit to our VCL customers. .NET customers typically don't want to rebuild our assemblies (especially as we are not that likely to release our private signing key, sorry and all that).
    • A set of binaries, such as assemblies. This option is of primary interest to our .NET customers: they'd much prefer to download properly signed replacement assemblies that encapsulate the code fix. Of course, this is the option that requires the most amount of extra work for us, and if we can get away from doing it so much the better Smile.

    So we've implemented another automated system. We're not quite sure what to call it yet -- the code name PublicCodeFix is a little boring -- but it's ready for beta testing.

    The way it works under the hood is a little complex so I won't go into it here. However, how it's presented to you, our customer, is important, so let me go into that.

    The UI is extremely simple: it's a button on the page for the issue in question. First of all, this button is only visible if the issue has been fixed. (To which we all go Duh!). It's also not shown if you don't have a license that is able to take advantage of the code fix. For example, if your license doesn't include source code, you won't see the button for a fix that alters your source code.

    If visible, the button has three states. If the fix hasn't been generated yet, the button shows "Request Fix". If a customer clicks on the button in this state, a request is sent to support for the fix, and the button changes to "Requested". This indicates to other customers that the fix is being created and is on its way. You can click the button in this state and all that happens is that you get added to an internal list of people who want to be notified when the fix is available (the first requestor is obviously added to the same list). This list is essentially the tracking list that we already have. Finally, once we've prepared the files and the download package, we set the button to read "Available" and notify all the people tracking the issue that the fix is ready for download. In this state, you can click on the button and the fix is downloaded to your machine.

    Of course, when the next version of the product is released containing the fix, the button will finally disappear for good.

    We activated the PublicCodeFix application as a beta this morning so, if you see a fixed issue with this new button, you'll now know what it's all about. Needless to say, we'd love to hear your feedback about this new feature, so do please let us know using the usual support channels.

  • Code Central is here!

    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!

More Posts Next page »
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED