07-08 NFL Wild Card Weekend Picks

posted on 01/02/08 at 09:00:47 pm by Joel Ross

The playoffs are hear, and I'm excited! While there aren't many games left, they definitely should be good ones!

  • Jacksonville (-2) vs. Pittsburgh (39 O/U): Pittsburgh is the underdog, despite playing at home against a team that isn't used to playing in the cold. Of course, Jacksonville beat Pittsburgh in Pittsburgh a couple of weeks ago, so they've shown they can do it, and Pittsburgh is without Willy Parker, their leading rusher, so it's not a complete shocker that Jacksonville is the favorite. Having said that, the weather in all likelihood won't be an issue - it's supposed to be in the lower 40s and cloudy - no snow. Still, I think Big Ben will lead them to a victory. By the way, this is only the second wild card game in 5 years where the home team is the underdog - the other one
  • Tennessee vs. San Diego (-9) (40.5 O/U): Tennessee players played hard to get their trip to San Diego. Not a bad reward - it's probably pretty nice in SoCal right now! But that's where their trip ends. Barely beating Jim Sorgi isn't quite going to cut it. They need to stop the three time rushing champ now.
  • Washington vs. Seattle (-3) (40 O/U): Washington is running on emotions right now, and that's a very good motivator (the Red Wings rode Konstantinov's injury-as-motivation to the Cup in '98), but they're heading way, way far away and playing a team which is good at home and rested. Not a great combination.
  • New York Giants vs. Tampa Bay (-3) (39.5 O/U): I know Tampa Bay had a good year, but I'm still not sold on them. I'm not exactly sold on the Giants either, but they took New England to the wire. If they play like that again (especially the first half), they'll leave the Buccaneers in their dust. Old joke - Where you do you put your Buccaneers? Under your buckin' hat.

I'm only going to do one "Lock Solid" pick for the playoffs - I'm not guaranteeing every game! So this week, I'll take San Diego (-450) over Tennessee (big stretch, I know!).

Check back next week to see how I did.

Tags: | |

Categories: Football


 

07-08 NFL Week 17 Pick Results

posted on 01/01/08 at 10:24:15 pm by Joel Ross

The final regular season game has been played - this season is done! This week was a tough one to pick - so many teams played meaningless games that it was tough to figure out who would be competitive. Yeah, it was obvious that Washington and Tennessee would ramp up their play while Dallas and Indy would rest their key players, but explain Green Bay over Detroit or Cincinnati over Miami while at the same time explaining Atlanta over Seattle and Baltimore over Pittsburgh? It's not a good week to lay down cash on games!

In "Lock Solid" picks, I (again) went 3-1, but in a shift, I came out ahead by $4.75. That means for the season, I'm 48-20, but down by $42.32. As an FYI, that would be $680 in bets on these. That's a loss of about 6%.

