Excellent.. The best way I learn is by seeing sample code, and hearing from other users! Getting rid of ? is very easy, just use addPathInfo versus addQueryData and it handles it all for you.. It took me a bit to get used to ,'s as well in the path, but now it seems very natural...
When you said you are using apache and ajp? What is ajp.. My app has very little static code or images, so I have not bothered to tackle integrating apache or other webserver front ends... Eric -----Original Message----- From: Jeff Jones [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 12:59 PM To: Turbine Users List Subject: Re: AW: New site powered by turbine! > Looks great! My only question is why do you use the ? way of adding > parameters? Makes it harder for search engines to crawl you (most won't do > dynamic sites with a ? in the URL). Easy answer. I used the default TemplateLink's addQueryData() method in the .vm's, and didn't think about it. ;) Is it easy to switch over to the non ? way of querying? In general, I used very basic features as I ported, to get productive quickly. It's funny how the code evolved - the pages I wrote first are pretty ugly and don't really do things 'the turbine way', while the newer pages (mostly the admin screens), are more 'advanced'. They use more Action classes and Torque, while the first bunch use only Screen classes and raw SQL (cut and pasted directly from the ASP - yuk). I didn't use Flux, Intake, or the Security features at all. I even used printfs instead of Log4J in most places. My baby's still ugly, but it's much prettier than the old ASP. When I integrate our 3 user types, and after I get some actual new features rolled out (to justify all this work spent with no 'visible' changes to mgmt), I'll spend some time on that. I also need to tune performance and do some caching here and there, but right now the site runs on one box and is fast enough. I deployed it using ajp on apache with two tomcat instances under it, with the load balancing. I thought I might have bugs that could crash a JVM, so I ran 2 JVM's. No crashes yet. I did extend TemplateLink to add SSL link building support. This minimizes the need to redirect back and forth, and make it so templates don't have to know / care about / control SSL. VMTool uses a lookup to determine whether a page needs SSL or not. Currently that's set in TR.props, but eventually I'll put the secure page settings in the DB (and write an admin tool to modify it). There is also automatic redirect if someone hits an HTTPS page using HTTP, as a backup. The commas in the URL's were hard to swallow at first. But it's kinda unique (and more efficient) so I didn't use TemplateLinkWithSlash. Here's my FranchiseTemplateLink, just for fun (it's short). I had to declare my own template field because the one in TemplateLink is private. Notice in toString() I reset the TemplateLink back to the default security state, just as the querydata gets reset (oops, I think I just noticed that my code causes the querydata/pathinfo to get reset twice). :) It's so nice being off ASP. I have decent logging now, all of my Java toolbox, load balancing, and Apache's flexibility on the front end. Turbine is very sweet, especially when you start using the more advanced features (like actions not being stuck to the page the vm wants to go to, etc). I could go on for days. Jeff --- public class FranchiseTemplateLink extends TemplateLink implements ApplicationTool { /** the pathinfo key stored in the DynamicURI */ private static final String TEMPLATE_KEY = "template"; /** cache of the template name for getPage() */ private String template = null; protected void goSecure() { setServerScheme(DynamicURI.HTTPS); setServerPort(TurbineResources.getInt("server.secure.port", 443)); } protected void goInsecure() { setServerScheme(DynamicURI.HTTP); setServerPort(TurbineResources.getInt("server.insecure.port", 80)); } /** * Gets the template variable used by the Template Service. * It is only available after setPage() has been called. * * @return The template name. */ public String getPage() { return template; } /** * Sets the template variable used by the Template Service. * * @param t A String with the template name. * @return A TemplateLink. */ public TemplateLink setPage(String t) { template = t; addPathInfo(TEMPLATE_KEY,t); if(VMTool.needsSSLRedirect(data, t)) { if(data.getRequest().isSecure()) goInsecure(); else goSecure(); } return this; } public String toString() { String output = super.toString(); // This was added to allow multiple $link variables in one // template. removePathInfo(); removeQueryData(); // jjones: reset link to default setting if(data.getRequest().isSecure()) goSecure(); else goInsecure(); return output; } } ----- Original Message ----- From: "Eric Pugh" <[EMAIL PROTECTED]> To: "'Turbine Users List'" <[EMAIL PROTECTED]> Sent: Wednesday, June 12, 2002 5:35 AM Subject: RE: AW: New site powered by turbine! > Looks great! My only question is why do you use the ? way of adding > parameters? Makes it harder for search engines to crawl you (most won't do > dynamic sites with a ? in the URL). > > Eric > > -----Original Message----- > From: Jeff Jones [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 11, 2002 9:16 PM > To: Turbine Users List > Subject: Re: AW: New site powered by turbine! > > > Hello Turbine Group, > > We (franchise.com) just put up a new site based around turbine and torque a > couple weeks ago. > > Since we haven't had any major problems with it yet, I figure it's safe to > announce it to this list (that's not a challenge to crash it). :) > > We would be honored to have www.franchise.com listed on the 'powered by > turbine' page. > > The site was ported over from an ASP site. It currently runs on Linux, > Apache, and MSSQL. > > Take a look and let us know what you think! If you notice anything > un-Turbine-like about it, please clue me in (it's my first turbine app). > > Thanks, > Jeff Jones > [EMAIL PROTECTED] > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
