2

We're converting from ColdFusion to ASP.NET 4.0 and we just don't know which route to take with setting up our classes.

In college I was taught to break everything up into separate Data Access Classes and Entity Classes that speak to the DAC. To me, that's the best option for a team that needs a lot of control over their classes and needs to reuse multiple items.

Then there is LINQ... Sure.. It's great and fast! I have no problems writing my own queries though. To me, it's not something I really need. None of us on the team need the help from LINQ actually.

I would think we should be using folders that contain our DAClasses and folders that contain our Entity Classes. Then we would have our actual .aspx presentation pages.

Any ideas on which route we should be taking?

Michael Stone
  • 950
  • 2
  • 14
  • 30

1 Answers1

1

If you're going to go through the pain of moving from an existing platform to a new one anyway, look at ASP.NET MVC.

The Model-View-Controller methodology is a potentially cleaner way of thinking about web development, and it achieves the separation of concerns your team seems worried about.

On a different note, you make it sound like LINQ and other such technologies are crutches. They are not unless you use them that way (as in, not being able to do data access without it). They are there as a tool to make your life as a developer easier and development go faster.

Knowing how it works is great, if you didn't know I would be of the mindset that you shouldn't use it. But you clearly state that you do understand it, so why not leverage it?

Ben L.
  • 786
  • 7
  • 15
  • We had professional training on ASP.NET and our instructor specifically stated that LINQ would be best for RAD, but if you're looking to have more control, then it'd be best to use native ADO.NET and Data Access Classes. We've also looked into MVC quite a bit and I understand most of it, but I'd also like to actually get things working without the help of a framework quite yet. You know PHP, so you understand that ASP.NET is WAY different than traditional web programming. Does theframework kind of close the gap on some of the differences and ties it closer to what web programmers are used to? – Michael Stone Feb 17 '11 at 20:15
  • 1
    Careful now, avoid the "not-invented-here" syndrom. In the real-world people use frameworks and libraries because re-inventing the wheel is pointless. That said, MVC is not a framework, .NET is a framework. MVC is a design methodology that can be applied to any web programming language. For example, I haven't started a new PHP project without first setting up CodeIgniter in forever (a framework specifically set up to facilitate MVC). Web programming is web programming. Despite .NET's attempt at abstracting a lot of the specifics away, it's not really that different. – Ben L. Feb 17 '11 at 20:29
  • Having more control not using LINQ is true. I would go that route if you specifically needed performance optimized SQL queries that require hand-crafted fine-tuning. – Ben L. Feb 17 '11 at 20:33
  • Well put. I know that MVC is a design technique too and I don't know why I called it a framework.. Do you agree that it'd be smart to walk before run though? Get our hands dirty with ASP.NET before introducing and implementing MVC? We didn't start off using CodeIgniter with PHP. – Michael Stone Feb 17 '11 at 20:33
  • We actually do a lot of custom queries that get rather large. I can definitely understand that by using LINQ on smaller less dependent applications, we can minimize the time of development. – Michael Stone Feb 17 '11 at 20:35
  • It depends, if by "getting your hands dirty" you mean rebuilding your entire product using Web Forms and then rebuilding it again using MVC, I would say no. One is not a prerequisite to the other, either way your team is learning ASP.NET, why not have everything in the final desired architecture from the start? – Ben L. Feb 17 '11 at 20:36
  • What about building a good starter application without MVC and then building it again with MVC? Then we slowly convert the rest of the site to ASP.NET MVC. We haven't even done much of anything with migration yet. Finishing up the planning stage so we don't rush in it and have one big FAIL. – Michael Stone Feb 17 '11 at 20:39
  • The value of something like that will depend on each individual. That should really be a debate between and decision made by the team. – Ben L. Feb 17 '11 at 20:44