views:

2528

answers:

9

Hello,

I am looking to develop a website for a news channel.

So, Obviously its gonna receive a lot of hits daily and will be updated a lot on daily basis..

I have experience in ASP.Net and SQL Server..

These are the technologies i am considering to work with. Please help me choose the right method considering the amount of load it will take..

Technology??

1) ASP.Net Webforms

2) ASP.Net MVC 1.0

And data access??

1) Linq to SQL (Impressive but rumours say Microsoft is abandoning it)

2) Linq to Entities (Performance issues)

3) Datreader/Dataset

4) SubSonic (No idea)

5) NHibernate (No idea)

Please explain your point while leaving your comment..

Thanks

Chitresh

A: 

Performance-wise, they are all capable of handling thousands of concurrent users.

The single biggest performance consideration on any high-traffic site is caching. WebForms/MVC have excellent options for output caching actual rendered HTML (most efficient), and API caching of your data objects.

I think your best bet will be to use the data access framework in which you're most comfortable developing - which design pattern/toolset you're most familiar with. After that: cache, cache, cache.

Peter J
A: 

You have experience with ASP.NET and I say stay with that, but if you want to learn some new it's ASP.NET MVC good way.

Data Access depends what you need and what you prefer.

LINQ2SQL and DataReader/Dataset using direct access to DB and it's fine for simple application.

LINQ2Entities, SubSonic and NHibernate are ORM frameworks and it's good for application where you need extensibility in future.

And it's good use some repository pattern to access data.

MicTech
A: 

Microsoft isn't "abandoning" Linq-to-SQL per se, just not adding major functionality to it (in lieu of adding functionality to EF instead).

My bias would be to use ASP.NET MVC with Fluent-NHibernate. I think using those tools gives a nice balance of flexibility and ease of use. However, if you have more experience with WebForms, then using it instead will reduce your ramp-up time. I would also tend to avoid using DataSets unless absolutely necessary if you plan to use straight ADO.NET.

mgroves
I do not mind learning new things... But i may have just 3-4 weeks to deliver the application. ASP.Net MVC is selected.. But am still confused about Data Access.. Any other suggestions please... thanks
Chitresh
3-4 weeks for a news channel site? Sounds...ambitious. Make sure to give your Data Access Layer an interface, make a decision about the ORM (I'd probably go Linq-to-SQL given the short period of time), and you can always change the implementation later.
mgroves
well.. thanks.. i am a young learning engineer... so ambitions are there.. lets see... what i can achieve.. thank you anyways sir
Chitresh
A: 

Hello,

Since you are already familiar with ASP.NET and SQL, why not look into ASP.NET MVC and SubSonic. I think the new .NET MVC promotes cleaner and more organized code and the SubSonic ORM seems to get you up and running very fast for getting your data base involved with your code. Here's a link to find out more about SubSonic http://subsonicproject.com/docs/The_5_Minute_Demo. There's my thoughts! :)

BTW, I personally use ASP.NET MVC and NHibernate.

CalebHC
is nhibernate easy to learn? and can you provide any helpful links sir?
Chitresh
Umm, that's the downside of NHibernate. It has a pretty steep learning curve but once your over it is an awesome ORM! Here's a good comprehensive tutorial to get you up and running http://blogs.hibernatingrhinos.com/nhibernate/archive/2008/04/01/your-first-nhibernate-based-application.aspx. Btw, if you're in a hurry I would probably avoid NHibernate and use something like Linq-to-Sql to get going. It's a pretty good basic ORM.
CalebHC
+2  A: 

If I were you I would use LINQ to SQL without fear of Microsoft "abandoning" it. First, Microsoft isn't abandoning LINQ to SQL they're creating another path for it for the purposes of allowing other vendors (Oracle, DB2, etc) to LINQ into it so-to-speak. I have read several posts by key members of the LINQ team and they will continue making modifications to LINQ to SQL and the migration path from that to their newer tool will be easy. Second, LINQ to SQL is soooo easy to use with the data context. If you know SQL then learning LINQ isn't too difficult.

As far as which technology to use, 1) ASP.Net Webforms or 2) MVC: my answer is that they're not mutually exclusive. Webforms can be built on top of the MVC model or not. It's up to you whether or not you use MVC. If you want your website to be completed quick and dirty, I would probably skip MVC. If you want your website to be easily extensible in the future and/or allow graphic designers to make changes to the design without messing up code then I would implement MVC.

Brian
+1  A: 

The choice between WebForms and MVC really comes down to whether you like the Model-View-Controller approach. Personally, I prefer WebForms but am learning MVC (within Rails) just to broaden my experience and to gain the benefits of better testing. Either will do for your case as both are capable of scaling to large systems.

With respect to data, I would encourage you to think long and hard before selecting Linq in any form. Please see these previous discussions:

Doesn't LinqToSql Miss the Point?

Is LinqToSql Powerful Enough? Aren't fluent interfaces easy to build?

