|
I came across this[^], but I was wondering if anyone came across anything else?
Marc
|
|
|
|
|
I was expecting a "Digital subscriber line", written in C#.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Heh, no, Domain Specific Language.
Marc
|
|
|
|
|
The code there is full of problems (at least the visible part, there is more?), so it is not clear to me what are you looking for...DSL is Domain specific language?
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Yes, a Domain Specific Language. Basically, something "fluent" (or is it fluid?) that would make it easier to write HTML where tags are methods that you can chain together with . notation.
Marc
|
|
|
|
|
After my last message, I changed my google search from "C# HTML DSL" to "C# fluent HTML" and found this.[^] More investigation will occur now.
And thanks, you helped me refine my search criteria!
Marc
|
|
|
|
|
Why not to write HTML? I means AS HTML?
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Kornfeld Eliyahu Peter wrote: Why not to write HTML? I means AS HTML?
Because there are times I want to generate the HTML server-side and I don't want the overhead of a view engine like Razor that compiles the view at runtime for Pete's sake, nor some goofy C#'s markup syntax for doing things like for loops and if statements inside the freaking HTML markup of all places, nor some idiotic idea that a view can only be associated with one model for referencing model data.
Is that a good enough reason?
Marc
|
|
|
|
|
Way to tell him! Put 'im in his place!
If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
|
|
|
|
|
It is fascinating how many people do NOT like the MVC implementation of Microsoft (and how Microsoft still push it AS IS)...
I'm working on the new engine for our next generation web application (in this step we will move all the functionality to the web and close the desktop app) and me too taking only parts of the MVC...
However until now I hadn't come to do my own DSL...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
|
The fact itself that you had to create such builder says everything...
Not MVC as idea, but the implementation of Microsoft lacks a lot of, otherwise you would write HTML as HTML and wouldn't bother yourself with such builders like yours and the one Marc looking for...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
It wasn't created for MVC, it was used to send generate HTML emails from a WPF application.
In MS MVC, you can write everything as plain HTML if you want. You don't need to use any builders.
|
|
|
|
|
Kornfeld Eliyahu Peter wrote: It is fascinating how many people do NOT like the MVC implementation of Microsoft (and how Microsoft still push it AS IS)...
The problem as I see it is that Microsoft (but they are not unique in this) create monolithic solutions rather than lightweight components that you can plug together for the desired behaviors. The website on Rails is another good example, but at least they are transparent about their intention when they write "Rails is opinionated software. It makes the assumption that there is the "best" way to do things."
ASP.NET MVC, like so many other "cool technologies" that Microsoft produces, often strikes me as the work of high school students with real world experience.
Marc
|
|
|
|
|
Why not use XDocument, XElement and XAttribute from Sytem.Xml.Linq namespace?
|
|
|
|
|
Quote: C# is an extremely expressive language, so it turned out to be very easy.
Apart from the 90 bajillion edge cases the code doesn't cover, which are handled quite nicely in the HTML Agility Pack[^] for example.
|
|
|
|
|
JMK-NI wrote: Apart from the 90 bajillion edge cases the code doesn't cover
But which can be covered with general purpose "tag" and "attribute" functions. I thought HTML Agility Pack was for parsing?
Marc
|
|
|
|
|
HAP is read/write. You can create documents with it as well.
What do you get when you cross a joke with a rhetorical question?
---
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
---
Do questions with multiple question marks annoy you???
|
|
|
|
|
With or without nasal fitment?
|
|
|
|
|
I believe you can use/extend TagBuilder[^] class. It's handy and very helpful.
WARNING: It is highly required to like ASP.NET MVC
Wonde Tadesse
|
|
|
|
|
Wonde Tadesse wrote: I believe you can use/extend TagBuilder[^] class. It's handy and very helpful.
Interesting, but it's not exactly a fluent class (ie, it returns itself)
Marc
|
|
|
|
|
Ya. That is why I said extend
Wonde Tadesse
|
|
|
|
|
Wonde Tadesse wrote: Ya. That is why I said extend
Ah.
Marc
|
|
|
|
|
|
Yes, I have written a HTML 5 boilerplate using a fluent interface which generates the HTML on the server side. What I like about it is that it is strongly typed and I can use inheritance etc.
|
|
|
|