Skip to content

Home | Channel One | Developer Blog | BDCSoft.com

Agile Development

The beginning of 2012 CE brought upon many life changing events for me. My name is Sonny Nguyen. I am a SENIOR at the University of Texas at Dallas majoring in Software Engineering. It was the end of 2011. I was looking for an internship. During my search, I discovered BDCSoft. I was given the opportunity to contribute my knowledge I have gained from my studies to the company. Although, I did not have any working experience in this field, BDC allowed me to come on board. I am grateful for this opportunity and would not have it any other way. Working here has been a blessing. I have met many new people that have become mentors and friends. Through this opportunity, I have been able to grasp hold of real world experience within the software development process—from Behavior Driven Development to SQL to Silverlight to Daily Scrum.

BDCSoft embraces the agile development methodology. This process is growing and becoming more widely adopted in companies around the world. Every day, we have a daily scrum meeting—a meeting that catches everyone on the team up to speed on what they have been doing (accomplishments) and what they will be doing (goals). Within an agile development model, all aspects of software development are touched, from requirements, design, implementation, verification, and maintenance in one “time block” called a sprint.

Agile Development has a proclamation called “The Agile Manifesto.”  
For more information, see: http://agilemanifesto.org/

And that—my friends, is how the cookie crumbles.

Categories: Developer Blog.

Hyphenated URLs in ASP.NET MVC 3 – or “how-my-doggie-got-pwned-by-the-kitty”

You’re using ASP.NET MVC 3 and you’ve come across a need for your URLs to have the hyphenated look, such as: “http://www.whateveryousayboss.com/kitty-is-a-good-kitty-but-she-likes-to-terrorize-the-dog-all-day/”?

You, sir, are in luck!

Behold, your golden solution is to be revealed to you:

First off, create a custom handler that inherits from the MvcRouteHandler class. Pretty easy, huh?

 C# |  copy code |? 
  1. public class HyphenatedRouteHandler : MvcRouteHandler {
  2.     protected override IHttpHandler  GetHttpHandler(RequestContext requestContext)
  3.     {
  4.         requestContext.RouteData.Values["controller"] = requestContext.RouteData.Values["controller"].ToString().Replace("-", "_");
  5.         requestContext.RouteData.Values["action"] = requestContext.RouteData.Values["action"].ToString().Replace("-", "_");
  6.         return base.GetHttpHandler(requestContext);
  7.     }
  8. }

Second, use the following route that adds the custom handler as the IRouteHandler parameter of the Route object such as below:

 C# |  copy code |? 
  1. routes.Add(
  2.     new Route("{controller}/{action}/{id}",
  3.         new RouteValueDictionary(new { controller = "Default", action = "Index", id = "" }),
  4.         new HyphenatedRouteHandler())
  5. );

To use this, just tack on the “ActionName” with the hypenated name:

 C# |  copy code |? 
  1. [ActionName("My-Bad-Kitty-Hates-My-Dog")]
  2. public ActionResult MyBadKittyHatesMyDog() {
  3.     return View();
  4. }

Remember that you do need to name your View like: “My-Bad-Kitty-Hates-My-Dog”.

As an alternate solution, You could name your Controllers and Views with underscores where hyphens would be. Such as:
“My_Bad_Kitty_Beats_Up_My_DogController” = “my-bad-kitty-beats-up-my-dog”

That’s it! I hope this helps someone out there on the interwebz.

Bad Kitty…

Bad Kitty!

Categories: Developer Blog.

Tags: , , , , , , , , ,

RadGridViewDataColumn Visibility Workaround

So the other day a coworker and I were trying to hide columns in a RadGridView, and apparently, this is not a native capability of Telerik’s wonderful RadGridView. After about half an hour, we (he) finally came up with a simple solution…

Using this Grid Resource…..

 XML |  copy code |? 
  1. <Grid.Resources>
  2.     <Grid x:Key="bridge" DataContext="{Binding DataContext, ElementName=LayoutRoot}" />
  3. </Grid.Resources>

You can use the Data Context in your columns…

 XML |  copy code |? 
  1. <grid:GridViewDataColumn IsVisible="{Binding DataContext.CustodyEmailToFlag, Source={StaticResource bridge}}">
  2.     <grid:GridViewDataColumn.CellTemplate>
  3.        <DataTemplate>
  4.              //Your Data Will Go Here
  5.        </DataTemplate>
  6.    </grid:GridViewDataColumn.CellTemplate>
  7. </grid:GridViewDataColumn>

