Recent Comments



Mark Landgraf
Friday

re: Accepting Raw Request Body Content with ASP.NET Web API

Thank you so much! I'm going to these insights in dealing with OData v4 in Microsoft.OData.Client's DataServiceContext.SaveChangesAsync()'s insistence on using the odata.bind annotation in a json body when POSTing a new record with a related entity. Currently (07/2018) Web API doesn't support odata.bind on the server side. So now, I can inspect a json body and extract a parent entity's ID from the odata.bind annotation for a new child's foreign key value.

Thanks again


Jan
July 11, 2018

re: Getting the .NET Core Runtime Version in a Running Application

I'm using

"Version: " + System.Environment.Version +
" from: "+ System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()

to figure out the .net version. It prints

Version: 4.0.30319.42000 from: /usr/share/dotnet/shared/Microsoft.NETCore.App/2.1.2/

on Ubuntu and

Version: 4.0.30319.42000 from: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.2\

on Win7


Tune Red Feet
July 03, 2018

re: Which .NET Core Runtime Download do you need?

Hi Rick,

Thanks for this immaculate summary of Core .Net installation packages!

I happened to install the 'Hosting' package on my web server just 1 day before I stumbled upon your post about it.

And since I prefer to run 64-bits, I added this installation option:

Install Hosting Building Installer (Windows) with option to not install x86 dlls: dotnet-hosting-2.1.1-win.exe OPT_NO_X86=1

Do you think this is a/the good choice for a web server? Or have you chosen a different install on your webserver(s)?


Mikel
July 01, 2018

re: Error Handling and ExceptionFilter Dependency Injection for ASP.NET Core APIs

with using AuthorizeAttribute that config to work with user access, Exception filter not work. the AuthorizeAttribute return 403 error but exception filter cannot catch it!!


Roshdy Kamel
July 01, 2018

re: Bootstrap Modal Dialog showing under Modal Background

Nice ideas you got there, but i found an easier one using only css. Note: If you removed the backdrop

data-backdrop="false" 

or

display: none

you will lose the [click to hide] option. So in short, a good solution would be:

.modal{
  background-color: rgba(0, 0, 0, 0.3);
}
.modal-backdrop{
  position: relative;
}

This way, you'll have the dark background, the modal will not hide behind the backdrop, and you still can click-to-hide.


Rick Strahl
June 26, 2018

re: Creating a WPF ItemSource Length Filter Converter

@Thomas - the problem with the multi-binding is that I think you lose the ability to just use a static value easily directly - you now have to bind to something.

It's really a bummer that WPF doesn't support binding the Converter parameter. So many little edge cases in WPF where you just go "Why not that?" 😃


Wojciech Gebczyk
June 25, 2018

re: Creating a WPF ItemSource Length Filter Converter

You might try to reuse ListCollectionView.Filter. Fixing sorting and relying on item's identity, that should be possible.


Thomas Freudenberg
June 23, 2018

re: Creating a WPF ItemSource Length Filter Converter

Hi Rick, If you want to make the number of items dynamic, you may want to use a IMultiValueConverter:

public class ItemSourceCountFilterConverter : IMultiValueConverter
{
    public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    {
        var val = values[0] as IEnumerable;
        if (val == null)
            return values[0];

        var take = 10;
        if (values.Length > 1)
            take = (int)values[1];

        // <omitted for clarity>
    }

    public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
    {
        return null;
    }
}

You can the use MultiBinding like this:

<ItemsControl>
    <ItemsControl.ItemsSource>
        <MultiBinding Converter="{StaticResource ItemSourceCountFilterConverter}">
            <Binding Path="Configuration.RecentDocuments" />
            <Binding Path="Configuration.MaxRecentDocuments" />
        </MultiBinding>
    </ItemsControl.ItemsSource>
</ItemsControl>