As for the market comparison, betting would be up by $76.15. Not much of a difference really, when you consider you'd be betting (or investing) $7,680 for the season.

  • New England 38 (-14.5), New York Giants 35 (44 O/U) [P: $0.77, S: ($10.00), O/U: $9.09, T: ($0.14)]: Congrats to the Patriots on a perfect regular season. Can they get through the playoffs unscathed? We'll see. I certainly don't expect to see 10+ spreads for them anymore.
  • Cincinnati 38 (-2.5), Miami 25 (45.5 O/U) [P: $6.90, S: $10.00, O/U: ($10.00), T: $6.90]: I thought we'd finally be through seeing the '72 Dolfins, but almost immediately, the talk changed from a perfect season to going 17-0 - getting through the playoffs. If the Patriots lose, we'll still have to hear from the old men, I'm sure.
  • Seattle 41, Atlanta 44 (-2.5) (38 O/U) [P: ($10.00), S: ($10.00), O/U: $9.09, T: ($10.91)]
  • New Orleans 25 (-1), Chicago 33 (40 O/U) [P: $11.50, S: $10.00, O/U: ($10.00), T: $11.50]: Chicago wants Grossman back? Really?
  • Buffalo 9, Philadelphia 17 (-9) (36.5 O/U) [P: $2.86, S: ($10.00), O/U: ($10.00), T: ($17.14)]
  • Carolina 31 (-2.5), Tampa Bay 23 (36 O/U) [P: ($10.00), S: ($10.00), O/U: ($10.00), T: ($30.00)]
  • Dallas* 6, Washington 27 (-9) (39.5 O/U) [P: $2.17, S: ($10.00), O/U: ($10.00), T: ($17.83)]
  • Tennessee 16 (-6.5), Indianapolis 10 (39 O/U) [P: $3.45, S: ($10.00), O/U: ($10.00), T: ($16.55)]: How well will Tennessee do in the playoffs if they can barely beat the Colts with Jim "Career Backup" Sorgi at the helm? In fairness, though, Young was out as well.
  • Detroit 13, Green Bay 34 (-3) (39 O/U) [P: $5.00, S: $10.00, O/U: ($10.00), T: $5.00]
  • Pittsburgh 21 (-4), Baltimore 27 (35.5 O/U) [P: ($10.00), S: ($10.00), O/U: $9.09, T: ($10.91)]
  • San Francisco 7, Cleveland 20 (-11) (40 O/U) [P: $1.82, S: $10.00, O/U: ($10.00), T: $1.82]
  • Jacksonville 28, Houston 42 (-7) (41 O/U) [P: ($10.00), S: ($10.00), O/U: ($10.00), T: ($30.00)]
  • St. Louis 19, Arizona 48 (-6) (47.5 O/U) [P: $3.70, S: $10.00, O/U: ($10.00), T: $3.70]
  • Minnesota 19 (-3), Denver 22 (41 O/U) [P: ($10.00), S: ($10.00), O/U: $0.00, T: ($20.00)]
  • San Diego 30 (-7.5), Oakland 17 (43 O/U) [P: $2.67, S: $10.00, O/U: ($10.00), T: $2.67]: LT leads the league in rushing again. He's done that for a while now. He's pretty good. And apparently, pretty durable.
  • Kansas City 10, New York Jets 13 (-6.5) (34 O/U) [P: $3.57, S: ($10.00), O/U: ($10.00), T: ($16.43)]

Results Summary

  • Picks (this week): 11 - 5 (68.75%) - Winnings: ($5.59)
  • Picks (season): 166 - 90 (64.84%) - Winnings: ($137.74)
  • Spread (this week): 6 - 10 (37.50%) - Winnings: ($40.00)
  • Spread (season): 125 - 118 (51.44%) - Winnings: $70.00
  • Over/Under (this week): 3 - 12 (20.00%) - Winnings: ($92.73)
  • Over/Under (season): 122 - 127 (49.00%) - Winnings: ($160.91)
  • Total Weekly Winnings: ($138.32)
  • Total Overall Winnings: ($228.65)

Playoff picks will be coming soon!

Tags: | |

Categories: Football


 

Tourney Logic Is Now Part Of Develomatic, LLC

posted on 12/29/07 at 09:00:09 pm by Joel Ross

As most of my long-term readers know, I have been a partner in a side business for a while now - longer than I've been writing this blog, in fact. The company is called Tourney Logic, and we've primarily focused on bracket-based systems - our heart and sole product is the Tourney Bracket Control, an ASP.NET control that allows you to dynamically build brackets. We've used that control to build both Tourneytopia and myPlayoffs.com.

Recently, we've branched out, building Pay It Square, a site to help collect money from groups of friends. It actually fits nicely in with myPlayoffs.com, but it's focus doesn't really fit under the Tourney Logic umbrella.

As a result, we've decided to form a new holding company: Develomatic, LLC, which will own the four brands we currently have, as well as future ideas we are working on. From the site:

Ideas drive us. They keep us up all hours of the night. Over the past few years these ideas and our passion and sacrifice for them have become what we call Develomatic. Seeing where our ideas began, and the end result that was realized is a fulfilling journey. At Develomatic we are always pushing the limits with the power of our ideas. We build creative web applications that help our customers build their brands, strengthen relationships and stay organized.

Yeah, that about sums it up.

Tags: | | | |

Categories: Develomatic


 

Setting Up A Sub-Site Under SiteFinity

posted on 12/28/07 at 11:15:51 pm by Joel Ross