Note: In this example, we are using Silverlight with MVVVM, Telerik’s Wonderful RadGridView, and the CustodyEmailToFlag is a boolean in our ViewModel

So if you ever find yourself beating your head against the wall trying to hide a RadGridViewDataColumn dynamically, STOP, and use this simple method…

Categories: Developer Blog.

Tags: , , , ,

Thanksgiving Place Cards or Pile of Requirements

Difficulty: Easy
Age: 17 and up

This adorable pile of requirements is made from a stash of index cards. It is the perfect jumping off point to
have a software company give you a useful line-of-business application, or a nice set of place cards for your party table!

What you’ll need, or Tools of Development:

  • Sharpie or Felt Tip Pen
  • 4×6 white index cards , ruled or unruled
    • Tip: You can use color coding, BUT that complicates things and we are looking for the easiest way to record our wishes. We use two colors: yellow is for technical stories that our team needs to implement to make software function at its best, white is for everything that has business value.

How to make it:

1. Bring cookies, mini brownies and other snacks.
2. Brew some tasty coffee or tea.
3. Gather a group of advisors, a few software developers, etc.
4. Start casually talking about specific feature you would like to see implemented.
5. After some healthy conversation, figure out the answer to the question: Why are we going to do this? Or What does this feature accomplish, and for whom?
6. Write down the title or the main area of work at the top.
7. Write the answer to the questions above using a Sharpie on a 4×6 index card.
8. Repeat steps 4 through 7 until you have a good pile of cards.
9. Lay them out on the table or a vertical surface, whatever you like best.
10. Group cards by the area of work.
11. Shuffle cards to be in the order of priority so that we know what are the top features your product needs and we can focus our resources on those first.
12. Write down priority number near the title line.
13. Now we are done and ready to go to the Sprint Planning meeting, have your developers give estimates, and get the software development going.

 

 Tips:

  1. If you really just wanted to do crafts, check out this Coffee Can Scarecrow.

Categories: Channel One.

Tags: , , , , ,

Is Custom Software too expensive?

We believe the right technology can make your business. We don’t believe in technology as an end unto itself. It can mean up-front expense, but it’s not expensive if the software increases value to your business.

Build vs. Buy

Sometimes pre-designed software makes sense, and we would whole-heartedly recommend a solution if it fits the need. Off-the-shelf software can provide a wide range of features at reasonable cost. However in some cases, typically only a small percentage of that software is used or needed. Why pay for many unused / unnecessary features? The supplier designed their software to be sold many multiple times and therefore it is attractive and accessible to many. Availability provides convenience, but for a business looking for growth it can be a weakness.

Sometimes, in order to create a unique market position, an organization needs something different. Custom software gives a business the opportunity to get ahead. Software can be designed to meet specific requirements based on a unique competitive advantage or process. And the good news is, with the right tools and techniques, this doesn’t have to be expensive! At BDC, our development process is structured to deliver value almost immediately.

Agile: Reducing Risk

Our agile process delivers software to our clients’ within very short amounts of time. That means stakeholders can see what they are getting and can help drive the direction the software goes during the development cycle. In fact, we encourage our clients to get involved in the process. Ultimately this leads to more efficient, cost-effective, and productive software development.

Categories: Channel One.

Tags: , , , , , ,

Who has two thumbs and hates the iOS 5′s Newsstand app?

This guy.

When I found out that you can’t remove or even MOVE the Newsstand app on my iPhone 4S into another folder… I was annoyed, to say the least.

But salvation cometh.

While you can’t remove the app (boo), you can hide the app in another folder with a little bit of trickery.

To get rid of the newsstand app, follow these instructions:

  1. Get newsstand and 2 other random apps right next to each other
  2. Make the two random apps into a folder
  3. As the folder is being created, drag the newsstand app into the folder (be super quick!).

NOTE: Do not open newsstand when it is in the folder. It will crash your phone then fix itself on the next boot. It you would like to use the app, you must take it out of the folder and use it.  It may take you a few tries, but you’ll get it.

There it is.  Enjoy! 

Categories: Developer Blog.

Tags: , , , , , ,

No Binding for You – A ListBox SelectedItems Behavior Solution