Unfortunately, this will not work yet: MultiBinding will update only on PropertyChanged events, which is not raised by ObservableCollection when adding an item (MultiBinding does not respect CollectionChanged events. The hack is to specify an additional value, which will change when the collection changes. The Count property does the trick:

<ItemsControl>
    <ItemsControl.ItemsSource>
        <MultiBinding Converter="{StaticResource ItemSourceCountFilterConverter}">
            <Binding Path="Configuration.RecentDocuments" />
            <Binding Path="Configuration.MaxRecentDocuments" />

            <!-- hack to update the MultiBinding when the collection changes -->
            <Binding Path="Configuration.RecentDocuments.Count" /> 
        </MultiBinding>
    </ItemsControl.ItemsSource>
</ItemsControl>

Rick Strahl
June 23, 2018

re: Updating my AlbumViewer to ASP.NET Core 2.1 and Angular 6.0

@harry - I have to take a look and see. Haven't tested on IE in a long - at this point Internet Explorer is dropping off my list of browsers that I generally support. That said I still think this should work.

Looks like in order for IE to work explicit polyfills have to be added. By default these are off in Angular applications.

More info here: https://blog.angularindepth.com/angular-and-internet-explorer-5e59bb6fb4e9


Rob
June 22, 2018

re: Explicitly Ignoring Exceptions in C#

Consider the StackOverflowException and the OutOfMemoryException. If you blindly ignored those, you'd never know they occurred. You also wouldn't know why your application is in an inconsistent state or why it crashes when it executes arbitrary code shortly after such Exceptions are thrown.

Speaking from experience, if you blindly ignore Exceptions, you'll have a difficult time determining the cause of random errors (even if you had a Memory Dump when the app crashed). At the very least, I'd log the Exception and then either re-throw the original Exception or throw a more specific Exception with the original Exception as the Inner Exception.

I'm not so naive to believe I know everything. I can only speak from experience. If you have a real-world example where blindly catching such Exceptions is absolutely necessary, I'd certainly like to learn.

-rob


Andrea Angella
June 22, 2018

re: Web Code is a solved Problem: How about fixing Web UI next?

Very nice observations and opinions are express here. Great post. I totally agree with the sentiment! I am looking forward to a better and more unified approach to build UI for the web. I just need to wait another 2 years 😃


Andy
June 22, 2018

re: UNC Drive Mapping Failures: Network name cannot be found

Thanks for placing this issue and fix out there. My "LanmanWorkstation" got corrupted to "LanmanWorkstationrk". Spent a couple of hours scratching my head and trawling the internet until I found your solution. Many thanks!


Dmitry Pavlov
June 21, 2018

re: Explicitly Ignoring Exceptions in C#

I used to create similar safe try-catchers for actions. It was especially useful when you have a chain of operations to perform and you'd like to execute them one by one. The next operation should be performed only if the previous one succeeded. So it make sense to combine these "LanguageUtils" helpers with fluent interface approach and also turn them into extension methods of some "IOperation".


David
June 21, 2018

re: JavaScript JSON Date Parsing and real Dates

Hi Rick,

Thanks a lot for your help. I'm using Angular 6 and the grid component from Telerik (Kendo UI for Angular). It seems the Telerik grid component is doing something unexpected with the JSON parser and that is clashing with the json.date-extensions library. This is going to be a real pain to fix 😦

Thanks heaps for you response,

David


Jojo Aquino
June 21, 2018

re: Explicitly Ignoring Exceptions in C#


me: "i really think we should handle this kind of exception because reasons"
co-worker: "its ok, i explicitly ignored it using lambda and generics and whatnot"

Chris J Breisch
June 20, 2018

re: Explicitly Ignoring Exceptions in C#

In general, I don't have a problem with this if used explicitly and sparingly. In fact, I have already used it on a small project. I did change your class name to ExceptionHandler, and your method name to Try(). That makes more sense to me and seems more consistent with things like Int.TryParse().

However, I would point out that this is in violation to "Uncle Bob"'s writings on Command Query Separation from Clean Code.

Functions should either do something or answer something, but not both. Either your function should change the state of an object, or it should return some information about that object. Doing both often leads to confusion. Consider, for example, the following function:

public boolean set(String attribute, String value); 

This function sets the value of a named attribute and returns true if it is successful and false if no such attribute exists. This leads to odd statements like this:

if (set(”username”, ”unclebob”))… 

Imagine this from the point of view of the reader. What does it mean? Is it asking whether the “username” attribute was previously set to “unclebob”? Or is it asking whether the “username” attribute was successfully set to “unclebob”? It’s hard to infer the meaning from the call because it’s not clear whether the word “set” is a verb or an adjective.

The author intended set to be a verb, but in the context of the if statement it feels like an adjective. So the statement reads as “If the username attribute was previously set to unclebob” and not “set the username attribute to unclebob and if that worked then.…” We could try to resolve this by renaming the set function to setAndCheckIfExists, but that doesn’t much help the readability of the if statement. The real solution is to separate the command from the query so that the ambiguity cannot occur.

if (attributeExists(”username”)) {
     setAttribute(”username”, ”unclebob”);
     …
}

However, the main issue that I have with this is that it needs to be used sparingly. Swallowing exceptions is almost never a good idea. The advantage of this, though is that it makes it clear that the developer wanted to swallow the exception, and didn't just forget to do something in the catch block.

My other issue with it, though is that often when I want to swallow an exception, it may be just a specific type. Consider your DeleteFile example. This could fail because the file didn't exist, as you suggest. But it might have failed because I don't have permissions to delete the file, or it's open and can't be deleted, or several other reasons. Blindly ignoring the error and assuming that the file is already deleted is guaranteed to bite you later on.


Mallikh
June 20, 2018

re: WPF Bindings and CurrentCulture Formatting

I am facing the same issue in a WPF application and i tried the solution mentioned here but it is not working. more details here.


harry
June 20, 2018

re: Updating my AlbumViewer to ASP.NET Core 2.1 and Angular 6.0

the application does not work on IE11,
Any solution ?


Rick Strahl
June 20, 2018

re: JavaScript JSON Date Parsing and real Dates

@David - you need to find whatever is calling the routine with a number. The code isn't breaking inside of this function it's breaking inside of the API, which expects a function and is likely trying to execute the number (which fails). There's likely another filter attached to the JSON parsing chain that's causing this to happen. You should be able to look at the call stack when you see the number and see where it's being called from. Hopefully it's externally tracable code and not internal traces.


David
June 20, 2018

re: JavaScript JSON Date Parsing and real Dates

Hi Rick,

This post and the json.date-extensions library on GitHub has been really helpful to me. Today however I came across runtime error that is originating from json.date-extensions library in the following function:

        JSON.parseWithDate = function(json, chainFilter) {
            /// <summary>
            /// Wrapper around the JSON.parse() function that adds a date
            /// filtering extension. Returns all dates as real JavaScript dates.
            /// </summary>    
            /// <param name="json" type="string">JSON to be parsed</param>
            /// <returns type="any">parsed value or object</returns>
            var parse = JSON._parseSaved ? JSON._parseSaved : JSON.parse;
            try {
                var res = parse(json, createDateParser(chainFilter));
                return res;
            } catch (e) {
                // orignal error thrown has no error message so rethrow with message
                throw new Error("JSON content could not be parsed");
            }
        };

The problem is with the chainFilter parameter. From studying the code it seems this parameter should be a function, but something is calling this function and passing a number for chainFilter. This is causing the runtime error.

I notice in this blog post, you don't mention the chainFilter parameter. What does this parameter do and is needed? Is it supposed to be the equivalent of the reviver function on the default JSON.parse fuction (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse)?

Thank you David


Rick Strahl
June 18, 2018

re: Explicitly Ignoring Exceptions in C#

@Oliver - I think you're missing the point. First off handling an exception with a proper filter and then still ignoring the error (because there's nothing that you can or should do beyond acknowledging that a failure occured) is no better than using an empty block or this IgnoreErrors implementation. My point is that there are legitimate scenarios where you explicitly want to ignore an error - and I've given examples as they apply to me and my reasoning. If you tell me that you never have those use cases I'd be very surprised.

