Which flavour of .net is better for E-Commerce Website - asp.net

I am new to ASP.NET. and having big job converting ASP E-commerce website (It has lots of things those are customised like business logic, having own Database structure) to ASP.NET. Here, I am getting confused with some issues... I am writing this here after having lots of thinking of these issues but still they are unsolved. I have estimated 8-10 weeks for these job, and this is 2nd week is going on...
Is it better to create E-Commerce website from scratch or Modify current available Solutions?
If Creating new one, than which one is better ? ASP.NET Web Forms using N-tier Structure or MVC (Having no experience in this)
Is it true that MVC makes website access faster than Web Forms does?
Or its better to take some time, learn MVC and go ahead?
I think, may be there are questions like these, than please redirect me on that.
Thanks.

If you know web forms, use web forms. Web forms is still a good technology with great third-party controls. There's no reason to use an unfamiliar technology.

I looked up the EF mentioned and came across http://efvote.wufoo.com/forms/z7x3p9/
Apparently there is a list close to 1000 experts including MVPs that state that EF is no longer a viable option unless MS invests in its improvement.

Related

Is there a reason that cshtml isn't popular

Firstly, I have only recently tried my hand at building with razor in cshtml using Webmatrix and I found it much less time consuming than building aspx web forms. Having gotten used to it, I can now do all the things I used to do inside my aspx projects much quicker and with much less code...
Now, I've spent today looking around google etc at companies using cshtml, what they're using it for etc, but I can't find a large range of examples out there. Maybe I was just looking in the wrong place, rendering this question title incorrect, but I just had a feeling that there is a reason why companies are still using aspx over cshtml.
I'm about to start a project next month for a big client and I can't decide whether to take the step of building it this way (they need a custom blog, login area etc). Any thoughts? The only other stack thread I found of any use with regards to a debate was: Razor/CSHTML - Any Benefit over what we have?
Thanks,
Adam
A lot of it has to do with ASP (classic) has been around a lot longer and (depending the project size) a migration can incur too much cost.
There's also considerations like:
What does the current web staff know (what are they fluent in?)
What libraries (proprietary or otherwise) are already dependent on ASP (including custom controls).
How much of an SEO hit are you going to take converting (some sites can mimic classic aspx page suffixes by just changing the way the routes behaving but are in-fact using cshtml).
There isn't a compelling reason for experienced ASP.NET developers to move from Web Forms or MVC to Web Pages (Razor). As a framework, it is designed to attract those who might find Web Forms or MVC too much of a learning curve. Those coming from Classic ASP or PHP, for example.
I answer a lot of questions on the Web Pages framework over at the ASP.NET forums, and I have definitely seen an increase in the number of people trying the framework out. In terms of functionality and security, you have the whole ASP.NET framework behind you so you can do anything with Web Pages that you can do with MVC or Web Forms - a lot of it more easily.
The Web Pages framework is not designed with testability in mind, and it may be more difficult for teams to organise since a certain amount of server-logic is embedded in the same file as HTML.
If you are a lone developer and happy using Web Pages, go for it.
There been a lot of discussion about the topic. Its just opinions, right tool for the right job. Please look into the following for opinions & answers:
MVC 3 ASPX VS RAZOR View Engine
Razor vs Webforms view engine for new ASP.NET MVC 3 site
What is the difference between Razor and ASPX?
Hope this helps

Microsoft WebMatrix: what is it?

I'm a little confused about new Microsoft products.
I'm a classic webform Asp.Net developer. I know exists also Asp.Net MVC with a different approach based on Mvc pattern.
Now, i know exists also WebMatrix that uses new Razor "notation".
Can someone explain me what are the main difference between that "technology" ? When use WebMatrix, when WebForm ?
Thanks!
Webmatrix is a platform that integrates a variety of recently released technologies such as IIS Express, Asp.Net Webforms, Razor, SQL Express etc. I guess from what I have been reading it's a way that eases the barrier to entry, for non-MS developers, into the MS world. In addition you can also use code your site in PHP and use a variety of open source tools for developing web sites. To directly answer your question, in you planning on creating a complex web application, WebMatrix may not be the solution you're looking for.
As a reference, I suggest reading through Scott Gu's Introduction to Webmatrix
WebMatrix will be able to take
advantage of these technologies to
facilitate a simplified web
development workload that is useful
beyond professional development
scenarios – and which enables even
more developers to be able to learn
and take advantage of ASP.NET for a
wider variety of scenarios on the web.
If you are a professional developer
who has spent years with .NET you will
likely look at the below steps and
think – this scenario is so basic -
you need to understand so much more
than just this to build a “real”
application. What about encapsulated
business logic, data access layers,
ORMs, etc? Well, if you are building
a critical business application that
you want to be maintainable for years
then you do need to understand and
think about these scenarios.
Imagine, though, that you are trying
to teach a friend or one of your
children how to build their first
simple application – and they are new
to programming. Variables,
if-statements, loops, and plain old
HTML are still concepts they are
likely grappling with. Classes and
objects are concepts they haven’t even
heard of yet. Helping them get a
scenario like below up and running
quickly (without requiring them to
master lots of new concepts and steps)
will make it much more likely that
they’ll be successful – and hopefully
cause them to want to continue to
learn more.
One of the things we are trying to-do
with WebMatrix is reach an audience
who might eventually be able to be
advanced VS/.NET developers – but who
find the first learning step today too
daunting, and who struggle to get
started.
If someone is still interested: a pretty good lessons here http://habrahabr.ru/company/microsoft/blog/136004/ . This link is for those, who understand russian.
Shortly speaking WebMatrix allows you to conveniently mix up C# server code and html (this mixing is provided by simple Razor sytax). Also in WbeMatrix 2.0(beta version now) is provided full IntelliSense for html/css/c# code.

