开发者

I'm about to start using ASP.NET MVC2 for my web application

I have a pretty big web application that I created last year using ASP.NET webforms. It has two parts: Admin and Client (each one a project inside a single solution). Admin logs in as you would expect and manages the clients. Clients log in and manage themselves. SQL Server back end. It relies heavily on MasterPages and LINQ. It has 2 class libraries, one for my methods (authentication, security, encryption, etc.) and another with dbml files for linq that both admin and client project reference.

Now I really want to convert this to MVC 2. I know I'll have to rewrite the front end (not a problem, looking forward to it). I can reference my current class libraries and modify them as I need. My main concerns are my forms and controls. I'd really like to stay away from the major asp controls and use jquery for everything if possible (especially the presentation layer. I'm just not sure how to go about doing this. I was also told jquery is 开发者_如何学Gogreat for 'parsing and updating the DOM' but I've never done this either and not sure where to start (why do this over LINQ?).

Another issue I struggled with was the size of my main table. It has 109 fields in it, and my customer thinks all of them need to be available on screen (or as many as possible, especially in the grid). I had to break up my entry/edit form into 5 tabs (all web controls). My grids have sorting, grouping, export to excel, etc... I would really like to find a grid that lets you inline edit individual cells when double clicked. Would it be better to use jquery for grids? I can break that large table into relational tables if needed (probably will do that anyway).

Any advice from anyone who's done similar will be greatly appreciated. I just bought the book "Pro ASP.NET MVC 2 Framework, Second Edition" and I have a great jQuery ebook I'm working with.

Thank you guys!

EDIT: Should have mentioned I used Telerik WebControls for my previous web forms project so I'm familiar with them. I had no idea their MVC suite was free (I've paid quite a bit for the webform controls).


For grids I can recommend the free Telerik mvc controls. They have good support for ajax binding paging, sort, edit, parent-child etc.

This combined with a few widgets from jQuery ui (tabs, dialog) should put you on the right track as far as your presentation layer is concerned.


Adding to RedSquare, the Telerik Extensions for ASP.NET MVC are free and open source (under GPLv2). That essentially means the Extensions for free for "free" projects (projects you're not trying to sell). If you're trying to sell and make money from your software, we have a commercial license, too, to support that.

Today, the Extensions for MVC include 8 extensions: Grid, Calendar, DatePicker, Menu, NumericTextBox, PanelBar, TabStrip, and TreeView.

Additionally, 3 new Extensions are available in beta: Editor, ComboBox, and Window. (Official release towards the end of August.)

The goal of the Extensions is to make it easier to build rich MVC Views, similar to what you've done in the past in WebForms. MVC is very different than WebForms, though, so be careful when making the transition to avoid the "traps" of thinking in WebForms mode. For example, there are no PostBacks or ViewState in MVC, so some things require more deliberate code in MVC.

Finally, as a word of caution for "pure" JavaScript components, remember that they do not support any scenario where JavaScript is disable or not executed (common examples: web crawlers, accessible browsers). If accessibility or SEO are concerns, Server + Client UI controls like the Telerik Extensions can be a bonus.

Hope that helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