Recently in a Silverlight 4 project our team needed to have a listbox that allowed the user to select multiple items.  Setting a listbox to handle multiple item selections should be as simple as setting the SelectionMode property; unfortunately there is the little problem of getting these selected items into the ViewModel. The problem boils down to the fact that the SelectedItems property is not a dependency property. This means you cannot do what you normally do in MVVM and use a binding. (How nice of Microsoft to give us the option to do multiple selections on listboxes, but not give a way to easily get this into the ViewModel.)

Well the first thing I do is look to see if anyone has solved this little dilemma, by looking on Google. What should I find; but a bunch of solutions for WPF.   WPF is so similar to Silverlight you would think the solutions would work, but no they do not. After the disappointment of finding non-functioning solutions, I finally came across the Telerik blog. While this article was specifically about the RadGridView, it was so close to what I needed, that only a few minor tweaks made it usable for the ListBox control. Without further ado, here is the code: 

 C# |  copy code |? 
  1. public class MultiSelectBehavior : Behavior&lt;ListBox&gt;
  2.     {
  3.         public INotifyCollectionChanged SelectedItems
  4.         {
  5.             get { return (INotifyCollectionChanged)GetValue(SelectedItemsProperty); }
  6.             set { SetValue(SelectedItemsProperty, value); }
  7.         }
  8.         // Using a DependencyProperty as the backing store for SelectedItemsProperty.  This enables animation, styling, binding, etc...
  9.         public static readonly DependencyProperty SelectedItemsProperty =
  10.             DependencyProperty.Register("SelectedItems", typeof(INotifyCollectionChanged), typeof(MultiSelectBehavior), new PropertyMetadata(OnSelectedItemsPropertyChanged));
  11.         private static void OnSelectedItemsPropertyChanged(DependencyObject target, DependencyPropertyChangedEventArgs args)
  12.         {
  13.             var collection = args.NewValue as INotifyCollectionChanged;
  14.             if (collection != null)
  15.             {
  16.                 collection.CollectionChanged += ((MultiSelectBehavior)target).ContextSelectedItems_CollectionChanged;
  17.             }
  18.         }
  19.         protected override void OnAttached() {
  20.             base.OnAttached();
  21.             AssociatedObject.SelectionChanged += AssociatedObject_SelectionChanged;
  22.         }
  23.         void AssociatedObject_SelectionChanged(object sender, SelectionChangedEventArgs e) {
  24.             //Need to unsubscribe from the events so we don't override the transfer
  25.             UnsubscribeFromEvents();
  26.             //Move items from the list box selection to the selected items list
  27.             Transfer(AssociatedObject.SelectedItems, SelectedItems as IList);
  28.             //subscribe to the events again so we know when changes are made
  29.             SubscribeToEvents();
  30.         }
  31.         void ContextSelectedItems_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) {
  32.             //Need to unsubscribe from the events so we don't override the transfer
  33.             UnsubscribeFromEvents();
  34.             //Move items from the selected items list to the list box selection
  35.             Transfer(SelectedItems as IList, AssociatedObject.SelectedItems);
  36.             //subscribe to the events again so we know when changes are made
  37.             SubscribeToEvents();
  38.         }
  39.         private void SubscribeToEvents() {
  40.             AssociatedObject.SelectionChanged += AssociatedObject_SelectionChanged;
  41.             if (SelectedItems != null)
  42.             {
  43.                 SelectedItems.CollectionChanged += ContextSelectedItems_CollectionChanged;
  44.             }
  45.         }
  46.         private void UnsubscribeFromEvents() {
  47.             AssociatedObject.SelectionChanged -= AssociatedObject_SelectionChanged;
  48.             if (SelectedItems != null)
  49.             {
  50.                 SelectedItems.CollectionChanged -= ContextSelectedItems_CollectionChanged;
  51.             }
  52.         }
  53.         public static void Transfer(IList source, IList target)
  54.         {
  55.             if (source == null || target == null)
  56.                 return;
  57.             target.Clear();
  58.             foreach (var o in source)
  59.             {
  60.                 target.Add(o);
  61.             }
  62.         }
  63.     }

