DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Building a RESTful Service Using ASP.NET Core and dotConnect for PostgreSQL
  • Working With dotConnect for Oracle in ASP.NET Core
  • Implementing Cache Dependency in ASP.NET Core
  • Working With dotConnect for SQL Server in ASP.NET Core

Trending

  • Data Lake vs. Warehouse vs. Lakehouse vs. Mart: Choosing the Right Architecture for Your Business
  • Operational Principles, Architecture, Benefits, and Limitations of Artificial Intelligence Large Language Models
  • Endpoint Security Controls: Designing a Secure Endpoint Architecture, Part 2
  • Building a Real-Time Change Data Capture Pipeline With Debezium, Kafka, and PostgreSQL
  1. DZone
  2. Data Engineering
  3. Databases
  4. 3 Reasons to Use Tables Instead of ASP.NET MVC Webgrids

3 Reasons to Use Tables Instead of ASP.NET MVC Webgrids

With the absence of WebGrids in ASP.NET Core, developers are looking for alternatives. Today, we'll cover 3 reasons why we could use tables instead of WebGrids.

By 
Jonathan Danylko user avatar
Jonathan Danylko
·
Jan. 06, 17 · Opinion
Likes (2)
Comment
Save
Tweet
Share
18.2K Views

Join the DZone community and get the full member experience.

Join For Free

For the majority of my projects, I constantly use the ASP.NET MVC WebGrid. I also wrote a series of posts on how to maximize your WebGrids (WebGrid Series, Ultimate WebGrid Cookbook).

But we're in a different world now, aren't we?

There's a new version of ASP.NET called Core (version 1.1 at the moment) and for those who want to transition their old projects over to ASP.NET Core, you may be wondering what happened to the WebGrid.

Heck, I was wondering where it went.

I'm in the process of converting a project of mine over to ASP.NET MVC Core. I use WebGrids all over the place for tabular data (NOT layout!), but I couldn't find WebGrid.

I found out it's missing from Core.

OMG! What am I to do? This is HORRIBLE!

Calm down.

Even though it's missing from Core, to be honest, would this be a bad thing?

Today, I discuss three reasons why tables may make a comeback (and I talk myself off the ledge).

1. WebGrid is Not Flexible Enough

Now, while I've always loved how the WebGrid works, I experienced some warts with the code. I mentioned these warts in a post called Creating a Responsive WebGrid in ASP.NET MVC.

It seems the WebGrid isn't granular enough.

In an HTML5 world, I can't add a simple "data-" attribute to something. It has to be a class. End of story. I can't add custom attributes to a table row (TR) or table data (TD).

When you also have hard-coded HTML in the library, I tend to raise an eyebrow suggesting something isn't right.

2. No WebGrid Library Is Available for ASP.NET Core

I've got a gut feeling that the majority of developers out there are already working through this. They are moving forward without a WebGrid.

I've looked around for ASP.NET Core WebGrids and the closest thing I found was NonFactors's WebGrid which is open-source and pretty solid.

But do we really need a WebGrid when we can just use the ol' table tags and then sprinkle some JavaScript (and Bootstrap for alternating rows) on top to make it pretty.

3. It's Becoming a JavaScript World

With everything moving towards JavaScript lately, the WebGrid always addressed 80-90% of what you needed...a table with formatted data columns. That was your 80-90%. After that, it was mostly how do you want your data to interact with the user. It was icing on the cake.

Looking back over the WebGrid series, a large number of features are JavaScript-based (i.e. inline-editing with SignalR, Filtering). All I was doing was sending formatted columns that would render a table on the client-side. Once that was done, I needed JavaScript to finish the feature.

If you look at a majority of grids, they are all JavaScript-based.

Fortunately, with Angular, Ember, Meteor, Aurelia, and every other JavaScript framework under the sun, they come with data-binding right out of the box making it one of the must-have features of a JavaScript framework.

Conclusion

In this post, I explain why it may be better to move back to tables instead of looking for a WebGrid replacement library to "rule them all." Are the old table tags "new" again?

Give me your thoughts on this. I've been going back and forth on whether to write a more modular WebGrid for Core or to just start using tables and sprinkling JavaScript on top of it.

Post your thoughts below as to whether we need WebGrids or not.

Database ASP.NET MVC ASP.NET

Published at DZone with permission of Jonathan Danylko, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Building a RESTful Service Using ASP.NET Core and dotConnect for PostgreSQL
  • Working With dotConnect for Oracle in ASP.NET Core
  • Implementing Cache Dependency in ASP.NET Core
  • Working With dotConnect for SQL Server in ASP.NET Core

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!