Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Journey from Web Forms to ASP.NET MVC 4

No description
by

Julia Savinkova

on 30 July 2017

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Journey from Web Forms to ASP.NET MVC 4

Journey from Web Forms to ASP.NET MVC 4
Why not ASP.NET Web Forms?
Main disadvantages of Web Forms:
1 - ViewState weight;
2 - Page life cycle;
3 - Limited control over HTML;
4 - Low testability.
Razor Engine
New Application Structure
Real results
Razor changes (new in ASP.NET MVC 4)
Validation data
Bundles
Custom attributes for actions in controllers
Is that all?
From vision to implementation
1 - Install ASP.NET MVC 4.0 and ASP.NET Web Pages;
2 - Add folders (Views, Scripts etc.), configure Web.config in existing project, configure Web.config in folder Views;
3 - Configure routing.
LayoutController
ErrorController
AccountController
CaseManagementController
ImagesController
HelpController
AgreementController
Controllers
Views
Models
_Layout page
Error page
Protocol page
Login page
ViewCase page
EditCase page
And a lot of partial views...
1 - Forget about @Url.Content
@Html.DisplayFor still doesn't save the state
Solution: create @Html.HiddenFor
2 - Conditions
1 - Set attributes on the fields;
4 - Enjoy!
1 - Register bundles for js scripts and css files
2 - Add bundle to the page... and enjoy!
->
1 - Add custom attribute inherits ActionMethodSelectorAttribute
2 - Use attribute with your actions... and enjoy!
Well... Yeah!
Thank you for your attention!
And... Go-go-go to develop new things!
1 - View Case page
2 - Edit Case page
Why ASP.NET MVC?
Main advantages of ASP.NET MVC:
1 - Extensibility;
2 - Tight Control over HTML and HTTP;
3 - Testability;
4 - Powerful Routing System.
... but we have a better solution...
3 - Enable unobtrusive js in Web.config (for client validation)
2 - Set validation messages for fields;
https://testapp.materialise.net/signature/Public/CaseManagement/ViewCase.aspx?caseId=74218
=>
https://testapp.materialise.net/signature/CaseManagement/ViewCase/74218
=>
=>
Full transcript