Now that you have the behavior you just need to use it. Here is a sample:

 HTML |  copy code |? 
  1. <ListBox ItemsSource="{Binding ListOfItems}" DisplayMemberPath="ID" SelectionMode="Extended">
  2.     <i:Interaction.Behaviors>
  3.         <local:MultiSelectBehavior SelectedItems="{Binding SelectedListOfItems}" />
  4.     </i:Interaction.Behaviors>
  5. </ListBox>

That’s it! Hope this helps someone.

Categories: Developer Blog.

Tags: , , , , , , , , , ,

Telerik, you sly dog you – The RadSpell Solution

I’m going to take the next 27 minutes (the total amount of time left for Battlefield 3 to install) to write to you about a little loading problem I had with Telerik’s Spell Checker.

I had the distinct pleasure of implementing spell checking in a RadRichTextBox today, but hit a small snag that prevented me from loading a TDF file.

Wait… insert disc 2… hold on…  Done…  We’ll just let that continue to install…  anyway…

  1. You need TDF files.  The TDF files we are using are dictionary files used for spellchecking.
  2. You’ll need to drop your TDF files somewhere nice and quiet.
  3. You need to set each TDF file’s Build Action as “Resource”in the file’s properties.
  4. We use Caliburn Micro as our MVVM framework, but I used the code-behind file to handle this since it was more UI related.
     C# |  copy code |? 
    1. private void LoadDictionary() {
    2. try {
    3. // start up a stream that loads the current culture's TDF file.
    4. using (Stream tdfFileStream = Application.GetResourceStream(
    5. new Uri("/Rams.CommonSL;component/Resources/Languages/" + CultureInfo.CurrentCulture.Name + ".tdf", UriKind.RelativeOrAbsolute)).Stream) {
    6. // load the streamed file into a RadDictionary object.
    7. var dictionary = new RadDictionary();
    8. dictionary.Load(tdfFileStream);
    9. // Add the dictionary to the RadRichTextBox.
    10. ((DocumentSpellChecker)MailMessage.SpellChecker).AddDictionary(dictionary, CultureInfo.CurrentCulture);
    11. }
    12. } catch (Exception) {
    13. // ignore errors if the TDF isn't found. Not the best solution here, but whatever...
    14. }
    15. }
    16. private void Page_Loaded(object sender, RoutedEventArgs e) {
    17. LoadDictionary();
    18. }

     

That’s it!  Seriously… super easy!

I hope this helps someone and I’ll see you all later… if Battlefield 3 ever lets me go!

Oh yeah!!!!!

Categories: Developer Blog.

Tags: , , , , ,

Test first development with BDD

Today is my first time to start development the right way – test first, functionality later. I have been a great supporter of BDD (Behavior Driven Development) in our office. I love to write test behaviors and implement them. But probably like every other beginner, I would write software functionality a little bit, then a few tests, and back-and-forth. The process was straightforward to me: manually inspect the code and see what logic has been covered by tests and what has not. It usually works okay. But not today!

I finalized my view, and as I was getting ready to do my usual routine, I stumbled. I have no idea what to implement first. There are too many moving pieces. Some of them are covered by other developers, some of them already tested, and there are plenty of new features. For the first time, I could not get all details into my head, and then I remembered that I don’t have to! BDD is the perfect solution. So, I began writing all my BDD specifications based on the requirements. Amazingly there are not that many, but they cover everything the story has to do. Now, I just need to implement them in code, and I am done.

We love to use SpecFlow for BDD integration with Visual Studio. Support for the Gherkin language is good and we love the intellisense.

Categories: Developer Blog.

Tags: , , , , , , ,

Interning at BDCSoft

I Vartika Paul, a masters student at University of Texas at Dallas majoring in Computer Science got an amazing opportunity to work at BDCSoft as a Software Engineer Intern. I feel privileged to work at BDCSoft where I am learning to work with new technologies and tools day by day like Silverlight 4.0 , SVN, SpecFlow and getting some hands on experience to work on real world projects both individually and in tandem with the team.  This is further helping me to apply my knowledge and skills in a constructive and a productive manner.  The working environment here is so nice and the people are too friendly and helpful, and they guide me in my work whenever I am stuck.

I faced some difficulties in the beginning learning the new stuff because I have never worked with Silverlight before, but now after working with these new technologies I am more into it. And slowly and slowly its becoming easier for me to finish up my tasks before time and I am really enjoying it !

I am sure that this Internship experience will serve as a promising step towards my career and will open future doors of success for me.

Categories: Developer Blog.