TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

OOHtml – Object-Oriented HTML Implementation

47 点作者 ambigious7777超过 1 年前

16 条评论

gloosx超过 1 年前
&lt;!-- The loop --&gt;<p>&lt;ul render=&quot;@items: (name,index) of [&#x27;dog&#x27;,&#x27;cat&#x27;,&#x27;ram&#x27;] &#x2F; &#x27;item&#x27;;&quot;&gt;&lt;&#x2F;ul&gt;<p>Maybe I am special, but this looks absolutely cursed to me. Logic in an HTML attribute string? Please no.
评论 #39355135 未加载
评论 #39354936 未加载
评论 #39355847 未加载
parhamn超过 1 年前
I&#x27;ve been wondering recently if there could be a more generic JSX renderer that could be built into browser. &lt;script type=&quot;jsx&quot;&gt; type thing.<p>I think it could work if it decoupled the reactivity layer and exported a &quot;rerender me&quot; hook that libraries like react&#x2F;preact&#x2F;vue&#x2F;solid&#x2F;etc could use to manage reactivity.<p>Because let&#x27;s be real, `&lt;ul render=&quot;@items: (name,index)` and `v-for` type things are terrible. JSX got a lot of things right. It&#x27;s a pretty darn good marriage of HTML and javascript as far as syntax goes. Besides className, key and the curly syntax to drop into javascript, its pretty pure and straight forward.
评论 #39355477 未加载
评论 #39356155 未加载
评论 #39355312 未加载
DeathArrow超过 1 年前
When I read about object oriented anything, I can&#x27;t stop that object is a poor fit for most things programming, mostly because encapsulation and inheritance.<p>Data and code should live separately.
评论 #39356830 未加载
toastal超过 1 年前
Great for all my cases where when my &lt;cat&gt; elements cleanly inherits from &lt;animal&gt;!<p>I could be misreading this, but it looks like this project is overriding the UA’s `querySelector` family of methods, which doesn’t quite sit right. I thought it was a best practice to level the built-in prototypes alone.
评论 #39355872 未加载
cognomano超过 1 年前
Tag languages were a success because SGML. Once we past XML tag languages are not loved by many people. JSON, YAML, and a myriad of another languages are being teach and used today. Don’t get me wrong — I loved when the XML 1.0 spec was published but the broken promise that we would never need to write XML by hand was the cause of hate to tag languages. Object Orientation is hated these days by many people. Those are the challenges this kind of projects have ti overcome in order to be successful.
hyperhello超过 1 年前
The comment-based data-binding syntax &lt;?{ }?&gt; proposed is not going to be PHP compatible.<p>Besides, I don&#x27;t really want programming right in the HTML and never did. Your mind doesn&#x27;t read text the same way it reads programming code; the HTML tags are enough. Put the code elsewhere.
评论 #39354626 未加载
omoikane超过 1 年前
Are there websites built with this? I might expect it to be used for their own website, but currently webqit.io does not resolve.
评论 #39355456 未加载
himmelattack超过 1 年前
There are some really interesting ideas here. I love how scoping works and is integrated with the other parts of the framework.
评论 #39360850 未加载
transfire超过 1 年前
Sorry. There’s way too much complexity here. And too much shouting!<p>The namespace idea did seem interesting though.
评论 #39360889 未加载
masfoobar超过 1 年前
Whenever I see OO[something] in the world of programming, I have that face my mother would be ashamed of.<p>I have jumped on and off of web development in the last 8 years. Everytime I jump back in there are changes.<p>I ended webdev around 2011 being pretty good with jquery, using ajax to load part of web pages. Did some cool stuff for its time.<p>Came back to webdev in 2014 using knockoutjs. Seemed like bloat but did not question decision outside my control. I did like the idea of changing a value and it automatically applied the change on screen.<p>Came back to webdev in 2018 using angular. This was my decision and only because &quot;it was popular&quot; so anyone could take over hte project. Felt like duplicating my work to be honest.<p>Now, its 2022 and back on web dev. React. npm. Seriously... WTF! One site was using npm and grunt JUST TO MINIFY FILES!! Again... WTF!<p>Maybe there is something good about this OOHtml and missing the point entirely. WOuld not be suprised using this requires over 1000 npm dependencies.
评论 #39356150 未加载
troupo超过 1 年前
Apart from some things, it&#x27;s quite damning that a single person came up with better suggestions than the entire W3C&#x2F;WHATWG. Namespacing; scoping; HTML Imports with lazy loading, inheritance and contexts...
评论 #39356125 未加载
评论 #39360998 未加载
xg15超过 1 年前
Are they trying to reinvent XSLT again?
评论 #39355605 未加载
chuckadams超过 1 年前
The scoped IDs are a good idea, and I&#x27;d love to see that make its way into the HTML standard. Not having to generate unique IDs to attach labels to is nice. The rest of this looks like it&#x27;s trying to appropriate Vue or Angular&#x27;s template languages, which ought to stay in Vue and Angular where they belong.
评论 #39360242 未加载
xyst超过 1 年前
Looks like author put in some serious time into this project. It’s a shame the last update was 10 months ago. Linked website does not resolve for me either.<p>I don’t know if I would use this for any serious project. Maybe a hobby project
评论 #39360949 未加载
Alifatisk超过 1 年前
Reminds me of Vue. I guess this would be the ”buildless” version of it, but with bizarre syntax.<p>I’m open for new ideas though, I might give this a try in a small project.
评论 #39383146 未加载
Tomis02超过 1 年前
As if HTML wasn&#x27;t bad enough.
评论 #39363241 未加载