3 ms·
Separation of concerns can be handled in one language. The popular MVC pattern does not require three separate languagues. And in fact that's rare in my experie
by tchaffee 7y ago
Separation of concerns can be handled in one language. The popular MVC pattern does not require three separate languagues. And in fact that's rare in my experience. So web frameworks moving towards the norm and allowing it to all be handled in the same language should not be surprising or a mess.
- wongarsu 7y ago>The popular MVC pattern does not require three separate languagues. And in fact that's rare in my experience. ASP.NET MVC uses C#, (C)HTML and CSS for a total of three languages. WPF uses XAML and C# for a total of two. Android uses XML and Java for a total of two. I think Delphi only uses one, I vaguely remember the designer outputting plain Delphi instructions? I might be misremembering. React is not exactly encouraging separation of concerns, and in some ways this was better in the times of JQuery. But I don't think this is directly related to the number of languages involved.
- tchaffee 7y agoOf course when it comes to the web it's three languages underneath. Per the standard, you can't escape that. Now look at apps that are built to run on an OS using MVC. It's usually all in the same language. Why? Separation of concerns doesn't imply separate languages. There might be some merit to the idea of a DSL for each concern? But if the end result of that experiment includes CSS, I would call the experiment a failure.
- wongarsu 7y agoAndroid, WPF and Universal Windows all use XML to specify UI, and the programming language of choice to specify code. That's still two languages, even if it removes the need for a third language exclusively for styles. In each you could use pure code to build the UI but readability and maintainability would suffer a lot, so nobody does that. Once you have the view separated from the controller, writing the view in a language better suited for nested UI seems quite natural. What are examples of MVC using only one language?
- mumblemumble 7y agoPerhaps Cocoa development, though it typically used a GUI tool for the UI layout, so not really. Smalltalk, but Smalltalk MVC is different from what MVC typically means nowadays. FWIW, WPF uses MVVM, not MVC. The differences are as subtle and pedantic as they are important.
- rsynnott 7y agoI'm not sure how common vs not common Interface Builder usage really is. At any rate, I'd say "typically" is a stretch.
- mumblemumble 7y agoThat's fair. My experience on the subject is admittedly pretty ancient. When I was doing it, back in the early 2000s, IB was how everyone I knew did it.