I would not recommend SubSonic as the documentation is just not there. You'll be pulling your hair out trying to figure out how it works. This is sad because, in many ways, it is a better model than Linq.

In the end, I have always chosen to go with a custom DAL wrapper around ADO.NET. First, I know what I am getting. Second, you really do have to know SQL in any event so why make life more difficult by trying to learn a second data access language? The drawbacks to Linq and SubSonic are manifest and the advantages are primarily theoretical (again, see the discussions at the links for more information).

Mark Brittingham
mark.. i agree i have decided to go for mvc model.. anyway do you know what data access technique stackoverflow.com is using?
Chitresh
SO is using LINQ to SQL...
Robert Koritnik
so isn't this a good option??? i mean.. the performance of the website is so fast..... what do you say sir?
Chitresh
I would be *very* careful about attributing the overall performance of SO to Linq since there are so many factors that affect performance. What you *can* say is that a medium-size web site like SO runs just fine using Linq; it does not significantly hurt performance.However, my argument doesn't pivot around performance issues. My assertion is that Linq has drawbacks in the realm of coding and maintenance as detailed in the first link above.
Mark Brittingham
BTW Chitresh - some of this comes from building large systems for (literally) decades. I stepped in dung so many times my toes are brown (translation: I've made many technology choices that I later came to regret - usually involving the aggressive adoption of Microsoft's latest shiny toy). I am still a strong believer in learning new technologies but I've come to develop a pretty good "dung" detector regarding new technologies. Committing to Linq just smells like a choice that I would regret given enough time - and I think that you would too.
Mark Brittingham
ok.. i take your point sir.. so according to you which orm should be used here if not linq to sql... and what are your views over fluent nhibernate?
Chitresh
I generally advocate the use of your own Data Access Layer (DAL). Mine has a structure that uses the function chaining found in newer interfaces (like Linq) but does not attempt to substitute an entirely new set of operators. It makes SQL easy to integrate rather than attempting to hide it. You can see an example by clicking the second link that I provided above. With respect to nHibernate, I do not know enough about it to compare it with Linq or SubSonic.
Mark Brittingham
A: 

I'm just developing something and was at the same crossroads you are now. If you're a seasoned developer I suggest you go with Asp.net MVC. Overall I've had a great experience with it.

Considering your DAL it's a bit more tricky.

We did choose to go with LINQ to Entities (since L2SQL is abandoned), but we ended up using custom T4 templates that generate code out of EDMX file. It works great and we have all the possible customisation we need. But if I had to choose now, I'd probably rather go with either Subsonic 3 (because of the LINQ to DB support and T4 generator) or Fluent nHibernate. I know Subsonic isn't probably going to deliver exactly what I would need, but I'd be able to customize the templates. nHibernate on the other side doesn't support LINQ to DB which was something of my preference.

Edit If you ask me: LINQ to Entities is basically LINQ to SQL with additional mapping to custom types. Ok. There are alyo some minor differences but in general that's what it is. And it seems natiral that MS is abandoning it.

Robert Koritnik
i have no idea about subsonic and nhibernate.. are they easy to learn?i can take out just one week for learning new things...
Chitresh
subsonic is easy but nhibernate will take you a bit more. Bus start with Fluent nHibernate that you'll probably like a lot more.
Robert Koritnik
+2  A: 

My tools of choice right now are ASP.Net MVC 1.0 and NHibernate.

Here's my reasoning:

ASP.Net MVC

I prefer MVC over WebForms for the following reasons.

  • ASP.Net MVC clearly separates my controller logic from my views
  • In ASP.Net MVC I don't have to work through the page life cycle that we have in WebForms
  • I find it easier to write AJAX applications in ASP.Net MVC using a good Javascript library like jquery. ASP.Net MVC also makes it super easy to return results as JSON without much work
  • It is more straightforward to write tests for an ASP.Net MVC application. As a consultant I have to multi-task between several projects at once and having good tests makes it easier to move from one project to the next.

NHibernate

While there is a decent learning curve with NHibernate it makes persisting your entities much easier. I like that with NHibernate I can: - Automatically Lazy load my collections - Cascade deletes and updates from a root object down to it's child object - A robust set of query objects including Linq, Criteria API and HQL (even direct SQL if you really want to) - Several caching options

If you're going to use NHibernate I would definitely use FluentNhibernate. It makes the mappings much easier.

Andrew Hanson
using LINQ with nHibernate makes it barely LINQ to Objects. That means it still makes more network traffic if you don't do proper filtering on the DB side.
Robert Koritnik
I agree. That's what I use too.
CalebHC
Robert, I agree if you're doing anything complicated with your queries I usually go with the Criteria API or HQL
Andrew Hanson
A: 

If you want a simple clean design thats fun to implement and extend in the future ill go with asp.mvc and entity framework. I would start out with the movie database video tutorial off of the asp.net mvc website.

godseyeview