Is there any good open source ASP.NET application using MVP pattern - asp.net

I'm trying to upgrade my existing web forms application to upcoming framework and rewriting couple of workflow as per the new business requirements. I want to introduce TDD based development in this project but after some investigation found that ASP.NET MVC will not help me as my web existing application is using lots of Infragistics UltraWebGrid controls for grouping, paging, column moving etc and there is no good alternative grids in ASP.NET MVC world. I also need to support blackberry in this release. So, am planning to use both MVP for desktop client and MVC for blackberry client in same project.
I would like to know if someone has done something similar in their project and links to any good open source asp.net applicaton using MVP pattern. I dont want to use WCSF as it is too heavy weight. I saw their MVPBundle sample application but it lacks use of modern tools like IoC (Unity or StructureMap), Mocking framework etc.
Regards,
Sunil

The latest incarnation of Nerd Dinner has mobile support in an ASP.NET MVC app.
I'm not sure about the JS support on a black-berry but there are quite a few grid/repeater type controls and mechanisms available using either jQuery or the forthcoming ASP.NET AJAX 4 templating controls.

Related

New ASP.NET project

When creating a new web project in ASP.NET are you better off to use the "ASP.NET empty web application" or the "asp.net web forms application"
I would recommend against even bothering with ASP.Net Web Forms. It was an interesting idea that proved to be unweildy in practical applications. The entire web development industry is moving towards some kind of MVC framework or another whether you're using PHP, Ruby or ASP.Net so you're best off using that.
Of course there are still a lot of ASP.Net Web Forms applications out there and they're likely to exist for some time into the future so there is some benefit to learning the technology but I would avoid it for any new projects.
As per your question if you should use the empty project or not it doesn't really make a difference. If you're just starting out the populated project can give you a basic idea of how the structure works but if you're comfortable enough building it from scratch then go with the empty project.
It depends on what you want to do.
Generally speaking, there are three kinds of ASP.NET application project:
Web Forms - what ASP.NET was originally back in 2001. Its use is discouraged in modern and greenfield applications because it is built-around outdated ideas about how web applications should work.
MVC - The new hotness. Try to use this. StackOverflow is built using this.
Everything else - too many to list, but this generally requires you create an empty project and do everything from scratch using IHttpHandler.
If you're new to ASP.NET I strongly recommend avoiding the two project types you listed as they're both for Web Forms; consider using the "ASP.NET MVC Application" options instead - if you're using VS2008 then you need to download and install the ASP.NET MVC 2 add-on. VS2010 and later come with the MVC templates preinstalled.
You might want to use the Empty Web Application project template if you want to work from scratch using IHttpHandler, but you sound new to this, so I recommend avoiding it.

Confusion on using asp.net or mvc

Ive been confused about ASP.NET MVC.
As some said, MVC is better than ASP.NET. As some said, they are completely the same thing.
And my colleges debate that MVC is just an extension of asp.net, where asp.net is already in the form of MVC.
In fact I am starting web developing from scratch. If someone might help to clear the fog front of me, it would help a lot.
All ASP.NET web frameworks are build on top of Microsoft ASP.NET Framework. The unique feature of Web API is that it can be used with both MVC and WebForms applications to provide truly restful HTTP services.
Regarding the choice of suitable Asp.NET framework: you may get more information from official source - www.asp.net.
General rule of thumb is the architectural design how you want to build your application.
ASP.NET MVC promotes a cleaner separation which makes the developer think more in depth about design and code separation than traditional web forms.
There are endless debates about what is better but true benefits of ASP.NET MVC as
testability
more control over the rendered HTML
separation of concerns. However with MVC there is much more to learn for the developer.
ASP.NET WebForms - will always be around because some see it as a rapid application development tool. Just drag and drop and let ASP.NET handle the posting, state etc
ASP.NET Web API - is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework.
All in all, each of them has certain business solutions to be considered as required.
References to look for comparison:
ASP.NET MVC vs WebForms: speed and architecture comparison
ASP.NET Roadmap: One ASP.NET – Web Forms, MVC, Web API, and more
ASP.NET is the name of the overall web framework. There are a few different technologies that are built on ASP.NET. Two popular examples of these technologies are WebForms and MVC.
WebForms promotes a programming model that looks a lot more like Windows Forms. It attempts to abstract away the stateless nature of the web, and encourages you to use server-side controls instead of HTML. Because WebForms was the primary way to write web applications on ASP.NET for a long time before MVC came out, you'll often see people talk about "ASP.NET" as the same thing as WebForms. This is part of the reason for your confusion. ASP.NET WebForms is very different from ASP.NET MVC, but they are both built on ASP.NET.
ASP.NET MVC gets away from server-side controls. It eliminates the abstractions, allowing you to have closer control over the actual HTML that gets generated. For developers of modern applications, this is very useful because it makes it much easier to use AJAX and rich client-side javascript.
(Humble Opinion incoming)
ASP.NET (in terms of using Webforms) is programming the web for a WinForms developer. You "bind" events, you have "controls" and everything (sessionstate) is stored in a huge hidden field within the page so it knows where it left off from the previous call. You rely heavily on this information being present which is why everything you do needs to reside in that master form wrapping the entire page.
On the other hand, MVC is bringing C# .NET programming back to the web the way the web was intended. No bloat, no hidden fields, no heavy bindings. It's brings everything back to the classic "i have this form and now I need to process it". Arguably, the real magic is the routing methods and the "automatic binding" of submitted fields to an object. (if fields x, y & z are submitted and your action is looking for FooBar with the properties x, y & z it's automatically converted for you.
ASP.NET is common to both WEB-API and ASP.NET MVC. I assume you wonder about MVC or WEB-API.
MVC is a controller / model based with Views. Although the controllers can be used for AJAX json purposes. MVC is a good way to build a serious Browser based Application. The WEB-API allows you to build simple http server features, not necessarily Browser related. Good for REST style programming. Very flexible and a good alternative to WCF services. The are good tutorials on Both on the official ASP.NET site. START here http://www.asp.net/get-started
choose depends on your project n you. I suggest you to choose MVC because its productivity is very high we r using it since 1 year and found better than webforms.
for more knowledge please visit http://www.asp.net/mvc
The choice depends completely on you, I have been developing MVC application since 2010, its going to be over 2 years now have worked with almost all the versions of MVC both with Razor and aspx view. I have also worked on ASP.Net webform based applications.
With MVC you will not get built in controls, you will have to develop every control you want to use, you will have to rely mostly on html controls, while with web forms you will get advantage of using built in controls, Even getting help from other developers in your surroundings may be easy for webforms as you can easily get a webform developer.
But on the other hand with MVC the maintability is very high. As for as productivity is concerned, its very high once your are accustomed to it, initially it will be low as you will be in learning phase. Don't forget to use Entity Framework.
You may also consider developing your App using WebAPI, if it suits your scenario.

