Tuesday, January 22, 2008

I've been thinking about the EntityDataSource that has been mentioned in the forums. It is something that is going to be added to Entity Framework by RTM, but it doesn't exist in current bits for us to experiment with.

The reason I've been thinking about it is because of some of the issues/confusion with the LINQDataSource and I'm really hoping that the EF team will be looking at that, learning from it, and making sure that some of those problems don't exist in the new component.

Most of the issues with the LINQDataSource are a result of very realistic limitations. But where I see the problem is just the difficulty many users have using it because they don't understand what's going on underneath and to work within the limitations, there are some very non-intuitive things they need to do.

I wrote a bunch of LINQDataSource demos for a presentation and spent a lot of time learning workarounds in order to achieve some very common scenarios although not quite as common as the typical demos. That's where I hope EntityDataSource makes it easier. I don't want to have to work so hard to discover how to make it work.

Here's an example of a something I think is a common scenario.

I have an Entity for SalesOrderHeaders from AdventureWorksLT.

I would like to have an editable gridview of these records.

I'd like to display the customer name in the grid not the customer ID.

Not too strange, right?

But there are a lot of issues encountered along the path to create this solution.

1)One of the most often asked questions about the LINQDataSource is "why can't I edit?". The answer is most often because the developer selected the fields they wanted displayed in the grid and a huge number of people don't realize that they are creating an anonymous type by doing this. Yes there are some clues. The "advanced' button goes away. There's no "enable delete" etc. checkboxes on eh Task menu.

A better way? It would be much easier if the wizard started out by asking if you have any intention of editing and if the answer was yes, does NOT present the end user with the option to select fields.

An even better way? I know the model won't allow this but it would be great to have another entity definition (subset of the properties) for this entity without creating an EntityKey conflict.

2) This also means that I can't really take touch the CustomerName in the EntityRef (SalesOrderHeaders.Customer)unless I create an anonymous type, which I don't want to do. So the next obvious solution is to create a LINQDataSource for the Customers and format the CustomerID column in my gridview to be a template field with a dependency on the CustomerLINQDataSource.

         <asp:templatefield HeaderText="CustomerID" SortExpression="CustomerID">
                    <edititemtemplate>
                        <asp:DropDownList ID="DropDownList1" runat="server"
                            DataSourceID="LinqDataSource2" DataTextField="CompanyName"
                            DataValueField="CustomerID" SelectedValue='<%# Bind("CustomerID") %>'>
                        </asp:DropDownList>
                    </edititemtemplate>
                    <itemtemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("Customer.CompanyName") %>'></asp:Label>
                    </itemtemplate>
                </asp:templatefield>

But this creates yet another problem that I may not have any awareness of. The default deferred loading will cause an extra round trip to the database for each SalesOrderHeader record to get the CustomerName.

A better way? Give us a Deferred Loading or Eager Loading option in the wizard!

3) There is a really weird gotcha because we are using EntityRefs for the CustomerID/CustomerName DropDown. Editing doesn't work properly unless you set the LINQDataSource property to StoreOriginalValuesinViewState to False. It's logical but again, totally non-intuitive. If you don't do it, you will get this error message:
"System.InvalidOperationException: Could not find a row that matches the given keys in the original values stored in ViewState.  Ensure that the 'keys' dictionary contains unique key values that correspond to a row returned from the previous Select operation." That's scary, huh? It took some googling to figure this one out.

A better way? If the LINQDataSource could trap this exception and give some better guidance about what the problem is and how to deal with it. Or something...


These are some of the things I spent a ridiculous amount of time on in order to get this scenario working. And seems like nothing compared to what Roger Jennings banged his head on!

It would be great not to have to go through this again with the ObjectDataSource, if it's possible to make some of these issues easier to deal with!

Tuesday, January 22, 2008 12:30:15 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Monday, January 21, 2008

I was just bemoaning the fact that I won't be able to drive to Boston for David Chappell's special appearance at a multi-user group event at the end of the month when I discovered that he'll be doing the keynote at the Developer Summit in Stockholm, Sweden where I will also be presenting.

<plug> I'll be doing a full day workshop on Entity Framework as well as an Advanced EF session and a Silverlight Annotation session.</plug>

Monday, January 21, 2008 7:39:11 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Kathleen Dollard recently wrote about VS2008 letting us easily make our app settings publically accessible to other projects. It inspired me to share my solution for how I did this in VS2005 when it wasn't so easy. Read more...

