6 ms·
Thanks guys, I was expecting this kind of answers. The part that bothers me is: why there is no "standard" wrapper functions (sliders, contact form,...) that yo
by jdubray 11y ago
Thanks guys, I was expecting this kind of answers. The part that bothers me is: why there is no "standard" wrapper functions (sliders, contact form,...) that you can "theme" with various snippets of HTML/CSS. I would expect it would be a lot more practical to deliver a template as a set of wrapper functions, rather than the raw HTML/CSS as it is always the case.
- whatever_dude 11y agoThat is normally called a Controller or a ViewController or something of the sort depending on the developer's preference. There is no interchangeable "standard" for that for the same reason there is no "standard" for almost anything in technology: different requirements, platforms, styles, projects, etc
- mjpuser 11y agoRe: why there is no "standard" functions that you can [use] to theme various snippets of HTML/CSS. -> There shouldn't really be a "theme" in HTML. Yes, you have classes and stuff, but the html should be _markup_ in that describes data, not worrying about presentation. Different themes should be achieved via CSS, which is the standard theming abilities you're looking for. Honestly, I can understand the confusion, since it's difficult to parse through all the technologies and understand what is going on at the heart of the matter.
- tahssa 11y ago> html should be _markup_ in that describes data, not worrying about presentation. And I wish that was truly the case. Sadly half of all HTML written is to support presentation.
- deleted 11y ago[deleted]
- mplewis 11y agoYou're literally describing React + Bootstrap.
- pascalo 11y agoAm I missing something, or is what the article describes something that doesn't look that far from from React components, really, minus many of its benefits like shadow dom, being reactive, JSX being easier than strings? So you render all this on the server, and then the client does what, or are is this only targeting static pages?
- marknutter 11y ago> React components, really, minus many of its benefits like shadow dom, being reactive, JSX being easier than strings React does not have shadow DOM
- skybrian 11y agoRendering HTML on the server is very old school. Before we had much JavaScript, we rendered HTML on the server and used links and HTML forms for interaction. There are a zillion frameworks in a zillion server-side languages to do this, but mostly not in JavaScript.
- smt88 11y ago> Rendering HTML on the server is very old school That's not true as generally as you've phrased it. Rendering HTML on the server is very useful for certain kinds of sites, like blogs. It allows you to generate pages that can be cached and behave like static pages (with appropriate, static-like headers).
- skybrian 11y agoI agree. Old school doesn't mean it's not useful.
- smt88 11y ago> why there is no "standard" wrapper functions (sliders, contact form,...) that you can "theme" with various snippets of HTML/CSS For one thing, HTML was originally designed for read-only publishing. User interaction was gradually added over time. For another, if you expand the scope of HTML to entire widgets, it'll become an incredibly bloated language. At a certain point, it needs to be building blocks rather than a pre-built solution. Why don't Legos come with cars and boats already built in the box? Because some people don't want a car or a boat, they want a plane. You might get some pieces that lend themselves to a particular purpose (select box, blockquote, etc.), but the language is not highly opinionated about what you do with them.
- takosalad 11y agoFunny you started out mentioning WebObjects. It's free and does everything you dreamed of. It came a long way from the ugly table based layout SJ showed off in 1995. It is the ultimate full stack MVC framework. There is still nothing comparable today. The Model can be generated from db schema or vice versa. You don't need to know SQL. The Model informs the ORM (Object Relational Mapper) how to create/read/update/delete (CRUD) your objects to/from the database. The model also validates your data for you. The field is 255 wide? Then 256 chars throws validation exceptions automatically, and so on. The view is generated by reusable components on the server. Small reusable components ultimately assemble into a full page. Hundreds of components that do everything imaginable exist already. With no code at all, they Controller wires them together using the Direct to Web (D2W) rule system. In fact, if all you want is an admin interface to do CRUD type operations on your database, you won't need anything beyond the hello world D2W application. These rules allow you to make sweeping changes throughout your entire application. Want to change every component that handles text input in a form page? Create one rule: 100: task = 'edit' and attribute.className = 'java.lang.String' => componentName = "MyNewEditStringComponent" [Assignment] Or override with other components as appropriate 105: task = 'edit' and attribute.className = 'java.lang.String' and session.user.isAdmin => componentName = 'AdminEditString' [Assignment] WebObjects allows you to maintain a level of state that no other web based MVC can match. You can nest your tables of data as deep as you like, paginating and sorting any of them at every level. No other web framework can do this. Period. You only need to learn WebObjects to be full stack.