New to ASP.NET: Webforms vs MVC2

I am new to ASP.NET Development and can't decide between developing with Webforms or MVC 2. Nevermind the pros and cons of each. I've seen mixed opinions of each. But which method would be the best for someone who has no prior experience in ASP.NET or C#?
If your answer is: learn both, then which should I learn first? MVC 2 or Webforms?
I was in a similar situation to you a year ago. I'm a Computer Science student, well finished my course around a month ago. First two years of my course I worked with Java, PHP, Oracle, MySQL. This actually landed me an industrial placement at Oracle where I used their ADF which was Java based.
Anyway all of this made me start thinking about what I wanted to use for my final year project and with no experience of Microsoft technologies began to venture down that path. I wasn't aware of ASP.NET MVC and spent time learning ASP.NET WebForms. I liked the easy style of development, drag and drop is a very quick way of developing small sites. However I also disliked the lack of control I had and the simplicity, I didn't feel overly challenged.
During my final year I started to research Model View Controller and how it suits web applications. From this I came across ASP.NET MVC and in my opinion its far better than ASP.NET WebForms. There seems to be an emerging trend in MVC frameworks for web applications and this seems to be the hot technology to build web applications in.
Now finished I can say that teaching myself ASP.NET MVC was one of the best things I did. I don't know if you're British based, but only two Universities in Britain teach .NET. This made getting a graduate job much easier and I stood out from .NET candidates because I was from a Java course, the same as yourself.
The transition from Java to .NET is not particularly difficult all the theory and concepts are the same. Also ASP.NET MVC is becoming quite popular among businesses which specialise in the Microsoft technology stack. As it is quite a new technology learning now whilst young will be an advantage. I've ended up in a job where the company are rewritting their application from ASP.NET WebForms to MVC and only myself and the senior developer have ever used MVC leading to quite a large role in the project.
If you're interested my final year research can be found here and I have a chapter on ASP.NET WebForms and MVC
My source code is also on my site but its mainly MVC 1.0 not 2.0
Tough question.
What's your background in web development? Are you familiar with the MVC pattern?
Are you learning it for a job?
ASP.NET Web Forms are easier for beginners, as it hides much of the underlying implementation details of the ASP.NET engine.
ASP.NET MVC requires a deeper understanding of concepts such as routing and HTTP methods.
But yes - you should learn both.
As MVC is a new platform for developing ASP.NET Web Applications, i would learn Web Forms first. That way you will appreciate the benefits of MVC more when you contrast it to Web Forms.
if you want to get your hands dirty and really understand how the web works, go MVC
if you want to drag and drop your way to a functional but overhead loaded website, use webforms.
really, this question is pretty difficult to answer not knowing your background. if you're comfortable with html, css, javascript it may not be too difficult to pick up MVC. if you're new to the web entirely, it can be daunting to learn that many technologies all at once and webforms abstracts a lot of that kind of stuff for you.
There's a third option, especially useful for developers new to ASP.NET. You can use ASP.NET Web Pages, which is different from ASP.NET Web Forms. ASP.NET Web Pages is great for new developers as well as developers new to Web development. Also, it has a good path to migrate up to the complexity of ASP.NET MVC. In fact, the latest release of ASP.NET MVC and the latest release of ASP.NET Web Pages both use the same view engine.
Here is a link to the complete ASP.NET Web Pages book:
Getting Started with WebMatrix and ASP.NET Web Pages
Also, here is the complete WebMatrix Content Guide:
WebMatrix Content Guide
Here's the description:
WebMatrix is a free, lightweight set of web development tools that provides the easiest way to build websites. It includes IIS Express (a development web server), ASP.NET (a web framework), and SQL Server Compact (an embedded database). It also includes a simple tool that streamlines website development and makes it easy to start websites from popular open source apps. The skills and code you develop with WebMatrix transition seamlessly to Visual Studio and SQL Server.

