• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Finding WO people for startups (cult of the dead)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding WO people for startups (cult of the dead)


  • Subject: Re: Finding WO people for startups (cult of the dead)
  • From: Marius Soutier <email@hidden>
  • Date: Thu, 29 Sep 2011 20:54:43 +0200

As a matter of fact, it's based on DOM classes and ids. 

For example, you can fill a paragraph with content like this in your code:

(html/deftemplate index "tutorial/template1.html"
  [ctxt]
  [:p#message] (html/content (:message ctxt)))
deftemplate is a macro that creates a template called "index". It creates a function that is applied when the matching route is called (this is defined in conjunction with another library, Ring, which is inspired by Ruby's Sinatra). It loads the file "tutorial/template1.html", and matches each "p" tag with the id "message". Finally, a function is applied that fills the paragraph with the content from the ctxt parameter with the key :message (the colon marks a symbol, just like Ruby).

I have copied this from a tutorial. If you want to know more, check it out:
https://github.com/swannodette/enlive-tutorial


On 29.09.2011, at 19:00, Chuck Hill wrote:


On 2011-09-29, at 1:01 AM, Marius Soutier wrote:

The Clojure Enlive library allows you to create code-free static HTML and replace the contents from Clojure dynamically by applying functions to CSS-like selectors. I think I like that approach best so far.

That sounds like an interesting approach.  Can you post a small example?  Does the code need to changed if signifiant change are made to the layout or can you use things like the HTML ID?


Chuck


--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.    
http://www.global-village.net/products/practical_webobjects








 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Finding WO people for startups (cult of the dead) (From: email@hidden)
 >Re: Finding WO people for startups (cult of the dead) (From: Chuck Hill <email@hidden>)
 >Re: Finding WO people for startups (cult of the dead) (From: email@hidden)
 >Re: Finding WO people for startups (cult of the dead) (From: Chuck Hill <email@hidden>)
 >Re: Finding WO people for startups (cult of the dead) (From: Simon <email@hidden>)
 >Re: Finding WO people for startups (cult of the dead) (From: Marius Soutier <email@hidden>)
 >Re: Finding WO people for startups (cult of the dead) (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: creating first framework
  • Next by Date: Re: creating first framework
  • Previous by thread: Re: Finding WO people for startups (cult of the dead)
  • Next by thread: Re: Finding WO people for startups (cult of the dead)
  • Index(es):
    • Date
    • Thread