I'm not advocating ignoring errors to make shit work that isn't working. I'm advocating being explicit about where you choose to ignore an error. And if the use case is frivolous and trying to hide a problem a code review should still find and deal with that issue.


Chuck
June 18, 2018

Lucas
June 18, 2018

re: Explicitly Ignoring Exceptions in C#

I understand the desire to not handle exceptions which do not cause a break in the application logic or process flow, but here's a question: Why not use the catch parameter to explicitly ignore specific types of exceptions instead of ignoring all exceptions with the unqualified catch? To use one of the examples stated in the article where a click event causes an exception, well, what if somebody edited that click event after you implemented your handy "IgnoreErrors" helper, and suddenly you're ignoring a new exception that you wouldn't have expected to see before that actually needs to be handled? Heck, wouldn't it even be possible to pass an exception type (or list of exception types) into your IgnoreErrors method? That way you could specify which exceptions you wanted to ignore, so if the implementation changes later, you are less likely to swallow critical errors.


Chris K
June 18, 2018

re: Explicitly Ignoring Exceptions in C#

This is just about the best idea I've ever seen. (Maybe a bit of an exaggeration, blame it on the caffeine.)


Oliver
June 18, 2018

re: Explicitly Ignoring Exceptions in C#

Your customer will love you. No exceptions at all, what a wonderful world. Even if you had bugs in your app (like operation is null) your app will behave as if it is correct. It must be the customer who is wrong.

