Quantcast
Channel: try-catch-FAIL - A fluent HtmlHelper extension for using FusionCharts in ASP.NET MVC, Part 2
Viewing all articles
Browse latest Browse all 10

tobi on A fluent HtmlHelper extension for using FusionCharts in ASP.NET MVC, Part 2

$
0
0
i do not understand why you could not go with object initializers instead of fluent:

<%= Html.FusionCharts(new Chart()
{
Column2D = new ColumnInfo(new[] {1, 2, 3, 4, 5}, 300, 300, d => d),
Caption = "Numbers",
SubCaption = "(subcaption)",
Label = d => "Label " + d,
Hover = d => "Hover " + d,
Action = d => "javascript:alert(&apos;You clicked on " + d + "&apos;);"))%>

much simpler, faster, cleaner and already well understood. fluent apis are a pest that has become "cool".

chaining is a useful concept but it is a workaround for scenarios where object initialization is not possible. fluent nhibernate is also infected by this stupid trend.


Viewing all articles
Browse latest Browse all 10

Trending Articles