Hello, I am wondering the best way to structure this within Tapestry 5 - I can see lots of ways, but i'm trying to consider the best way.
I have the requirement to make approximately 125 pages (or rather, 1 page with a possible 125 different sets of data). Each page is a short tutorial which has on it: - A description - An example of source code of something done badly - An example of the same piece of code improved. - A link to some documentation. There is already an existing Tapestry application running on the server, but I need to add these 125 tutorials. All of the information for each one is to be stored in text files, probably stored in src/main/webapp/tutorials, but I am not quite sure where exactly to put them yet. The next thing is that I would like to read the argument from the URL - this isn't a problem (e.g something.com/tutorials/?tutorial=ifstatements ). This means I don't need to make the 125 pages, but can use the passed param to find the correct data to show on the page. I've done this before and i'm fine with this part. So my main questions are: - How do I make it so that Tapestry will cache these text files to avoid reading them each and every time the page is loaded? One option I think is to use @Cached and to load all of the data in to some kind of list of tutorial objects. I can then pick the correct object from the list to show on the page. Or should I be doing this as a service? (http://tapestry.apache.org/defining-tapestry-ioc-services.html) - Is this worth doing? I would think the pages will be viewed fairly regularly. - is src/main/webapp/tutorials a sensible place to store them? - Should I be doing this totally differently? It's going to take me a while to write these pages, so I really don't want to have to do it again. Thanks - any suggestions are really appreciated. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org