Yes, I do know situations where I also eat all exceptions, but these are very rare and most the times while shutdown the app. A try catch with an explicit comment in catch block why I do not care for exceptions here is fine and a good discussion point if someone knows better.

IMHO introducing this IgnoreErrors is the wrong signal to the whole development team and will lead to „Exceptions? Hey, just use IgnoreError, compile and ship!“


Perry
June 18, 2018

re: Creating a dynamic, extensible C# Expando Object

Yup, I ended up creating an ActionFilter and overriding the OnActionExecuting method, which has already done the native mapping. I then add the custom dynamic field mapping to the model object. It's nice and clean and my Action function has the complete object mapped with the dynamic properties!


Peter Campbell
June 18, 2018

re: Explicitly Ignoring Exceptions in C#

This is great, its always bothered me when I have had to ignore exceptions. File operations in particular tend to through these up.


Anderson
June 18, 2018

re: Explicitly Ignoring Exceptions in C#

Hey, Rick

Do you believe as just did it a couple of weeks ago? Not exactly the same implementation obviously, but pretty similar. But I still had some problems with the Mr. Bookthrower...I'm going to share this link with him =)

One thing I did differently was receiving another action to be executed inside the catch that you could use for logging purposes or in your case, you could pass something like that: () => Model.Window.ShowStatusError("Download failed...");

Oh, any reason to use operation.Invoke() instead of operation()?


Matthias Schippling
June 18, 2018

re: Explicitly Ignoring Exceptions in C#

I think my colleagues would consider me one of those bookthrowers 😉. My problem with the empty catch block is, that it's not clear if it was really the intent of the author or just forgotten error handling or logging. So until now I usually just wrote "// ignore exception" or a similar comment in the catch block.

I think your helper method is also a good way to make it explicit.


holger leichsenring
June 18, 2018

re: Explicitly Ignoring Exceptions in C#

Sure there are situations that makes it necessary to catch an exception and do not communicate the possible cause for it to the caller of the function. There are two things that came to my head about this approach:

  • Why not writing out to log when an exception had been thrown? There are rare cases when an exception can really be ignored at all (thinking about COM ObjectModel traversal in Excel), in most cases, catching an exception means to write a log entry. Actually to avoid debugging at least.
  • I do like the library exactly because of the reason mentioned before: When I anyway expect an exception to be raised and I want to handle it in a certain way, there should be library to take away the boilerplate code. The lib makes it easy to communicate to the next maintainer of the code that this was intentially. This raises the question when this lib needs to be used and when not, especially. The latter due to the fact, that "ignoring exceptions" (which should better be read as: I expect an exception to be raised and I handle it in a certain way due to, I know exactly how) can happen, but a rare.

Finally, I have to confess, I do not like your samples. Let's take this: if (LanguageUtils.IgnoreErrors(() => { Directory.CreateDirectory(workFolder); }))
return workFolder;


Kevin Rich
June 17, 2018

re: Explicitly Ignoring Exceptions in C#

I like that this is clean and offers the future maintainers of code the explicit statement that "I meant to do that."


Rick Strahl
June 17, 2018

re: Creating a dynamic, extensible C# Expando Object

@Perry - it will definitely work for the actual properties on the object. I'm not sure how MVC would work over the dynamic properties to retrieve values but if they are dynamic you probably wouldn't be interested in getting those bound any way and assign those manually most likely...


Perry
June 17, 2018

re: Creating a dynamic, extensible C# Expando Object

Nice, this is pretty much what I was looking for. DO you have any recommendations on how an Expando object can be used as a ModelBinder in asp.net core 2.1? Ideally we would still use the built-in model mapping (no need to re-invent the wheel) and then just extend to do the dynamic mapping from the web form?


Ryan
June 16, 2018

re: Explicitly Ignoring Exceptions in C#

I like this. I'm going to steal it for the Java stuff I'm working on at work, where the situation is even worse due to checked exceptions. This looks like a good way to communicate "Yes, I know there's a checked exception here, and I don't care."


MickBig
June 15, 2018

