4 ms·
Seaside HTML templating is also done with Smalltalk. For example, to get… <h3>hello</h3> … in Seaside you write: html heading level: 3; with: 'hello'. o
by coconutrandom 17y ago
Seaside HTML templating is also done with Smalltalk. For example, to get…
<h3>hello</h3>
… in Seaside you write:
html heading level: 3; with: 'hello'.
ouch.
- mahmud 17y agoDon't fight the language. Accept it, learn it well, and create amazing things with it. One man's "ouch" is another man's "halelujah". P.S. We, CLers, had various html-embedding formats battle it out over the years and it seems like CL-WHO won. (:h3 "Hello)
- gcv 17y agoI agree that it's very cool to transform your display code using macros, but it's a non-starter on many projects, because you can't farm out the HTML/CSS work to a designer.
- draegtun 17y agoOnly farm out CSS. Markup is probably better (in most cases) with the developer IMHO.
- coconutrandom 17y agoPerhaps optimally. But, I've worked with many a developer who couldn't tell you why divs differ from spans.
- draegtun 17y agoWell we've all been there ;-) Still think of the HTML in the same vein has producing JSON, XML, etc. The CSS is then just the design logic maintained (hopefully!) by the designer.
- mahmud 17y agoYou shouldn't farm out markup! HTML generation has nothing to do with layout design or anything visual. You generate/write clean and semantically correct markup and you leave out sufficient hooks in there for any designer to plug-in the desired CSS and graphics. http://news.ycombinator.com/item?id=700147 http://news.ycombinator.com/item?id=700147
- draegtun 17y agohalelujah ;-) Its like: html { h3 { 'hello' } } ... in Markapl (Perl) or Markaby (Ruby). Much nicer to build (display|markup) logic here than with HTML template methinks.
- igrekel 17y agoYes it is often more verbose at times. But there are many advantages to this way of having the html as smalltalk code. You can use the same refactoring tools you use on code to refactor your html. You use the same abstraction and composition mechanisms to structure your html. You use the same control structures for you html than for your code (which are very clear in smalltalk). You can put some html in a method and reuse it in many places, it's also easy for easier to create your own components or tags in seaside than it is in other web component frameworks I have used.