Skip to content
Carter Page edited this page Jul 29, 2013 · 14 revisions

Download source code

$ git clone git://github.com/skyscreamer/yoga.git yoga
Cloning into yoga...
remote: Counting objects: 9504, done.
remote: Compressing objects: 100% (3132/3132), done.
remote: Total 9504 (delta 4519), reused 9270 (delta 4297)
Receiving objects: 100% (9504/9504), 1.52 MiB | 472 KiB/s, done.
Resolving deltas: 100% (4519/4519), done.

Install Maven artifacts

$ cd yoga
$ mvn install
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31.134s
[INFO] Finished at: Tue Aug 09 08:48:23 EDT 2011
[INFO] Final Memory: 15M/81M
[INFO] ------------------------------------------------------------------------

Start Spring MVC demo

$ cd yoga-demos/yoga-demo-springmvc/
$ mvn jetty:run
...
2011-08-09 08:49:57.117::INFO:  Started [email protected]:8080
[INFO] Started Jetty Server
[INFO] Starting scanner at interval of 10 seconds.

... or start the RESTEasy demo

$ cd yoga-demos/yoga-demo-resteasy/
$ mvn jetty:run

... or the Jersey/Spring demo

$ cd yoga-demos/yoga-demo-jersey-spring/
$ mvn jetty:run

... or the Jersey/Guice demo

$ cd yoga-demos/yoga-demo-jersey-guice/
$ mvn jetty:run

Try it out

Once the demo is started, load the home page in your web browser: http://localhost:8080/

Click around on some of the URLs to get an idea for how selectors control the data returned. Run the demo race to see a simulation of Yoga versus traditional REST navigation from a user perspective.