re: Web Code is a solved Problem: How about fixing Web UI next?

Still, HTML stands for Hyper Text Markup Language. So originally it was never designed for Web UI.

Agree XAML is much better suited for this. I silently hope that maybe one day Qt's QML will be implemented as a web standard.


Alberto
June 14, 2018

re: Automating IIS Feature Installation with Powershell

Great article! I've found two small problems on Windows 10 1709:

  1. add Enable-WindowsOptionalFeature -Online -FeatureName NetFx4Extended-ASPNET45 instead of Enable-WindowsOptionalFeature -Online -FeatureName IIS-NetFxExtensibility45 (which probably is a typing mistake)

  2. you have to put the Enable-WindowsOptionalFeature -Online -FeatureName IIS-ASPNET45 as the last line of the script: instead you'll get a registry error (which probably is the "One or several parent features are disabled so current feature can not be enabled." on Winsrv 2016 ) Thanks!


Khadija
June 14, 2018

re: Accepting Raw Request Body Content with ASP.NET Web API

Thank you for your explanation and also your captivating style. It answered perfectly to my use case (sent a text not a file in CSV format).


Rod Macdonald (UK)
June 13, 2018

re: Web Code is a solved Problem: How about fixing Web UI next?

Putting the complete object graph to one side, I also meant to add that perhaps .NET Core could have been based around HTML + CSS and .NET Framework around XAML, but equally, that XAML should have been an extension of HTML (as opposed to a complete replacement). Either way, hope that C# is the preferred way for MS devs to write UI code as I think markup is inefficient.


Dave
June 12, 2018

re: Use Powershell to bind SSL Certificates to an IIS Host Header Site

Late to the party here in 2018, but on a new Win Server 2016, I was able to bind the certificate by grabbing a handle on the Web-binding which was just created and calling AddSslCertificate on it (certificate already imported into WebHosting store).

$binding = Get-WebBinding -Name $siteName -Protocol https  
$binding.AddSslCertificate($thumbprint, "WebHosting")

Thanks Rick!


Dave Wasburg
June 09, 2018

re: Web Code is a solved Problem: How about fixing Web UI next?

I've retreated to the back-end, hoping that the front-end insanity blows over (2 more years...). Sadly, talking to Front-end devs there seems to be a lot of Stockholm Syndrome because they haven't experienced anything else.


Dhvanit Shah
June 08, 2018

re: Retrieve the full ASP.NET Form Buffer as a String

Hi Rick,

Thanks for sharing this code snippet.

I am using this code in my HTTP Module. The purpose is to filter JSON text for some pre-defined text filters from all requests on my web application. If I found the filtered text/keyword then I simply stop request for further processing. But, the issue is when I don't find filtered text and request is good, then it results in error. It seems that FORMS authentication is failing. I tried to read cookie before content and re-added later on but still stuck there. Is there any restriction on reading this content like we can read it only once and then it does not work for second read?

I get 500 HTTP code with "There was an error processing the request." message which is very generic message.

Thanks.


Mikey
June 07, 2018

re: Automating IIS Feature Installation with Powershell

Nice! -- I noticed a couple of these error out because a parent feature is not installed; it looks like if you add the "-All" switch to end of each of the "Enable-WindowsOptionalFeature" commands, then you will not encounter this issue (also, some of the commands are listed more than once, I'm guessing that was to combat this issue, but with -All, it's not necessary anymore).

Also, I prepended my script with this (to make sure it only ran if IIS was missing):