[A New DevLife Post]

Monday, January 21, 2008 1:54:23 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Sunday, January 20, 2008

For the last bunch of years, Rich and I have subscribed to Netflix during the winter when it gets dark early and cancel it around late spring when we can stay outdoors later, then start up again around Christmas time.

When Netflix introduced streaming this summer, we started looking into options for connecting our laptops (no s-video or DVI) to our TV. We never thought of watching the movies on our computers. At first, the offer was that you could watch as many hours as the cost in dollars of your plan - $19/month for the 3 movies at a time plan meant you could also watch 19 hours online. Which should be more than enough!

But that all changed recently when Netflix opened up the streaming with no limits (that I'm aware of).

We still, however, don't have the hookup for the tv.

But I've been sick with a really nasty cold for the past week which seems to get worse and worse. Can you imagine ME actually not being able to talk! (Yes, Rich thinks its a small miracle! :-)) But today, I curled up in bed where I wanted to be, picked a sweet, not quite sappy, indy film (The Treatment) and watched it over the wireless network in our house. It was perfect.

There was a point when it went a little crazy because I ran out of room on my C:\. SO I had to crash it and go clean up things like the 4GB VS2008 install file that was on my desktop and then I watched the rest of the movie with no problems.

 

Sunday, January 20, 2008 6:57:54 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Saturday, January 19, 2008

And you thought Microsoft files a lot of patents!

Here's the article:

http://www.burlingtonfreepress.com/apps/pbcs.dll/article?AID=/20080119/BUSINESS/801190312/1003

Saturday, January 19, 2008 10:26:37 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

I had never really though thought about using a spell checker for my code comments before. A blog post on the WebDevTools team blog got me thinking more about it. Read more

[A New DevLife Post]

Saturday, January 19, 2008 11:05:34 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [2]  | 
 Friday, January 18, 2008

I was moving some code around and had a nice WCF Service Interface and Service Class created. So I copied them into a new project where I was re-creating my work.

When I tried to debug (self-host) the service, just to test it out with the embedded WCF Test Client.

But I kept getting this error:

"The client was unable to retrieve service metadata. Make sure the service is running and exposing metadata."

This made no sense. My config file was fine. I even created a new WCF service in the solution, confirmed that it worked properly, then compared the config files line by line.

No problems.

After going around in circles for a while (including getting zero google results for that error message), a thought occurred to me. I copied and pasted the entire contents of the Interface and the service class. I hadn't changed the namespace!

That was the problem. I fixed the namespace and the service ran in the Test Client just fine.

Friday, January 18, 2008 4:52:42 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [2]  | 

A few weeks ago, I was mooning over Extension Methods. Somehow, in the collection of language enhancements to VB9 and C#3, they have become a bit of a sleeper feature in light of LINQ. Everything is though, right?

So I wrote about them and thought about them, but then went back to my task at hand.

Danny Simmons also recently started seeing the light about Extension MEthods. But instead of going back to what he was doing, he spent quite a bit of time playing with them and is now blogging an Entity Framework Extension Method Extravaganza!

He's going crazy with it already. What fun!

Friday, January 18, 2008 1:59:26 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

How dorky is it that two programmers are all excited about showing each other the complex reports they have pulled off with Crystal? :-)  read more

[A New DevLife Post]

Friday, January 18, 2008 8:44:37 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

You can now finally get at the .NET Source code through VS2008! Read more

[A New DevLife Post]

Friday, January 18, 2008 8:42:43 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Memory is really cheap now - computer memory has dropped and thumb drives capacity is getting really big. Why is it that it makes me even more of a worrier? read more

[A New DevLife Post]

Friday, January 18, 2008 8:41:36 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Monday, January 14, 2008