On my current project, we're implementing Telerik's SiteFinity CMS product. It's an existing site, so there's lots of custom functionality that we still want to be able to use. Rather than building that into the main SiteFinity site, we opted to keep it separated and put it into a sub-site, with no references to the SiteFinity DLLs.

Of course, once you start, it's never as easy as it sounds. It's honestly not that bad, but there are a few things you have to add to your web.config in the sub-site to get it working. And I'm going to document those here for future reference, and for anyone else who might need this later.

Rather than go through piece by piece, here is a base web.config you can use that should work with sub-sites under a SiteFinity site.

   1:  <?xml version="1.0"?>
   2:  <configuration>
   3:    <appSettings />
   4:    <connectionStrings/>
   5:    <system.web>
   6:      <httpHandlers>
   7:        <remove verb="*" path="*.rss" />
   8:      </httpHandlers>
   9:      <customErrors mode="RemoteOnly" />
  10:      <compilation debug="true">
  11:        <assemblies>
  12:        </assemblies>
  13:      </compilation>
  14:      <roleManager defaultProvider="[TBD]">
  15:        <providers>
  16:          <clear />
  17:        </providers>
  18:      </roleManager>
  19:      <membership defaultProvider="[TBD]">
  20:        <providers>
  21:          <clear />
  22:        </providers>
  23:      </membership>
  24:      <profile defaultProvider="[TBD]">
  25:        <providers>
  26:          <clear />
  27:        </providers>
  28:      </profile>
  29:      <httpModules>
  30:        <remove name="Cms" />
  31:      </httpModules>
  32:      <siteMap defaultProvider="[TBD]">
  33:        <providers>
  34:          <clear />
  35:        </providers>
  36:      </siteMap>
  37:      <healthMonitoring>
  38:        <eventMappings>
  39:          <remove name="Simple Web Request Event" />
  40:        </eventMappings>
  41:        <providers>
  42:          <remove name="Simple Web Event Provider" />
  43:          <remove name="Simple Web Buffered Event Provider" />
  44:        </providers>
  45:        <rules>
  46:          <remove name="SitefinityEventHandler" />
  47:          <remove name="SitefinityErrorHandler" />
  48:        </rules>
  49:      </healthMonitoring>
  50:    </system.web>
  51:  </configuration>