Asp.net MVC VS ASP.net WebForms?

I am starting a new project in VB /.Net Framework 2.0 for a company corporate website with data driven forms. So should I go further with Asp.net MVC or Asp.Net web forms and WHY ??? We are not ready for Ajax now but later.
And also we have DevExpress components.
Actually I see ASP.NET MVC as next generation in that it is an evolution - trying to be a better programming environment, as software development for web apps asks for something more testable.
It is a huge beast. Decide based on features whether you need it. MVC has less documentation and is a lot harder to master thanks to a less RAD approach, but it seems that once you are in, it will be quite a better experience. If you have a web application (like stackoverflow.com) then it may be a good approach.
DevExpress components - have fun... throwing them away. Like most ASP.NET components they will not work or only work very partially. Totally different approach.e
ASP.Net MVC is not "next generation" ASP.Net. It's an alternative approach to design that can be more beneficial depending on the kind of project you're working with. Without more information about the particular type of project you're working on no one can give you any informed recommendations.

New to ASP.NET

I am wanting to learn ASP.Net and am just a beginner. I have done some windows c# forms development before but have no experience of web development.
I have looked at the ASP.net website but beyond this, does anyone have any ideas as to good learning resources particulary in relation to the differences to windows development. For instance, It seems that the way events work is quite different under ASP to windows forms.
Thanks you all.
Thank you very much. I will have a look at MVC. It looks even more complicated but if this is the way things are going then I would be better maybe to invest my learning in this.
I would advise you at this stage in ASP.NETs life to instead direct your attention at ASP.NET-MVC. This url http://www.asp.net/mvc/ is a very good resource for learning.
ASP.NET Forms do a good job of hiding the nature of a connection-less HTTP/browser based technology and presenting a familiar Form with controls and lots of useful events environment that Windows Forms developers are used to.
However this approach comes with a price. For any serious project there is no avoiding getting under the hood of ASP.NET forms and properly understanding the underlying technology. At this point you start to realise the significant compromises the ASP.NET Forms has had to make in order to make Windows Forms developers feel at home.
ASP.NET-MVC, on the other, makes no such compromises. Learning MVC means learning how HTTP works up-front. It also has the advantage of being a much more test friendly approach which when used properly will save you days of debugging.
ASP.NET website - seriously, it's a really good resource.
I'd seriously consider starting with ASP.NET MVC. You'll end up learning what you need from ASP.NET "classic" but you'll pick up all the goodness of MVC (testability, seperation of concerns in your code etc) instead of learning bad habits.
Google for "ASP.NET MVC", check out ScottGu's blog, Scott Hanselmans's blog, or search StackOverflow for ASP.NET MVC (use the ASP.NET MVC tag too).
One good place to start...
http://weblogs.asp.net/scottgu/archive/2009/04/01/asp-net-mvc-1-0.aspx
I know they are a bit out of date, but I still think the two Fritz Onion books give a great look at what's happening in ASP.NET under the hood.
Some resources:
asp.net (as you mentioned)
channel9
scott hanselman's blog (some useful entries)
Windows Client Homepage
W3Schools Tutorials (Useful for more than just .NET, but this is the .NET page)
I've been a .NET Windows Forms (not Web forms) developer for 1 and a half years. Then I switched jobs and started using WebForms for like... 2 years. Then I discovered ASP.NET MVC (January 2008) and since then although I still master ASP.NET WebForms I will always prefer ASP.NET MVC.
My recommendation also goes into ASP.NET MVC. You will have to learn HTTP, HTML and a bit of Javascript but after these you will master web development on ALL PLATFORMS.
A great alternative to ASP.NET MVC is ASP.NET Web Pages with Razor syntax. In fact, the latest release of ASP.NET MVC and the latest release of ASP.NET Web Pages both use the same view engine.
Here is a link to the complete ASP.NET Web Pages book:
Getting Started with WebMatrix and ASP.NET Web Pages
Also, here is the complete WebMatrix Content Guide:
WebMatrix Content Guide
Here's the description:
WebMatrix is a free, lightweight set of web development tools that provides the easiest way to build websites. It includes IIS Express (a development web server), ASP.NET (a web framework), and SQL Server Compact (an embedded database). It also includes a simple tool that streamlines website development and makes it easy to start websites from popular open source apps. The skills and code you develop with WebMatrix transition seamlessly to Visual Studio and SQL Server.

Resources