Is there a drawback of using ASP.NET Dynamic Data for a data driven website?

I watched a little introduction into ASP.NET Dynamic Data, and I noticed this option to create a data driven website for the first time. I have a database with a few tables, just created a Dynamic Data application out of my database and well... my application with a lot of nicely looking web pages, navigation between them and all kinds of CRUD operations was finished after 3 minutes.
OK, seriously, it isn't finished of course. There is a lot of custom logic to introduce, design to change, and also pages or relationships to remove I don't want actually to see in the web application.
But now I am wondering if ASP.NET Dynamic Data is at least a viable starting point or do I better start from scratch and create page by page? I could imagine that it might be useful to create a quick database maintenance web interface but is it good for a very customized web application? Is it in the end more complicated to modify the scaffold than building up everything from the ground?
I'm very interested in your experiences or recommendations regarding Dynamic Data! Thanks in advance!
I could never wrap my ahead around it enough to get any use out of it. At first, I thought this was Microsoft's answer to Ruby on Rails, and I was looking for the same benefit. I don't it comes close to having the same benefits. When I then compare it to a CMS (DotNetNuke, Sharepoint, Drupal, etc) it then looks really underpowered. Compared to ASP.NET MVC, it seems like going the wrong way from basic ASP.NET (MVC is removing bad abstractions from ASP.NET, while DD is adding even more abstractions).
Personally I'd rather build something from scratch in ASP.NET MVC, though my day job is regular ASP.NET. I'm also learning Drupal as I haven't found the sweet spot with ASP.NET based CMSes. One thing at at a jobsite you're going to want to use technologies everyone else knows. So I think that limits where knowing Dynamic Data is generally useful, as basically any legacy application won't be using it and you're unlikely to find a team with existing ASP.NET Dynamic Data experience.
The quick scaffolding is spiffy but at the end of the day I don't think it will make web development easier.
I very like ASP.NET Dynamic Data as it is a fast way for creating data driven applications. Customization is not a complicated task.
I wrote a corporate website with this technology from the scratch - it takes appr. 2 months for all. So my point of view that this is a good starting point for web applications development.
if your archetecture resembles ASP.NET Dynamic Data or DotNetNuke or some other starter kit, go for it, if
application is small to medium sized
you do not have strict deadlines
you are learning the technology.
otherwise or when you will be skilled in particular technology, you will prefer yourself working from scratch as it gives you more freedom and space for the implementation of ideas.
For e.g, one reason for the breakthrough for Asp.Net MVC had was many .Net developers wanted freedom over the development / architecture / flow and rendering (HTML) of the product they were building. Asp.Net WebForms does provide solid and vast grounds for swift development and templates but developers had to go according to the architecture. This freedom is available under MVC and developers can make use of nearly all Libraries and skill set available and go their own way.
one successful sample is Stackoverflow.com itself
hope this helps

Performance wise Is MVC better than Web Forms in ASP.NET

We are going to develop a website in ASP.NET. So is it better to use MVC or web forms.
It depends on what kind of site you want to build and your knowledge and experience creating websites.
If you know your stuff and are confident in your ability to work "close to the metal" (as it were) I would imagine that you could build a faster website using ASP.NET MVC since you would be able to optimize your site to have as little overhead as possible. However it is more than possible to build a very fast site using standard ASP.NET as well so it really depends on exactly on the requirements of your project.
My completely unscientific opinion: Yes; ASP.NET MVC is faster than web forms.
ASP.NET MVC gives screen pops on the order of 1 to 2 seconds. Web forms is more like 3 to 5 seconds.
I don't know if they switched to ASP.NET MVC when they did the lightweight version of the MSDN library, but the speed improvement is similar to what I described. And let me tell you, the usability improvement is like night and day.
YMMV
Personally, I don't think there are big performance gap between asp.net mvc and web form. Because they actually employ the same underlying engine. In most cases, what makes performance a problem is how developers write their code, and the structure of the application.
Usually, people tend to compare mvc and web form on the elegance, maintainability.
http://weblogs.asp.net/shijuvarghese/archive/2008/07/09/asp-net-mvc-vs-asp-net-web-form.aspx
Web Forms and MVC each have their strengths. Web Forms typically has the familiar code-behind style of coding where you hook up a handler for something like a button click and write the code to handle it. MVC has a more separations of concerns style of coding and is generally more unit testable.
It all depends on your coding preferences and time required to deliver the project with respect to learning curves.
I would imagine this question has been answered a million times on this site an many other blogs.