Jeff McWherter and his very cool wife (what a lucky geek he is!) have come from Lansing, Michigan to Vermont with hopes of ice climbing and so that Jeff can speak at the VTdotNET group. Unfortunately we lost all of our snow in the last week (though it's finally snowing again) and the good ice for climbing is a little hard to find right now. Our neighbor, a rock climber, made some calls last night and hooked them up with some good insider info on where there's some good ice. I told Jeff he can't do that until AFTER he has spoken to the user group. Not that I want him to whack that brainy skull of his in half AFTER the user gruop presentation either!

When I spoke in Michigan this summer, Jeff came to my presentation both nights. It was the same talk , well at least the same title: Intro to Entity Framework, two nights in a row. He witnessed that the two talks were completely different from one night to the next.

We took them to a great local brew pub last night (BobCat Cafe in Bristol, VT). I will see if it's possible to get a photo of Jeff without a glass of beer in his hand.

Definitely looking forward to tonight's presentation!!

We also are fortunate to have gobs of swag. The magazines (CoDE and aspNET Pro) have been piling up for two months (they always seem to arrive the day after the meeting). We got lots of books sent at Christmas time and I always seem to have a bunch of Infragistics .NET Advantage licenses to give away now.

Additionanlly, we have a sponsor taking care of the whole meeting's expenses- room fee and pizza - tekSystems. Thanks!!

Monday, January 14, 2008 10:46:21 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Saturday, January 12, 2008

I am very excited about this!!

I will be presenting 2 sessions and a full-day workshop at the Developer Summit 2008 in Stockholm April 9-11.

The workshop is "Entity Framework 0-60"  and the sessions are Entity Framework in the Enterprise and Silverlight Annotation.

Patrik Lowendahl, one of the organizers, tells me that Stockholm is really lovely in the Spring!

It also means I get to see my buddy Christian Weyer and meet Tess Ferrandez (the ASP.NET goddess at Microsoft Support), Jimmy Nillson and a bunch of people I've heard about for a long time and not had the chance to meet.

In case you can't get to Sweden, I"ll be doing the full-day workshop at DevConnections in Orlando in late April.

Saturday, January 12, 2008 8:44:42 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [3]  | 

Data Systems has a full-time opening for a good problem solver with a solid programming background and a strong interest in designing, coding and supporting accounting applications.

We have an immediate need for an entry-level programmer but would consider creating a position for the right candidate with more experience in software development or  accounting.

Data Systems is a worker-owned corporation and candidates with an  interest in being a business owner are encouraged to apply.

Job Requirements
Work with senior analysts to design software for new applications, support and enhance existing products written in the fourth generation programming language PRO-IV. We will provide training in our development environment. Other useful skills for this position include experience in accounting, software sales, system administration on Linux, Unix, or Win2000,  database administration, Java, Ruby, PHP, or web design.

Email resumes to datasystems@datasystems.coop

 

Saturday, January 12, 2008 11:54:01 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Thursday, January 10, 2008

Every time I see a reply on a forum, listserv or a blog comment that starts with "Err..." or "ummm...", it translates in my brain as "how stupid are you anyway?" and reeks of arrogance.

I've always wondered if it's intentional and if the person writing this realizes the effect it has...

Generally I give them the benefit of cluelessness.

Thursday, January 10, 2008 10:52:01 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [7]  | 

--copied and pasted from hiring company --

Pad Print Machinery in East Dorset Vermont

 

Software Developer’s Dream Job

 

Here’s your chance become an integral member of a small team now developing an entirely new set of software designs.   Conceive and design software to dynamically create or manipulate graphic image data.  Explore the fascinating real world of digital color management.   Experiment with dithering algorithms for error-reduction in our printing processes.  Conceive and design new software to handle Customer product using robots. 

 

Our software will control an entirely new line of industrial equipment utilizing piezoelectric, drop-on-demand, ink jet and material deposition printing technologies. 

 

We are a solid, industrial manufacturing company based in the beautiful Green Mountain state of Vermont, expanding into the rapidly growing frontier of industrial digital ink jet machines.

 

Experience

And you? You have a minimum 3 or more years experience with a .NET language, or 5 or more years experience with C++ and 1 or more years experience with a .NET language, and experience with development of software for industrial applications.

 

Additionally, you have the ability to conceive and implement object oriented designs and have demonstrated experience with one or more techniques for communicating and modeling software requirements, component interfaces and software designs (UML, written user scenarios/use cases, design patterns, etc).

 

Specific experience with any one or more of the following a PLUS:

            -  motion control and related safety logic

            -  development using QNX real time operating system

            -  digital image processing

            -  test driven design/development

            -  design and execution of UI usability studies.

 

BS in an Engineering discipline or Computer Science a PLUS.  

 

 

The job

 

The software to be developed and maintained will provide image processing, motion control, and ink supply maintenance functions. Over the life of this product line, software will be repeatedly adapted/customized for unique printing and product handling applications.

 

As part of this job, you will: perform design analyses which identify at least one alternate design and rationale for the final design selection of any new major software functionality to be implemented; implement software solutions consistent with agreed requirements and software design; on occasion ‘bolt together' existing software products as needed (getting incompatible platforms to work together and creating code to link them); utilize a system of source code control (Seapine SCM); continue development of existing systems by analyzing and identifying areas for modification and attend company-sponsored training in order to keep up to date with advances in the Industry as it relates to software design and development, particularly as it relates to the data processing needs of a digital printing business.  

 

Does this sound like your idea of fun? Then you are the kind of person who will “fit” into the team we are building, and the company you will be a part of. We are a lively, caring group that is dedicated to customer service, quality and teamwork.

 

 

For more information contact:

Laura Kwapien, Senior Software Engineer (lkwapien@padprintmachinery.com)

Thursday, January 10, 2008 9:34:57 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Wednesday, January 09, 2008

RESOURCE SYSTEMS GROUP is a multi-disciplinary, employee-owned consulting firm specializing in the planning, analysis, and management of business, infrastructure and natural resources. We serve clients who share our belief that high-quality, objective analysis is a prerequisite to resolving complex problems. More than just analysts, scientists, and engineers, we’re communicators – our study results are clear, concise, and directly applicable to a client’s particular questions and challenges. Our solutions are creative and grounded by 20 years of experience with clients as large as federal government agencies and Fortune 500 companies or as small as neighborhood interest groups and local municipalities.  Recognized as one of the “Best Places to Work in Vermont” for the 2nd consecutive year and named as one of the “Best Workplaces for Commuters”, RSG employees enjoy excellent benefits, flexible hours and opportunities for advancement. We are an equal-opportunity/affirmative action employer.  Please visit www.rsginc.com for more information on Resource Systems Group. 

Associate – Software Development

White River Junction, VT

 

This position involves working in the Technology Group, supporting the firm’s software and analysis needs. The primary focus will be developing fully dynamic web-based solutions from interface to business logic to back end database design. We are looking for someone who is organized, resourceful, and analytical to join our team.

 

·         Bachelor’s degree with emphasis in computer science or a related field

·         Practical experience in the following areas:

o    Web Development in HTML and CSS

o    Database programming in SQL

o    Modern object-oriented programming (e.g. C#, VB.Net, Java)

 

Please send resume and cover letter to Recruiting Director at employment@rsginc.com and indicate Associate Software Development in the subject heading.

Wednesday, January 09, 2008 5:08:11 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Roger Jennings pointed out this quote from Dare:

"...even though I’ve been using C# for the past five or six years, I feel like I have to relearn the language from scratch to fully understand or be able to take advantage the LINQ features."

which lines up with my previous post talking about what it seems to take to learn LINQ well and comparing it to the 10 years I have spent absorbing TSQL.

Wednesday, January 09, 2008 11:45:45 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [2]  | 
 Tuesday, January 08, 2008

WHen I got VIsta, I jsut started using it. None of this studying business for me, no sir. SO of course, I have no idea where many functions are or how to use so many of the new features (or even what they are). I find them by chance or necessity or just osmosis.

One thing I never really knew was what happened to the Run command. I figured maybe they decided it was a bad idea because it used to be up front and center in XP and earlier version fo windows

But I knew where the "Command Prompt" was in Vista, so I never bothered looking for the Run option.

Just now I was looking for the Magnifier function - I know I saw it once (again, by accident), so I opened up the start menu, then accessories, and what did I notice? My old friend "Run"!

So back to the Magnifier. I found it easily enough using the Search (see I know a few things in Vista), but that still didn't tell me where in the menu it lives. But I also am familiar with one of my favorite little Vista utilities, the "Open File Location" option in the context menu, which helped me see that the Magnifier is in Ease of Access

Now, if only I could remember what I wanted the Magnifier for to begin with!

Tuesday, January 08, 2008 9:17:08 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [6]  | 

As per Jaroslaw Kowalski on the EF team:

"We are working with SQL Server CE team to get an updated version of their provider that will be compatible with EF Beta3 out soon. It is a matter of weeks"

source: MSDN forums

Tuesday, January 08, 2008 4:11:17 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  |