Tech

Shreveport .NET User Group

Posted in Tech on July 4th, 2008 by Brian – Be the first to comment

Most of the people who read my blog know this already, but I’m in the process of starting up a .NET user group in the Shreveport/Bossier City area.  The group in Fort Smith got started just a couple months before I left, but it was something that I really enjoyed and felt had real value for developers interested in improving their craft.  When I got to Louisiana, I was surprised to find out that a city the size of Shreveport didn’t have a user group already, so I thought it was about time we did.

I got some great advice from Michael Paladino, the leader of the group in Fort Smith about sponsorships, delegating leadership, and related organizational matters.  Getting swag was actually a lot easier than I expected it to be.  Every single vendor I contacted offered to give us something. One of the first component vendors I contacted, Telerik, offered to give us a license to their CMS package Sitefinity, as well as free hosting through a pertnership with DiscountASP.net.  You can find the site at www.shreveportdnug.org.  It’s kind of bare-bones right now, I apologize.  It’ll fill out as we nail more things down logistics-wise.

The hardest part, which I still haven’t figured out yet, is finding free space to meet.  Most of the businesses that employ .NET developers in the Shreveport area rent office space from the large buildings downtown, so parking and difficult after-hours access make those a no-go.  I tried a couple of local universities, but the facilities they could provide would only hold arond 30 people max.  Not exactly a limitation I’m confortable with.  We’ve got one more school to try, but I have a bit of an inside track there because the son of the university president works for my current employer.  That means that I’m not the one in charge of calling the appropriate people, but I’m not sure it’s a very big priority for the son.  I need to ping him about it again on Monday.  There’s one facility at one of the schools that sounds perfect, but it’s $120 per use of the room, and I’d like to keep the amount we have to get from sponsors to a minimum.  If anyone else has some suggestions about where to look for space, please leave a comment!

I’ll continue to post about this as we get closer to holding our first meeting.  Wish us luck!

Where’s the Real Reuse in ASP.NET MVC?

Posted in Tech on June 19th, 2008 by Brian – 7 Comments

Just a quick note here.  I was playing around with ASP.NET MVC today, and I got to thinking, how does one encapsulate both behavior and markup (a la UserControls in WebForms) when using MVC?  Well, there’s a thing called a ViewUserControl that you can use in your ViewPages, but all that really does is encapsulate the markup and rendering.  You’d use them like this:

MyViewUserControl.ascx

And then you would call it from the ViewPage:

MyViewPage.aspx

If you use a typed ViewUserControl, you can feed the object to the RenderUserControl method as an additional parameter rather than going to the ViewData collection, but that’s not what gets to me.

The controller that renders MyViewPage.aspx is still responsible for retrieving all the data that MyViewUserControl.ascx uses. So, everywhere that I want to display that list of sponsors, I have to remember to write the code to go get it. That’s not really reuse, is it?

There was a comment on Rob Conery’s blog back in January that I ran across that suggested something like this:

That way, there can be one controller that’s responsible for pulling that Sponsor data from the data access layer. I’m not sure if this is possible; I’m not familiar enough with the way MVC works to know if a second (or third, or nth) controller can be created and called once the main controller has started rendering MyViewPage. From an end-user perspective, something like that would be great, since it would let us truly encapsulate every aspect of what that ViewUserControl is about. Here’s hoping!

Sprocs? Really?

Posted in Tech on June 10th, 2008 by Brian – 5 Comments

I’ve been studying for my first SQL Server certification (70-431, if you’re curious).  I read the chapter today on “Implementing Stored Procedures.”  As I was reading, the following passage got my attention:

The permission delegation possible with stored procedures provides a powerful security mechanism within SQL Server.  If all data access – insertions, deletions, updates, or selects – were performed through stored procedures, users could not directly access any table in the database.  Only by executing the stored procedures would users be able to perform the actions necessary to manage the database.  And although users would have the permissions delegated through the stored procedures, they would still be bound to the code within the stored procedure…

How is this in any way desirable?  Who are you actually trying to keep the real data away from?  The only answer that is obvious to me is developers.  The author seems to be describing some personal utopia, where no childish developers could destroy what the mighty DBA hath wrought.

He says in an earlier section, “Even more important, stored procedures hide the structure of a database from a user…”  Hide the structure of the database?  Again, why?  How could developers make informed decisions about creating data access layers if they don’t even know what tables the data is on?

The author also says that using stored procedures lets you “…isolate database code for easy maintenance instead of requiring you to find hard-coded SQL statements throughout an application if you need to make changes.”  A worthy goal, certainly, but is the answer really to put the executable code in the database?  I would think that a well-crafted data access layer would do a much better job of this.  Conventional languages offer much more flexible language environments, and code changes are tracked by source control.  You can put stored procedure definitions in source control, but it’s in no way integrated into SQL Server.  It’s basically the same developer experience as checking in some unrelated text file to some arbitrary directory in your tree, which has has no real bearing on what’s actually running in the DB at the moment.

I’ve heard people talk about the database-centered approach espoused by MS, but this really makes it clear.  It’s as if the author feels that the best application would be one with as little application code as possible, basically a thin veneer over a relational database.  Since I’ve worked for the first three years of my career in a shop that used DB2 (with absolutely no stored procedures), I guess I haven’t even been offered this particular flavor of Microsoft Kool-Aid until now.  If this has been the Redmond gospel for a while, I can see why using OR mappers must feel like such as breath of fresh air to some people.

For what it’s worth, I’m planning on using ASP.NET MVC with Castle’s ActiveRecord for my next pet project, a little site I’m putting together for my mom’s fiancee.  I’ll be sure to record my impressions of that story.

Vilification of the 5:01 Developer

Posted in Tech on May 22nd, 2008 by Brian – 2 Comments

 

I was listening to the Alt.NET Podcast the other day (which I recommend to anyone interested in this sub-community), and something Chad Myers said really resonated with me.  To paraphrase, developers for whom programming is simply a job do not deserve our scorn.  As satisfying as it may be to rant about the abysmal level of knowledge of best practices in the .NET community (or any programming community), care needs to be taken not to alienate those developers.  It is not our place to make that kind of value judgment.  A person who we may call a “5:01″ developer may have a sick family member that needs care.  They may be passionate about something else, like church missions or other charitable work.

 

And whether any of those things is true about each of those developers or not is irrelevant anyway.  No matter what, we will always have co-workers who don’t share our near-obsessive level of dedication to the craft of software development.  If any movement like Alt.NET is to ever have any real impact on the overall .NET environment, the 5:01 crowd has to be reached.  As Chad said, dedicated developers need to “work inside their motivation.”  5:01′s are (by definition I suppose) at work for a whole eight hours.  If we can’t reach someone in that amount of time, it’s our failing, not theirs.

 

In addition, I think some people may be underestimating the level of professionalism of 5:01′s.  In my limited experience, when I show someone else at work a better way to do something, more likely than not, they’ll say, “Oh, OK. That’s cool, I’ll do it that way from now on.”  Just because someone doesn’t go home and blog every night doesn’t mean that they’re dumb, lazy, or not concerned about the quality of their work.

 

If the Alt.NET community truly wishes to become more “democratized,” as was mentioned in the podcast, that has to include a strategy for reaching out to workday developers.  It can’t be seen as cliqueish, or it will drive away the proverbial “80%” and never really achieve its stated goals.