Microsoft’s flagship technology for almost 10 years, ASP.NET is gaining another half a level this year: it is now in version 4.5. This session was presented by Thomas Jaskula.
HTML5 in target, lighter JavaScript, even easier coding, Thomas Jaskula presents us with a few selected pieces of what awaits us, .NET web developers, in a few months.
Data binding controls become a real pleasure!
Data binding is greatly simplified and above all made more reliable.
No more strings to bind data to controls.
The new ModeleType property of bindable controls allows to strongly type the control.
Then, you just have to access the properties of the binded object via the Itemobject :
What was done before using OnDataBound events in the code-behind will now be done in a much easier way directly in the aspx while guaranteeing the integrity of the code with the object model preserved and the flexibility of writing with auto-completion.
The use of the object rather than strings to define the binding also ensures a better performance, the reflection not being necessary any more.
The methods for retrieving/updating data can be defined directly in the control definition in the aspx :
ID = "categoriesGrid" runat = "server"
AutoGenerateColumns = "false"
AllowSorting = "true" AllowPaging = "true" PageSize = "5"
ModelType = "WebApplication1.Model.Category" DataKeyNames = "CategoryID"
SelectMethod = "GetCategories"
UpdateMethod = "UpdateCategory" >
Where it starts to become really nice is that the method used by the control can use parameter attributes to link this parameter to another input, for example another control, a variable in session or a parameter passed in the url(querystring):
public IQueryable < Product > GetProducts ([ QueryString ] string keyword )
With all this, as a bonus, we get a gridview that is able to sort/paginate itself, without any line of code to add. What do the people want?
A gadget for html encoding
No more excuses for not encoding unsafe strings: a new facility allows you to bind an automatically html-encoded field:
<%#:
HTML 5 for all !
In bulk :
- the TextBox’s TextMode=”Email” which allows you to validate an email (and others) with HTML5 sauce, and hop some JavaScript less in the page,
- the HTML5 compatible UpdatePanel
- the FileUpload which manages the sending of several files
Asynchronism, could we escape it?
If there is a term that we should remember this year, it is probably asynchronous.
ASP.NET had to have its share of asynchronism.
It is now possible to implement completely asynchronous Modules and Handlers.
There are also new methods for reading/writing asynchronous streams on Request and Response objects.
Back to the future ?
HTML5 obliges once again, the last presentation concerning ASP.NET is not the least: the support of WebSockets.
Thomas Jaskula gives us a very simple but very efficient demonstration:
- A browser that opens a connection (one line of JQuery) in TCP socket (in connected mode, so no more HTTP) on the server (2/3 lines of C#).
- The server broadcasts all the messages it receives to all the clients that are connected in WebSocket.
It reminds the good old memories of C classes where we learned the network by coding a chat.
So obviously the question on everyone’s lips: how will the servers hold the load if the developers start opening sockets at all costs?
The question remains, it’s a technology that has potential, but to watch…
In conclusion
Like the message that Microsoft wants to convey globally during these TechDays, ASP.NET tends resolutely towards the opening. This is rather good news and the dynamics brought by ASP.NET MVC only enriches things.
Images and snippets from : What’s New in ASP.NET 4.5
Directories and services
Guides
- Accounting dictionary
- Economic dictionary
- IoT dictionary
- Marketing dictionary
- Webmastering dictionary
- Office supplies guide
- Buying guides
- Printer Buying Guide
- Computer Buying Guide
- Digital Business Guide
- Real Estate Guide
- Artificial Intelligence Guide
- iPhone Guide
- Personal Finance Guide
- Apple Products Guide
- Neighborhood Trouble Guide
- Management Guide
- Video Game Guide
- Recruiting Guide
- Streaming Guide
Training
-
Customer Journey and Experience
18 Nov 2021 -
SEO: auditing your site
22 Nov 2021 -
Emotional intelligence and stress management
06 Dec 2021 -
e-Merchandising
07 Dec 2021 -
Data marketing: challenges, perspectives and concrete business cases
14 Dec 2021 -
Excel: the essentials
14 Dec 2021 -
AI: Becoming a pioneer in artificial intelligence
14 Dec 2021 -
Digital marketing: increase the profitability of your digital device
Dec 14, 2021
References
- Amazon Prime Video
- Unemployment
- GDP Ranking
- Government debt
- Lease agreement
- GDP France
- Average wage
- Life insurance
- Income tax
- LDD
- LEP
- Livret A
- Real estate capital gains
- Property prices
- iPhone 13
- Forbes ranking
- Sale dates
- Richest man
- Netflix
- Copper price
- Activity bonus
- RSA
- Smic
- Switch
- VAT rate
- Black Friday
- Video conferencing
- PS5
- Xbox Series X
- Procrastination