On 4/3/07, <b class="gmail_sendername">David Koontz</b> <<a href="mailto:david@koontzfamily.org">david@koontzfamily.org</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
First off, I think masterview is wickedly awesome. I'm converted both<br>of my current projects over to it. Thank you Jeff for your presentation<br>at MountainWest Ruby Conf. I don't know why more buzz isn't being
<br>generated about masterview, I seem to be the only one here in Phoenix<br>really excited about it (that I know of).</blockquote><div><br><br>Thanks for the kind words David. I think it's just a new way of doing things and it takes time to get some traction (chicken and egg problem to some extent). There are a large number of Rails users who just won't go off of the pure Rails track either, even though they should since more and more things are going to be made available via plugins going forward.
<br><br>Thanks for taking the time to write up your ideas, its these things that will propell MasterView forward and improve some of the difficult areas. My problem is that it is hard for me to know what the difficult areas are for people, so I am thankful for you to take the time to write this up.
<br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">So with that said, I had a question on how people generally structure<br>their view directory. I ask this because of a couple of problems I've
<br>run into. Here's the situation. I have the xhtml given to me by our<br>designer. It of course does not follow rails conventions, doesn't have<br>a public directory where the images and css goes, etc. Just to test
<br>masterview and get it started I dropped the xhtml structure into views<br>and started adding directives. The problems I can see with this are<br>twofold. </blockquote><div><br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
A) if I ever need to turn on rhtml rendering it will be a<br>horrid mess, I would like to have a "generated" area that I can safely<br>blow away when I'm done needing to generate the rhtml. </blockquote><div>
<br><br>I agree. We need an easy way to allow users to generate the rhtml to a new safe area other than the main project. I think this might best be served by using a rake command. We already have one that invokes the generator, but in addition it should take an argument about where to generate the rhtml. This would allow you to generate the rhtml to a specified location without having to touch your config and not pollute the main directory.
<br><br>I think this will be an easy change. Would this meet your needs?<br><br>Alternatively one could have a different directory where all the MasterView source templates are stored (other than the normal location in app/views) and then we generate the rhtml into the normal app/views location. This could be accomplished by changing the config of where MasterView reads its files from, but a disadvantage is that new developers on the project would instinctively go to app/views and find the generated rhtml where they would edit things only to have it overwritten later. So this is an option too, but I think the enhancement to the rake command is a little better and safer.
<br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">B) The<br>stylesheet and image references, to work in both html design mode and
<br>rails rendering mode would have to be located in public which means the<br>designers either have to know how rails lays out its files or I have to<br>go and convert everything afterwards, neither of which sounds<br>appealing. So, my question is, can I have my html parked in a directory
<br>such as static and have masterview look there to get its source files<br>from? </blockquote><div><br><br>Yes, we can change the directory of where MasterView reads from using the config.template_src_dir_path = 'yourstatic/masterview/dir'
<br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Second, could that process include some sort of pre-processing<br>where certain directories are copied to their "real" home, say
<br>/static/images goes to /public/images and /static/final/css goes to<br>/public/stylesheets. You get the idea. I would be happy to help with<br>any of these changes as I think they would allow a nice separation<br>between design and development worlds. If I'm insane feel free to point
<br>that out as well.</blockquote><div><br><br>I like those ideas as well. That makes it much easier to start from an existing prototype without having to manually move things into the right places. Let the application do it for you. Great idea! One question, what should be the mechanism to configure this? Should one add these paths to the config settings or is there a better way? I don't know if we should just automatically look for files based on extensions?? Any ideas along these lines?
<br><br>I will add both (rake generate enhancement and auto copy assets) of these onto my TODO list. <br><br>Thanks for the input and ideas! <br><br>Jeff<br><br></div><br></div><br>