$installed = (Get-WindowsOptionalFeature -Online | `
    where { $_.state -eq "Enabled" -and $_.FeatureName -eq "IIS-WebServer" } | Measure-Object).Count;

if ($installed -gt 0) { return; }

Manoj
June 07, 2018

re: Web Browser Control & Specifying the IE Version

Hi Rick,

I have integrated webbrowser control in outlook - custom task pane where html form gets display. I have browser emulation registry entry with outlook.exe and value 11001. I think it works fine as html form loads and as such no error also user agent shows proper IE11.

One issue I see is "onkeyup" javascript event is not working there. however, if I try same form in any winform application or in IE it works fine. Not sure any issue with outlook.

There is one more focus specific issue as well https://social.msdn.microsoft.com/Forums/en-US/0e411bc7-1dba-4a22-86a6-20529e4fe8ea/focus-problems-with-task-pane-and-webcontrol-in-outlook?forum=outlookdev&prof=required

Do you have any idea about these issues ?

Thanks, Manoj


Rick Strahl
June 05, 2018

re: Web Code is a solved Problem: How about fixing Web UI next?

@mv10 - The fact that a whole litter of devs have never done anything but Web development is a great one. It's interesting to watch actually - if you look closely at most JavaScript/Front End related articles you can see that the assumptions made are tremendous. Intro level articles leave out all the important stuff about build setup. Heck entire frameworks do this on their getting started pages. There's no concept of things not being complicated and completely decoupled into a million pieces.

I'm not sure if that's us old folks being cagey and getting into the "Get off my lawn" space, but honestly I can't fathom that anybody learning this stuff can honestly say this is the way forward, or that this is an awesome platform to work on. It works, and it's truly amazing what some of the developers of both code and UI frameworks have been able to accomplish with crazy hackery, but that still leaves the platform as a steaming pile of crap that requires this kind of extreme hackery to get even the most basic things done.

But that is part of my point here. There's no shortage of ingenuity, but I think it's time to apply that ingenuity to the base platform, and not on making that existing house of cards even more rickety than it already is.


Rod Macdonald (UK)
June 05, 2018

re: Web Code is a solved Problem: How about fixing Web UI next?

That's a huge (and timely) article on UI Rick. I have been trying to beat the drum with MS that they've gone backwards since the original WinForms/WebForms direction - AKA .NET - with common business and data tiers. Of course the limitations of WebForms became apparent and then there was the mobile thing - enter Xamarin. I've been seeking a common UI paradigm. Maybe that was HTML + SVG on the web and XAML for Windows devices. As HTML evolved, more APIs to get ported to HTML (otherwise Google is going to fill that space). I even thought HTML + CSS for 2D stuff and 3D XAML superimposed on top as AR/VR (enter Andromeda?) - but again with MS shunting APIs into the 2D space as things became do-able. In a 'post mouse' world, MS has lost the device market opportunity. But you know what, if a UI could be remoted (or the OS was just a rendering engine) - maybe the world becomes just a screen - AKA Windows.


mv10
June 05, 2018

re: Web Code is a solved Problem: How about fixing Web UI next?

Enterprise development in particular needs to re-think "everything is a web app." We control the desktops and these days most of the reasons web apps were attractive in 1999 are no longer a consideration (for example, installation is now relatively trivial or even unnecessary). I can't even begin to imagine how much money has been wasted by 20 years of enterprise devs grinding through browser nonsense day after day, when a native app could have been cranked out in a fraction of the time -- very likely with better performance, UI/UX, and lower TCO as a bonus.

Speaking from the (large) enterprise perspective, I have to disagree about the wisdom of buying into any of these sprawling, over-engineered JS frameworks. Yes, they solve various problems, but at the cost of long-term viability. None of them are appropriate for the reality of enterprise dev: apps that must be supported for ten years with limited (or no!) budget for rewrites etc.

Apart from those points, I've been saying pretty much the same thing -- HTML/CSS is a terrible train wreck that isn't getting any better -- for close to 20 years. Today this is a bigger problem because the talent pool includes an entire generation of developers (damn kids!) who have grown up without much experience doing anything but working around that mess. Sadly, that momentum is going to be difficult (maybe impossible) to break.


Rick Strahl
June 04, 2018

re: Web Code is a solved Problem: How about fixing Web UI next?

@James - maybe that's the intention, but I used Flexbox for full page layout, and I suppose one can use CSS grid in the context of an individual element in the page as well. So the differentiation seems a bit academic to me. Looking at the actual features both have huge overlap with CSS Grid having a number of page level improvements that make it much better (template regions primarily IMHO).

CSS Grid looks really good - I haven't had a chance to use it yet though.


Boab
June 04, 2018

re: Web Code is a solved Problem: How about fixing Web UI next?

Have you seen https://github.com/praeclarum/Ooui

I'm surprised somebody like Telerik hasn't jumped headlong into WASM, seems a gap in the market to make a UI editor that just works.


James Webster
June 04, 2018

re: Web Code is a solved Problem: How about fixing Web UI next?

CSS Grid and Flexbox are similar, true, however they do have different intended uses.

Flexbox is primarily oriented around layout within a component of a web-page (e.g. a navbar, a sidebar, some application-specific control), and generally in a single dimension.

Whereas CSS Grid is oriented around layout of the whole page, and therefore in two dimensions.