Giter VIP home page Giter VIP logo

Comments (15)

viniciusgama avatar viniciusgama commented on May 20, 2024

what is the plan? just curious since I'm feeling the pain to read all this jade code 👍

from strider.

niallo avatar niallo commented on May 20, 2024

Yeah, definitely won't be Jade. I'm not sure what to use yet instead. Any suggestions?

/cc'ing @peterbraden for some pointers...

from strider.

peterbraden avatar peterbraden commented on May 20, 2024

Yeah, I don't really know what the best template engine for node is at the moment. They all seem to suck in their own ways :)

Definitely want to look at a system where you can do modular views with templates so it's easy to add view code as plugins - dashboards etc.

from strider.

caseman avatar caseman commented on May 20, 2024

Templates, almost by definition lack modularity. Something I was trying to address with dolphy.js until I realized I don't have any web apps I want to write in my spare time anymore ;) But the other main benefit was that they are valid JS data structures (JSON), so there is no parser, and you can manipulate them in code. Downside might be lack of beauty (ala Jade), but as I think we've determined, that's only skin deep.

from strider.

caseman avatar caseman commented on May 20, 2024

Anyway if nothing else floats your boat, you can probably convince me to work on dolphy again. The code and tests are solid, but it totally lacks docs and real-world use. Obviously writing some docs would be priority zero. It is designed to work with node and requirejs out of the box, so it could be used both server and client-side.

from strider.

niallo avatar niallo commented on May 20, 2024

Current suggestions:

Thoughts/additional ideas?

from strider.

caseman avatar caseman commented on May 20, 2024

there's always handlebars: http://handlebarsjs.com/

IMHO ejs and swig smell too much like JSPs.

from strider.

caseman avatar caseman commented on May 20, 2024

I'm also curious what soured you on Jade. Can't be the significant whitespace ;)

from strider.

peterbraden avatar peterbraden commented on May 20, 2024

Jade syntax is super ugly and hard to parse, I personally detest template
engines that eschew html.

I actually like swig - template inheritance is super useful in this sort of
scenario. EJS is also widely known and used, so is a reasonable choice.

handlebars is a little too logicless to be easy to use here - while it's
great for manipulating snippets of html, it gets clunky when you're doing
the whole page.

There's also a bunch more engines - I'd be interested to look at some of
the ones that include clientside rendering too.

On 12 March 2013 15:31, Casey Duncan [email protected] wrote:

I'm also curious what soured you on Jade. Can't be the significant
whitespace ;)


Reply to this email directly or view it on GitHubhttps://github.com//issues/21#issuecomment-14810251
.

Peter Braden

http://PeterBraden.co.uk/

from strider.

viniciusgama avatar viniciusgama commented on May 20, 2024

What about Bliss (https://github.com/cstivers78/bliss)? Is a javascript implementation of the asp.net razor view engine. Pretty easy.

from strider.

peterbraden avatar peterbraden commented on May 20, 2024

I personally don't like template engines that embed a language within another, the less logic the better imho.

On Mar 12, 2013, at 8:28 PM, Vinícius Gama [email protected] wrote:

What about Bliss (https://github.com/cstivers78/bliss)? Is a javascript implementation of the asp.net razor view engine. Pretty easy.


Reply to this email directly or view it on GitHub.

from strider.

viniciusgama avatar viniciusgama commented on May 20, 2024

you're talking about the way it uses javascript inside the view?

@function display(product) {
  <li>@product.name ([email protected])</li>
}

<ul>
  @products.forEach(display)
</ul>

from strider.

peterbraden avatar peterbraden commented on May 20, 2024

Right

On Mar 12, 2013, at 9:10 PM, Vinícius Gama [email protected] wrote:

you're talking about the way it uses javascript inside the view?

@function display(product) {

  • @product.name ([email protected])
  • }
      @products.forEach(display)


    Reply to this email directly or view it on GitHub.

    from strider.

    niallo avatar niallo commented on May 20, 2024

    Think swig makes the most sense. @peterbraden's argument is to use template inheritance for the nascent front-end extension system.

    from strider.

    peterbraden avatar peterbraden commented on May 20, 2024

    We're now using swig. Fixed!

    from strider.

    Related Issues (20)

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. 📊📈🎉

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google ❤️ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.