When to use ASP.NET MVC vs. ASP.NET Web Forms?

One of the common questions asked regarding ASP.NET MVC is why should you use it over ASP.NET Web Forms? The answer generally includes ViewState and clean URLs, amongst others. Towards the end you'll find a blurb about using the right tool for the job and that they serve different purposes. However, I don't believe I've ever seen what those purposes are. So, when would you actually choose ASP.NET MVC over ASP.NET Web Forms, or ASP.NET Web Forms over ASP.NET MVC?
You don't choose ASP.Net MVC over ASP.Net, because ASP.Net MVC still is ASP.Net. You do choose ASP.Net MVC or ASP.Net Web Forms, and there are lots of good reasons to do that:
Easier to get control over your HTML
Easier to do unit testing
Few "Gotchas"
On the other hand, Web Forms do have a few points in their favor:
Easy to put simple CRUD/business apps together extremely fast
Hard to beat ViewState performance in local LAN environment
Easy to learn forms paradigm
The result is that if you're building business apps in a corporate LAN environment (which honestly is still most web developers), Web Forms is really great. In that sense Microsoft really knows their market. But if you're building an app for the public internet, you might want MVC so you can test thoroughly and be sure your pages aren't bloated with unnecessary ViewState or JavaScript data.
Additionally, something that has changed over the last several years is that even many corporate intranet applications now need to support home/remote use, making MVC more attractive to that crowd than it had been.
Use MVC if all your team members are skilled enough to manage "control over HTML", otherwise your code will turn into a tag soup.
In other words
bool useMvc = true;
foreach (TeamMember member in team.Members)
{
useMvc = useMvc && member.IsSkilled;
}
http://weblogs.asp.net/shijuvarghese/archive/2008/07/09/asp-net-mvc-vs-asp-net-web-form.aspx
check that blog !
Bottom line "separation of concerns"
I'll give you a couple purposes, with clear advantages.
If your purpose is a public facing website that will be banking on traffic, use MVC. It is optimal for search engine optimization.
If your purpose is an enterprise web-application that acts like a desktop app, I would lean towards web forms, since state management and compartmentalization of your resources into underlying server controls offers huge advantages if used correctly.
The biggest problems facing developers is managing complexity and keeping code "clean". MVC gives the developer the reins to leverage OOP to tuck away complexity and make code easy on the eyes.
Webforms will be faster to develop in the short term, but it doesn't lend itself to long term sustainability in terms of maintenance and growth.
I've worked with Web forms for 13 years and MVC for 2 years now and when I started with MVC, I had similar questions. Here are my takeaways.
Most importantly: ASP.NET's latest release is 4.6 and they were moving to ASP.NET 5.0, but MS abandoned that for ASP.NET Core, which no longer supports Web Forms (or even VB.NET). So, that alone might give you your answer when deciding what rabbit hole to go down.
That being said:
MVC I'm finding, once you get the hang of it, is WAY easier for dealing with basic forms and any sort of simple "Model", aka tables with a very simple, straight-forward set of relationships such as orders that have tables that link to users, products, etc. Once you start getting into some more complicated relationships and need to return lots of conditional sets of results, rely on parameters, have complicated stored procedures... then Web Forms is much better for dealing with this. If you don't have to deal with this level of complication, MVC makes development SO MUCH faster, especially with dealing with an approach where you already have the DB because it creates so much of the code and validation for you already
If you're not very experienced with database design, MVC does the work for you. It can literally build the database for you.
MVC doesn't have a lot of the built in controls that Web Forms does (Gridviews, FormViews, Sitemaps, Paged lists). Everything has to be written from scratch, but luckily a lot of people have already invented that stuff for you in NuGet which you can just download into your project
MVC relies heavily on the structure of your URL. The path, the querystring, etc. If you find your application needing to do a lot of form POSTing instead of GET-ting, you're going to have to do a lot of tweaking or AJAX posting. If you have a set URL that can't change, it can be a pain. It's doable, but just a little tricker (or you can just use Angular instead).
MVC has no Viewstate. If you need to hide variables from post to post and persist them, it's a little difficult. MVC Does have things like ViewBag which lets you pass data from your controller to your page, but it clears after the page is rendered. There is also something called "Tempdata" which acts like Session state, but more temporary. However, it relies on Session State which is not an ideal way of persisting data. Session variables and tempdata variables are fine for user-level data (profile information for the person logged in), but having two different tabs open by the same user can cause these session/tempdata variables to overwrite each other when you're dealing with the actual model data.
If you're at a crossroads, I'd go with MVC. MS is pushing it and support for Web Forms will likely start going away

Resources