There's a few optional sections in here. roleManager, membership, and profile are only necessary if you are using them, but if you are, you need to provide a different defaultProvider attribute value, since SiteFinity uses a specific one that won't be available to your sub-application. So either delete the sections or change [TBD] to be your provider (which you'll have to add in the providers section).

Tags: | |

Categories: Development, Software, C#


 

07-08 NFL Week 17 Picks

posted on 12/27/07 at 09:00:11 pm by Joel Ross

Last regular season week! It's bittersweet really. There's only 27 games left in the season, and come Monday, we'll only have 11! They'll be some of the best games of the year, but still - only 11 left!

On another note, look closely at the odds. They're screwy this week - Atlanta favored over Seattle, Cincy only a 2.5 point fav, Washington a 9 point favorite over Dallas, etc. It's going to be a tough week to pick. So many teams aren't playing for anything. Less than half of these games have any meaning!

  • New England vs. New York Giants (-14.5) (44 O/U)
  • Cincinnati (-2.5) vs. Miami (45.5 O/U)
  • Seattle vs. Atlanta (-2.5) (38 O/U)
  • New Orleans (-1) vs. Chicago (40 O/U)
  • Buffalo vs. Philadelphia (-9) (36.5 O/U)
  • Carolina (-2.5) vs. Tampa Bay (36 O/U)
  • Dallas* vs. Washington (-9) (39.5 O/U)
  • Tennessee (-6.5) vs. Indianapolis (39 O/U)
  • Detroit vs. Green Bay (-3) (39 O/U)
  • Pittsburgh (-4) vs. Baltimore (35.5 O/U)
  • San Francisco vs. Cleveland (-11) (40 O/U)
  • Jacksonville vs. Houston (-7) (41 O/U)
  • St. Louis vs. Arizona (-6) (47.5 O/U)
  • Minnesota (-3) vs. Denver (41 O/U)
  • San Diego (-7.5) vs. Oakland (43 O/U)
  • Kansas City vs. New York Jets (-6.5) (34 O/U)

Last full week of "Lock Solid" picks. This week: Cincinnati (-145), Philadelphia (-350), Green Bay (-200), and Pittsburgh (-210).

Check back next week for results and the start of the playoffs.

Tags: | |

Categories: Football


 

07-08 Week 16 NFL Pick Results

posted on 12/26/07 at 09:52:07 pm by Joel Ross

I actually was able to make picks for week 16, something I didn't expect to be able to do. And that turned out to be a good thing - I ended up for the week! I'm inching closer and closer to that break even point!

"Lock Solid" picks - well, I'm a ways from even there. This week, I again went 3-1, but lost $3.50. Can't the Pack do anything in the Windy City?!? For the year, I'm 45-19, but down big: $47.07.

As for the market comparison, the value of the stock would be $7,050.36. That's a loss of $149.64, which isn't horrible, considering that takes into account $160.00 in brokerage fees. As for betting, overall I'd have $7,109.67 in winnings. Again, that's down over $90. The difference between playing the market and betting on football seems to be negligible, but remember, this is only over the course of 16 weeks. And of course, don't take financial advice from me!

  • Pittsburgh 41 (-7.5), St. Louis 24 (40.5 O/U) [P: $3.17, S: $10.00, O/U: $9.09, T: $22.27]: This had to be a tough one for Pittsburgh. Losing Parker for the year will hinder their playoff chances for sure.
  • Dallas 20 (-11), Carolina* 13 (43 O/U) [P: $1.80, S: $10.00, O/U: ($10.00), T: $1.80]
  • Philadelphia 38, New Orleans 23 (-3) (47 O/U) [P: ($10.00), S: ($10.00), O/U: ($10.00), T: ($30.00)]
  • New York Giants 38 (-2.5), Buffalo 21 (32 O/U) [P: $7.41, S: $10.00, O/U: $9.09, T: $26.50]
  • Washington 32, Minnesota 21 (-6) (40.5 O/U) [P: $22.00, S: $10.00, O/U: $9.09, T: $41.09]: Who would have thought that the Redskins would be in the playoff hunt after what's happened to their team?
  • Kansas City 20, Detroit 25 (-5) (43.5 O/U) [P: $4.44, S: $0.00, O/U: $9.09, T: $13.54]
  • Cleveland 14 (-2.5), Cincinnati 19 (43.5 O/U) [P: $11.50, S: $10.00, O/U: ($10.00), T: $11.50]
  • Green Bay 7 (-8), Chicago 35 (33 O/U) [P: ($10.00), S: ($10.00), O/U: $9.09, T: ($10.91)]
  • Miami* 7, New England 28 (-22.5) (45 O/U) [P: $0.50, S: $10.00, O/U: ($10.00), T: $0.50]
  • Houston 15, Indianapolis 38 (-6.5) (45 O/U) [P: $3.45, S: $10.00, O/U: ($10.00), T: $3.45]
  • Oakland* 11, Jacksonville 49 (-13) (38.5 O/U) [P: $1.25, S: ($10.00), O/U: $9.09, T: $0.34]
  • Atlanta 27, Arizona 30 (-10) (44 O/U) [P: $2.27, S: ($10.00), O/U: ($10.00), T: ($17.73)]
  • New York Jets 6, Tennessee 10 (-8.5) (36.5 O/U) [P: $2.50, S: ($10.00), O/U: ($10.00), T: ($17.50)]
  • Baltimore 6, Seattle 27 (-11) (39 O/U) [P: $1.54, S: $10.00, O/U: ($10.00), T: $1.54]
  • Tampa Bay 19 (-5.5), San Francisco 21 (36.5 O/U) [P: ($10.00), S: ($10.00), O/U: $9.09, T: ($10.91)]
  • Denver 3, San Diego 23 (-9) (47.5 O/U) [P: $2.67, S: $10.00, O/U: $9.09, T: $21.76]

Results Summary

  • Picks (this week): 13 - 3 (81.25%) - Winnings: $34.50
  • Picks (season): 155 - 85 (64.58%) - Winnings: ($132.14)
  • Spread (this week): 9 - 6 (60.00%) - Winnings: $30.00
  • Spread (season): 119 - 108 (52.42%) - Winnings: $110.00
  • Over/Under (this week): 8 - 8 (50.00%) - Winnings: ($7.27)
  • Over/Under (season): 119 - 115 (50.85%) - Winnings: ($68.18)
  • Total Weekly Winnings: $57.23
  • Total Overall Winnings: ($90.33)

Next week is the last regular season week, so I'll have those picks up shortly.

Tags: | |

Categories: Football


 

07-08 NFL Week 15 Pick Review

posted on 12/23/07 at 09:00:18 pm by Joel Ross

With Christmas right around the corner, not much time here, but here's the week 15 review, a few days late!

My "Lock Solid" picks this week went 2-2, losing $13.21. Overall, I'm 42-18, but down $43.57.I'll go over the market comparison after week 16.

  • Denver 13, Houston 31 (-1) (47.5 O/U) [P: ($10.00), S: ($10.00), O/U: $9.09, T: ($10.91)]:
  • Cincinnati 13 (-8.5), San Francisco 20 (43 O/U) [P: ($10.00), S: ($10.00), O/U: ($10.00), T: ($30.00)]:
  • New York Jets 10, New England 20 (-24) (49.5 O/U) [P: $0.40, S: ($10.00), O/U: ($10.00), T: ($19.60)]:
  • Tennessee 26 (-4), Kansas City 17 (34 O/U) [P: $4.76, S: $10.00, O/U: $9.09, T: $23.85]:
  • Atlanta* 3, Tampa Bay 37 (-13) (39 O/U) [P: $1.11, S: ($10.00), O/U: $9.09, T: $0.20]:
  • Arizona 24, New Orleans 31 (-3.5) (48 O/U) [P: $5.13, S: $10.00, O/U: ($10.00), T: $5.13]:
  • Buffalo 0, Cleveland 8 (-5.5) (44.5 O/U) [P: $4.08, S: $10.00, O/U: $9.09, T: $23.17]:
  • Green Bay 33 (-10), St. Louis 14 (44.5 O/U) [P: $2.15, S: $10.00, O/U: ($10.00), T: $2.15]:
  • Baltimore 16 (-3.5), Miami 22 (38 O/U) [P: ($10.00), S: ($10.00), O/U: $0.00, T: ($20.00)]:
  • Seattle 10 (-7.5), Carolina 13 (38 O/U) [P: ($10.00), S: ($10.00), O/U: ($10.00), T: ($30.00)]:
  • Jacksonville 29, Pittsburgh 22 (-3.5) (38.5 O/U) [P: ($10.00), S: ($10.00), O/U: $9.09, T: ($10.91)]:
  • Indianapolis 21 (-10.5), Oakland 14 (44.5 O/U) [P: $1.67, S: ($10.00), O/U: ($10.00), T: ($18.33)]:
  • Philadelphia* 10, Dallas 6 (-10) (48.5 O/U) [P: ($10.00), S: $10.00, O/U: $9.09, T: $9.09]:
  • Detroit 14, San Diego 51 (-10) (45.5 O/U) [P: $2.11, S: $10.00, O/U: $9.09, T: $21.20]:
  • Washington 22, New York Giants 10 (-4.5) (39 O/U) [P: ($10.00), S: ($10.00), O/U: ($10.00), T: ($30.00)]:
  • Chicago* 13, Minnesota 20 (-10) (43 O/U) [P: $2.00, S: $10.00, O/U: $9.09, T: $21.09]:

Results Summary

  • Picks (this week): 9 - 7 (56.25%) - Winnings: ($46.59)
  • Picks (season): 144 - 82 (63.72%) - Winnings: ($161.67)
  • Spread (this week): 7 - 9 (43.75%) - Winnings: ($20.00)
  • Spread (season): 112 - 102 (52.34%) - Winnings: $100.00
  • Over/Under (this week): 8 - 7 (53.33%) - Winnings: $2.73
  • Over/Under (season): 112 - 108 (50.91%) - Winnings: ($61.82)
  • Total Weekly Winnings: ($63.87)
  • Total Overall Winnings: ($123.49)

Week 16 picks are already up, so you'll have to look forward to those results later this week.

Tags: | |

Categories: Football


 

My Thoughts On Certifications, Explained

posted on 12/22/07 at 09:00:01 pm by Joel Ross

I saw a link to Stevey's Blog Rants in my twitter feed, so I clicked it and started reading through his archives. One of his recent posts is about tips for a good resume. No, I'm not looking for a job, or even to improve my resume, but it's still valuable to see what others are saying.

Anyway, he brings up the topic of certifications.

Certification is for the weak. It's something that flags you as a technician when you really want to be an engineer. If you want to be a television repairman, you can become certified in TV repair. If you want to work for Sony and design their next big-screen TV, then you clearly don't need a busy-working-adults course on how to repair the fugging things.

Same goes for tech certification. It means you had to take a course to learn something you could have read in a book. If you know something, just say you know it, and then be prepared to answer questions about it during your phone screens and/or interviews. If you feel compelled to add that you're certified in said skill, it's just broadcasting that you lack confidence in your own self-assessments, which doesn't help you in the slightest.

That's not totally my view, but it's close. Whenever I'm asked about my view on certifications, I usually respond with a question of my own: Who would you rather have on your project? The developer who is always busy - so busy she doesn't have time to get certified, or the guy who's on the bench a lot, so he has time to study to get certified?

As is the case most of the time, it's not a hard and fast rule for me - I'm an MCP, so I have a certification of my own - but someone with a lot of certifications is usually a sign that something's amiss.

Tags: |

Categories: Consulting, Personal


 

07-08 NFL Week 16 Picks

posted on 12/22/07 at 07:15:53 pm by Joel Ross

I'm back from Florida, just in time to make most of my picks. No time to expand on them, so here they are.

  • Pittsburgh (-7.5) vs. St. Louis () (40.5 O/U)
  • Dallas vs. Carolina* (-11) (43 O/U)
  • Philadelphia vs. New Orleans (-3) (47 O/U)
  • New York Giants (-2.5) vs. Buffalo (32 O/U)
  • Washington vs. Minnesota (-6) (40.5 O/U)
  • Kansas City vs. Detroit (-5) (43.5 O/U)
  • Cleveland (-2.5) vs. Cincinnati (43.5 O/U)
  • Green Bay (-8) vs. Chicago (33 O/U)
  • Miami* vs. New England (-22.5) (45 O/U)
  • Houston vs. Indianapolis (-6.5) (45 O/U)
  • Oakland* vs. Jacksonville (-13) (38.5 O/U)
  • Atlanta vs. Arizona (-10) (44 O/U)
  • New York Jets vs. Tennessee (-8.5) (36.5 O/U)
  • Baltimore vs. Seattle (-11) (39 O/U)
  • Tampa Bay (-5.5) vs. San Francisco (36.5 O/U)
  • Denver vs. San Diego (-9) (47.5 O/U)

Quickly, my lock solid picks are Dallas (-555), Green Bay (-360), Indianapolis (-290), and Jacksonville (-800).

I'll probably post results from week 15 tomorrow, and 16 later next week.

Tags: | |

Categories: Football


 

Extended Properties In The NuSoft Framework

posted on 12/21/07 at 09:00:17 pm by Joel Ross

While I'm away on vacation, I figured I'd put up a series of posts on the NuSoft Framework. This is one of those posts.


I've used the NuSoft Framework for a few different projects, and one pattern that keeps recurring is the idea of "extended properties" - properties that are convenient to have on an entity, but that don't get stored in the database table for that entity. Here's an example of how you can add a couple of properties to a Customer object - to allow easy access to a customer nick name and to summarize the number of orders a customer has.

You could get to each of these values fairly simply, but it would have be lazy loaded, meaning that if you had a list of customers and wanted to show the number of orders for each customer, you'd be hitting the database once to get the list, and then once for each customer in the list. This would result in 1001 hits for a list of 1000 customers. Using this pattern, you can get all of this information in one database hit, and still be able to load on demand as necessary.

The first step is to add the properties:

   1:          private int _orderCount = int.MinValue;
   2:          public int OrderCount
   3:          {
   4:              get
   5:              {
   6:                  if (_orderCount == int.MinValue)
   7:                  {
   8:                      FillExtendedProperties();
   9:                  }
  10:                  return _orderCount;
  11:              }
  12:              set
  13:              {
  14:                  _orderCount = value;
  15:              }
  16:          }
  17:   
  18:          private string _customerNickName = String.Empty;
  19:          public string CustomerNickName
  20:          {
  21:              get
  22:              {
  23:                  if (_customerNickName == String.Empty)
  24:                  {
  25:                      FillExtendedProperties();
  26:                  }
  27:                  return _customerNickName;
  28:              }
  29:              set
  30:              {
  31:                  _customerNickName = value;
  32:              }
  33:          }


Above are the two properties. Each acts like a simple property, except if the value isn't set, it calls FillExtendedProperties(), which will populate all of the extended properties. We took the approach that if you're going to take the hit to populate one extended property, let's just go ahead and populate all of them at the same time - again, to keep the database hits to a minimum. Here's what we do in FillExtendedProperties():

   1:          private void FillExtendedProperties()
   2:          {
   3:              using (SqlHelper helper = new SqlHelper())
   4:              {
   5:                  string commandText = "GetCustomerExtendedProperties";
   6:                  
   7:                  List<SqlParameter> parameters = new List<SqlParameter>();
   8:                  parameters.Add(new SqlParameter("@CustomerID", this.CustomerID));
   9:                  
  10:                  using (IDataReader reader = helper.ExecuteDataReader(
                                  commandText, CommandType.StoredProcedure, ref parameters))
  11:                  {
  12:                      if (reader.Read())
  13:                      {
  14:                          FillExtendedProperties(reader);
  15:                      }
  16:                  }
  17:              }
  18:          }
  19:   
  20:          private void FillExtendedProperties(IDataReader reader)
  21:          {
  22:              this.OrderCount = int.Parse(reader["OrderCount"].ToString());
  23:              this.CustomerNickName = reader["CustomerNickName"].ToString();
  24:          }


In it, we call a stored procedure called GetCustomerExtendedProperties. This would be a custom stored procedure that would return (in this case) the customer's nick name and a count of the customer's orders. Once that's done, we read those values and populate all of the extended properties.

Note that so far, this doesn't solve the problem of being able to retrieve a whole list of customers with the extended properties already populated. To accomplish that, you'd use a new static method that gets all of the information to populate a customer, including the extended property values:

   1:          public static EntityList<Customer> GetFullCustomers()
   2:          {
   3:              using (SqlHelper helper = new SqlHelper())
   4:              {
   5:                  string commandText = "GetFullCustomers";
   6:   
   7:                  List<SqlParameter> parameters = new List<SqlParameter>();
   8:                  EntityList<Customer> customers = new EntityList<Customer>();
   9:   
  10:                  using (IDataReader reader = helper.ExecuteDataReader(
                                  commandText, CommandType.StoredProcedure, ref parameters))
  11:                  {
  12:                      while (reader.Read())
  13:                      {
  14:                          Customer customer = EntityBase.GetEntityInstance<Customer>();
  15:                          customer.Initialize(reader);
  16:                          customer.FillExtendedProperties(reader);
  17:                          customers.Add(customer);
  18:                      }
  19:                  }
  20:   
  21:                  return customers;
  22:              }
  23:          }


This code pulls from some of what's done in EntityBase up into our custom code to accomplish what we want to do. To start with, we call a new, custom stored procedure called GetFullCustomers. That would return all of the fields in the customer table, as well as the extended properties. And remember, this gets a list of all customers, but it could easily be parameterized to return a filtered list of customers.

We're starting to look at another release of the NuSoft Framework, and are trying to determine what features to add. I've thought about incorporating this into the framework as a better supported pattern. My initial thoughts to make this happen would be to have an ExtendedProperty attribute you could add to any property, and use that in conjunction with an IExtendedProperties interface. The interface would require you to implement the FillExtendedProperties methods. I'm not sure of the actual implementation, but I think we could make this a little simpler by incorporating some of it into the framework. If you're using the framework, would this be something helpful to add?

Tags: | |

Categories: Development, Software, RCM Technologies


 

<< 1 ... 11 12 13 14 15 16 17 18 19 20 21 ... 124 >>