Does someone have real project experience using asp.net mvc implement complicated web UI app? - asp.net

In my past projects I've been using webform to implement windows form style complicated backend admin page by using asp.net webform.
Just wondering by using asp.net mvc, can it make this kind of complicated UI page much easier?

This highly depends on what UI you need. For me, it wouldn't be easy without jQuery... but with jQuery it's very convenient.
For example of possible nesting, my app has cart that contains Accordion for customers, with each pane containing custom tabs with sliding animations for orders, with each order containing table of items, where each item can be expanded to show included products details (not to mention context menus to change customers, on-the-fly discounts changing with notification tooltips, popups to show product details, and so on). All this on single page. And I still find it very easy to manage, because all the functionality is well split across MVC controllers and views.
As for "admin part", I use two-level nesting (with second level on another page, but I just don't want to go deep into jqGrid), and it's 5 minutes to setup a new admin page using AutoMapper, custom attributes, and some custom code. Got new entity (e.g. SomeProduct)? 5 minutes and new admin page with grid, custom editing controls and formats is done. With MVC.
But if you need traditional "data grid" approach, chances that ASP.NET will do better. Or maybe jqGrid (or third-party grids like Telerik) will help you, because they have subgrids and all this stuff. I would say, if you don't like Domain-Driven Design, if your application is not object/entity driven, but highly based on raw data tables, then MVC might be not what you need. But I may be wrong because I never worked with such applications. All other apps, I'd prefer MVC.

Related

Generic re-usable gridview with sorting,paging, filtering for asp.net web application

I have been given a task of creating a common Gridview component which has following features:
Paging
sorting
Filtering
The objective is to reuse the component in almost all the web pages (.aspx), so that the look and feel, layout and behaviour remains uniform across the web site.
The grid has to be lightweight, preferably ajax based. I had several thoughts in mind:
extend the current asp.net Gridview component.
Implement a very own custom solution with ajax method pulling data, rendering happens on client side using some jquery templates..etc.
I am not sure where to start with. The requirements i have been give just says that create a common Grid component so that all others in my team can re-use the same component .
Please give me insight into which way I should approach the implementation so that in future this component is scalable as well as in the near future its re-usable across the site.
The jQuery plugin datatables.net is very light weight and has all the features you need. You could use that.
No need to reinvent the wheel, there are tons of opensource and pay grids out there to do what you wnat - Check out this grid (with complete source). One of the nice features is that you can add a toolbar which you could use for your filtering.
http://jqmvcgrid.codeplex.com/

ASP.NET MVC3 Single page design suggestion

I would like to create an UI for my app ( current I've an UI in WPF ) and I like the "Single Page Application" paradigma. I'm a little stuck on how to start implementing it: I don't mind about SEO, mine is an enterprise application. Do I need to use something like sammy.js, backbone.js and so on? I'm really new to Web GUI developement and I'm a little consfused: why can't just use jquery calls to drive my single page DOM? Is there some drawbacks about this strategy?
Checkout this series of blog posts by John Papa this could give you a jump start...
http://johnpapa.net/building-single-page-apps-with-knockout-jquery-and-web-api-ndash-the-story-begins
http://johnpapa.net/spapost2
http://johnpapa.net/spapost3
http://johnpapa.net/spapost4
http://johnpapa.net/spapost5
Hope this helps
First of all, you can do your single page application with jquery only. However, you will be writing a lot of plumbing code to handle interactions between the different parts of your UI. Which is not the most interesting part of the developmnent process, especially if frameworks do it nicely for you.
You should have a look at this question : https://stackoverflow.com/questions/5112899/knockout-js-vs-backbone-js-vs, and decide between knockout and backbone.
For implementing a simple master-detail UI (left column for listing items, right column for display, jquery popups for more details or editing), I chose knockout, and was not disappointed.
The learning curve is not as steep as backbone's, and coming from a WPF MVVM app it was easy to understand the development paradigm.
I chose ASP.NET MVC to serve the html templates using ViewResults, and after that everything went through JSON.
Knockout made this easy because of it's client side databinding capabilities. Then, when posting data back, MVC modelbinding made server side binding easy as well.
You could use just jQuery but it can soon become very hard to manage if not designed very carefully. Take a look at knockout.js which is mvvm it's great for managing state and reacting to events.
If you develop SPA then your best choice would be knockout.js+MVC+Ajax/jQuery

How to allow users to create or edit web forms within a Spring MVC web application?

We would like to provide our users with a limited set of drag-n-drop fields so they could manage template web forms in an application. The admins would define these templates and the users would enter some data up front which would determine which template they would be shown.
Is there a framework or some things I could check out on how to do this?
We use Spring MVC 3 as our web layer and that would drive our solution.
Thanks!
E
I don't know of any frameworks (that would play nicely with Spring MVC 3) that would do what you are describing and the fact that there are no answers after 5 days also suggests this.
Although you could write such a thing yourself, it sounds like a very big and complex undertaking. You might be able to use a Javascript framework like YUI or ExtJS to handle some of the custom form generation but that tends to be client focussed so you then have an issue of persisting the custom form for other users.
In my organisation we use WordPress with the "Contact Form 7" plugin to do just what you describe. Non-coders can create forms in the WP admin interface and when submitted, it results in a custom email which then gets processed by a human or has a link in it that auto-populates params for a custom webapp (that is scary and has many form fields).
My gut feeling is that although the stake holders think they need unlimited variations of forms, they may only really need a few variations of those forms. It might be a lot easier to simply code up a handful of different pages/forms and then have a leading form which takes the user to the form they need.
Also the use of Jquery hide/show can be very useful in hiding optional elements and thus reducing the negative impact of a very complex form in terms of UX (user experience/usability). E.g. the questions the users gets asked can then lead to some form elements being hidden/shown on the page, using Javascript.

Best practice for Parent / Child UI design in ASP.Net?

Coming from a desktop client background, with no real data-driven web design experience, I am studying ASP.NET UI design to determine the best UI pattern for Parent/Children data.
I always tend to experiment with Parent/Child presentation when learning a new UI platform, so that is where I have started here. Thinking I should use ASP.NET 2.0, I am studying the various ways of architecting a UI form which contains a master list of Parent records, and then showing the related children records in a second grid on the page when you click on a parent. Eventually, even the child records are parents to other children, so I'll need to deal with that also.
Think: Customers with Open Orders / Open Orders for Selected Customer / Line Items on Selected Open Order... like this screen where I built the same thing in WPF: http://www.twitpic.com/26w26
Some of techniques I've seen simply creates a plain old-shcool table of href links for the parents, with some method call to query the children based on the selected parent, while some techniques I've seen use the ASP.NET 2.0 data controls to work all this out. Are the ASP.NET 2.0 data controls cheating? Do real developers use these out-of-the box controls, or do they output their own HTML so they can have more control?
Also, it seems like ASP.NET MVC is all the rage right now, so I though I should consider that. When I looked at a few intro's about it, it seems to take a step back in time as it looks like you have to manually create much the HTML to present lists and datagrids, rather than being able to use the ASP.NET 2.0 controls.
I'm kinda lost as to where to spend my energy.
I won't comment on the Parent/Child portion of what you're asking, but rather on the WebForms vs ASP.NET MVC you asked about at the end.
I found developing using WebForms highly annoying. Every time I wanted to do something out of the "norm" I had to fight with the framework to get it to work the way I wanted.
ASP.NET MVC relieves you of these burdens greatly. However, it does so at the expense of having all kinds of cool components you can use out of the box. So yes, there is more hand-coding of the HTML, but ultimately that's what's going to make developing your pages a lot more pleasant.
Coming back to this question 6 months after I asked it, now that I've gained some experience with ASP.Net webforms, I'm going to answer my own question. Using the actual Asp.net controls like ListView and GridView is not really all that hard, and I can see that it is indeed a common practice to use them on forms and not feel like you a cheating. Sure MVC forces you to lower level html coding, but using Asp.Net controls on WebForms app is fine and actually not nearly as hard as I was affraid it would be.

AJAX form editing and design

I want to build into mt ASP.NET application the ability for users to fill up forms, but the forms are not something I can hard-code into my (Enterprise) software.
So I need one screen that lets end users create the forms. Doing it the 2.0 way, I just love what PollDaddy did in their survey editor (great job guys!). How do I replicate that? (don't worry pollDaddy, my app has nothing to do with survey and I am not at all in your domain (-: )
Since you need to login to the site to play with it, I made a 20 sec video of how it looks like. Please see below and tell me how to best replicate this (as simple as using JQuery tip? use an entire open source project? Buy something?)
Requirements are:
support multiple types of elements (like multiple choice, free text, comboBox)
drag and drop
editing of order
click image for video or here
http://frame.revver.com/frame/120x90/1376799.jpg
The AJAX control toolkit is free and would work for some of this items shown in the video. However, JQuery has tons of plugins it is easy to extend and even easier to use. I would suggest starting there and extending it where needed.
Good Luck
You could build it yourself using an AJAX framework like ASP.NET AJAX or even telerik controls. You could use jQuery but ASP.NET AJAX is free and embeds well with ASP.NET pages. You could buy something, but I've yet to encounter packages as such.

Resources