narendraraghu / ppt

0 stars 1 forks source link

2 #2

Open narendraraghu opened 8 years ago

narendraraghu commented 8 years ago

thymeleafintroduction-130331211935-phpapp02.pptx

narendraraghu commented 8 years ago

kj

narendraraghu commented 8 years ago

http://www.lordofthejars.com/2011/11/your-big-daddys-got-no-place-to-stay.html

http://www.stefanalexandru.com/

http://blog.zenika.com/2013/01/18/introducing-the-thymeleaf-template-engine/

http://www.njoshi.com/tag/thymeleaf/

https://www.toptal.com/spring/beginners-guide-to-mvc-with-spring-framework

  1. http://www.thymeleaf.org/doc/articles/standarddialect5minutes.html

  2. https://github.com/furkanzumrut/SpringThymeleafExample

  3. http://itutorial.thymeleaf.org/exercise/3

  4. http://spring.io/blog/2012/10/30/spring-mvc-from-jsp-and-tiles-to-thymeleaf/

  5. http://spring.io/blog/2012/10/30/spring-mvc-from-jsp-and-tiles-to-thymeleaf/

There are a few things that we can notice:

-This is an html file! You can actually preview it as a static file in your web browser. This feature is great for prototyping [1].

We are using a dedicated namespace in order to turn static html pages into dynamic views. All parts that require dynamic processing are prefixed with “th:”.

It’s simple to refer to the context path using ‘@{…}’. This is very easy to get wrong in plain JSPs [2].

${users} is resolved using Spring Expression Language. If I had a form, I would have used expressions such as *{user.name} to refer to form elements.

[1] We will not discuss prototyping any further in this article. However you can read this tutorial (http://www.thymeleaf.org/petclinic.html) if you would like to know more about it.

[2] In the first part of this article, when using , I had to use a relative path “../menu.jspx”. This will lead to a broken link on the day I’ll move my JSP file to a different folder.