<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6555867709451033941</id><updated>2011-11-27T16:31:13.738-08:00</updated><category term='PHP'/><category term='Marketing'/><category term='Sales'/><category term='Indian Startups'/><category term='WebDesign'/><category term='Web2.0'/><category term='Project Management'/><category term='Internet'/><category term='Ruby on Rails'/><category term='Ajax'/><category term='Entrepreneurship'/><title type='text'>eTechTrix</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://etechtrix.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://etechtrix.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Parry</name><uri>http://www.blogger.com/profile/07780535252161172528</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6555867709451033941.post-2183947829847287933</id><published>2008-08-21T08:37:00.000-07:00</published><updated>2008-08-21T09:10:24.816-07:00</updated><title type='text'>How to get emails from your Yahoo! mail to your mobile?</title><content type='html'>Yahoo mail allows you to Setup Mail Forwards to any other e-mail like GMail,  mobee or something else. &lt;p&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;strong&gt;NOTE: &lt;/strong&gt;Yahoo mail does not have  the option of Forwarding a &lt;strong&gt;Copy of your &lt;/strong&gt;e-mail, essentially it  means that it will not store your e-mail if you setup a mail forward. It just  forwards the email and deletes it.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Refer to &lt;a href="http://help.yahoo.com/tutorials/mail/mail/mail_access5.html" target="_blank"&gt;Forwarding Yahoo! Mail&lt;/a&gt; on how to Forward a Yahoo mail to  another e-mail account.&lt;/p&gt; &lt;p&gt;Here are the Quick Steps!&lt;/p&gt; &lt;p&gt;Login to Yahoo! mail&lt;/p&gt; &lt;p&gt;Go to Options =&gt; POP Access and Forwarding&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_MALInLhVjS0/SK2TFjdYbrI/AAAAAAAAADE/eueo7lYovbw/s1600-h/image5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_MALInLhVjS0/SK2TFjdYbrI/AAAAAAAAADE/eueo7lYovbw/s400/image5.png" alt="" id="BLOGGER_PHOTO_ID_5237003665328860850" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;Enter the e-mail address to which you want to forward your yahoo mail. &lt;p&gt;You can give &lt;strong&gt;&lt;your mobile="" number=""&gt;your_mobile_number@mobee.in&lt;/your&gt;&lt;/strong&gt; here. If you are not registered yet, Get one it's free. Visit &lt;a href="http://mobee.in/"&gt;http://mobee.in&lt;/a&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Yahoo! doesn't seem to leave a copy of your  e-mail in Yahoo! if you setup a mail forward like this - so know what you are  doing!&lt;/span&gt;&lt;/p&gt; &lt;p&gt;There are other alternative ways of getting Yahoo mail on your mobile - just  follow the article below!&lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_MALInLhVjS0/SK2OWRo-mRI/AAAAAAAAAC0/jNiqOH413a4/s1600-h/image6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_MALInLhVjS0/SK2OWRo-mRI/AAAAAAAAAC0/jNiqOH413a4/s400/image6.png" alt="" id="BLOGGER_PHOTO_ID_5236998455045298450" border="0" /&gt;&lt;/a&gt;Your verification mail will be forwarded back to your e-mail that you have  registered on mobee - so that you can activate the forwards on Yahoo! &lt;p&gt;On Verificaiton - Yahoo! forwards all the e-mails to mobee e-mail, which u  can access it on ur mobile.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;span style="color: rgb(255, 0, 0);font-size:medium;" &gt;Is there any  alternative way to get my Yahoo! mails on mobile?&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;There are two ways you can do this:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;If you have an other web mail account (say Gmail) - you can do one of  the following:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1) Setup a mail forward in Yahoo! to your Gmail account - as  explained above&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;This will send all your Yahoo mails onto your Gmail account - you can easily  manage all your e-mails in Gmail with Labels &amp;amp; Filters.&lt;/p&gt; &lt;p&gt;Refer to &lt;a href="http://blog.mobee.in/2008/08/20/how-to-get-emails-from-gmail-to-your-mobile/"&gt;&lt;strong&gt;How  to get emails from Gmail to your mobile?&lt;/strong&gt;&lt;/a&gt; for more details on how to  do this.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2) Setup a mail fetcher in Gmail to fetch all your emails from other  mail accounts&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Read more on how to configure your Gmail mail fetcher in this article &lt;a title="http://mail.google.com/support/bin/answer.py?hl=en&amp;amp;ctx=mail&amp;amp;answer=21288" href="http://mail.google.com/support/bin/answer.py?hl=en&amp;amp;ctx=mail&amp;amp;answer=21288"&gt;http://mail.google.com/support/bin/answer.py?hl=en&amp;amp;ctx=mail&amp;amp;answer=21288&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_MALInLhVjS0/SK2PJrbQ6yI/AAAAAAAAAC8/_2Vrk5xssYo/s1600-h/image7.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_MALInLhVjS0/SK2PJrbQ6yI/AAAAAAAAAC8/_2Vrk5xssYo/s400/image7.png" alt="" id="BLOGGER_PHOTO_ID_5236999338140429090" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;Its quite easy! Once you configure this - Gmail will fetch all your e-mails  into your Gmail account. &lt;p&gt;From here you can follow the &lt;a href="http://blog.mobee.in/2008/08/20/how-to-get-emails-from-gmail-to-your-mobile/"&gt;&lt;strong&gt;How  to get emails from Gmail to your mobile?&lt;/strong&gt;&lt;/a&gt; to setup your mail  forwards to &lt;a title="mobee - Get all your e-mails on your mobile - Try for FREE!" href="http://mobee.in/"&gt;&lt;strong&gt;mobee&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&lt;a href="http://blog.mobee.in/tag/mobee-how-to" target="_blank"&gt;&lt;strong&gt;Refer  to mobee How-To articles&lt;/strong&gt;&lt;/a&gt; on how to control which e-mails you want  to receive on your mobile.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6555867709451033941-2183947829847287933?l=etechtrix.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/2183947829847287933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/2183947829847287933'/><link rel='alternate' type='text/html' href='http://etechtrix.blogspot.com/2008/08/how-to-get-emails-from-your-yahoo-mail.html' title='How to get emails from your Yahoo! mail to your mobile?'/><author><name>Parry</name><uri>http://www.blogger.com/profile/07780535252161172528</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_MALInLhVjS0/SK2TFjdYbrI/AAAAAAAAADE/eueo7lYovbw/s72-c/image5.png' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-6555867709451033941.post-2092336181023795388</id><published>2008-08-01T11:38:00.000-07:00</published><updated>2008-08-01T11:43:59.744-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Entrepreneurship'/><category scheme='http://www.blogger.com/atom/ns#' term='Web2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Indian Startups'/><title type='text'>10 Type of Startups You Should Never Join</title><content type='html'>&lt;div id="crosscol-wrapper" style="text-align: center;"&gt;  &lt;/div&gt; &lt;div id="main-wrapper"&gt; &lt;div class="main section" id="main"&gt;&lt;div class="widget Blog" id="Blog1"&gt; &lt;div class="blog-posts hfeed"&gt; &lt;!-- google_ad_section_start --&gt;  &lt;div class="post hentry"&gt; &lt;a name="8403082597833118284"&gt;&lt;/a&gt;   &lt;div class="post-body entry-content"&gt; &lt;span style="color: rgb(153, 153, 153);"&gt;Ref: http://venturevilla.blogspot.com/2008/07/10-type-of-startups-you-should-never.html&lt;/span&gt;&lt;br /&gt;A lot of us get fascinated by Startups and always relate startup with challenging work, open-culture, rewards,innovation and fast growth. But there are startups which somehow are not good to work with due to different reasons. There are some basic ingredients which are very much required for any good startup. I am highligthing 10 type of startups which are not worth exploring ( The idea here is not to criticize startups but to make entrepreneurs/job-seekers aware of various sensitive issues):&lt;br /&gt;&lt;br /&gt;1.&lt;span style="font-weight: bold;"&gt; Sharing " Not our Policy " &lt;/span&gt;- Some startups do have this kind of mentality. They think their idea and participation is the foremost and ultimate thing. This mentality is evident right from the beginning. Even during initial interaction these startups keep on asking thousands of question to you. But when you ask few questions,they become annoyed or decline to answer politely. Openness is one of the foremost rule of any business. Any startup is run by a set of people,and gauging their attitude and mind-set is very important. The people with wrong mindset won't share important details like revenues, sales target, available funding, growth-path etc. with you even at very advanced stage. Never-ever think of joining any such Startup. These people won't be fair with you during any stage of your engagement.&lt;br /&gt;&lt;br /&gt;2. &lt;span style="font-weight: bold;"&gt;We all are leaders, but can't pay for your tea &lt;/span&gt;: Few startups do have good people as founder members, but they can't take any decision. They look for others before taking final call over any matter. They believe in several rounds of discussion even for very small issues. Most of them don't have guts to face any adverse situation and failure. They believe that group-thinking is always required and hence take huge amount of time to solve petty issues. Successful Startups are known for their responsiveness and agility. The top-management is very fast at taking decisions and always don't require consent of whole group. There are few cheer-leaders who take decisions quickly, keeping in mind internal and external factors. These startups are typically very slow moving and you may not enjoy working there.&lt;br /&gt;&lt;br /&gt;3. &lt;span style="font-weight: bold;"&gt;We are the best, you can't compete&lt;/span&gt; : The founder members believe that they are best at doing everything. Anyone joining new will always be second to them. These people never trust others and always believe in doing work by themselves. Any startup which wants to grow faster should get good people and give them quality work. Any good founder should hire people who are smarter than him/her. The growth of any startup lies in the hand of every person associated with them directly or indirectly. Founder members should always groom future leaders within the company. Shared responsibilities and rewards would always help startup to scale-up faster. Any startup which gives less priority to meritocracy should be avoided without giving any second thought.&lt;br /&gt;&lt;br /&gt;4. &lt;span style="font-weight: bold;"&gt;Vision Statement is only for website&lt;/span&gt; : You should never join a startup which thinks that Vision Statement is just a statement. If founder members are not visionaries then definitely that is not the right place to work at. The passion of founders should be visible at various forums. They should work towards achieving higher growth and increasing value for every stakeholders. If the management is quite shaky about a lot of things, then you should be cautious.&lt;br /&gt;&lt;br /&gt;5. &lt;span style="font-weight: bold;"&gt;Employees are just resources &lt;/span&gt;: You should never join a startup which thinks that employees are just resources to get their work done. For anybody, decision to join a startup is quite difficult and hence startup should provide very healthy environment. Every employee should be given due attention and he should feel priviledged of being part of a great team. There should be sense of belonging and employees should be happy being part of small team.&lt;br /&gt;&lt;br /&gt;6&lt;span style="font-weight: bold;"&gt;. We don't follow any policy&lt;/span&gt; : If any startup boasts that they don't follow any internal policies and they are very flexible, then you should become cautious. Lack of policies creates confusion and dissatisfaction at later stages. After crossing very initial stage ( i.e. once team grows more than 10 people) startup should figure out and document internal policies. These policies helps in handling a lot of issues quite easily. Also this helps employees/prospective employees to understand company in better manner. Startup should not create a chaos internally after it gains critical mass.&lt;br /&gt;&lt;br /&gt;7. &lt;span style="font-weight: bold;"&gt;Just work for us, don't Think&lt;/span&gt; : A startup which restricts creative freedom should be avoided. Typically a lot of people join startups to learn lot of new things quickly. They also want to try out new things/ideas. Some of them want to own their startup at some point of time. If a startup is not providing enough learning opportunities then that is not the right place. Founders should promote innovation and internal ideas.&lt;br /&gt;&lt;br /&gt;8. &lt;span style="font-weight: bold;"&gt;You should not worry for money&lt;/span&gt; : A lot of startups tell their employees that they should not worry for money because the work is pretty good. This justification won't work for long-time and shows lack of validated revenue model. Any good business should make profits and should be shared with employees appropriately. In case company is not in a position to provide cash then it should be suitably compensated by stocks, profit-sharing etc. Any company spreading the message that they will pay less and won't compensate by other means should be avoided. This basically shows greediness of founding members.&lt;br /&gt;&lt;br /&gt;9. &lt;span style="font-weight: bold;"&gt;We are Unprofessionals&lt;/span&gt; : You should never join a startup which shows high level of unprofessionalism. They don't value time, their dressing sense is horrible, they don't care about their clients, they don't value commitments etc. These kind of people can't scale-up operations to the next level. In business, after crossing initial stage very high level of professionalism is required by each member.&lt;br /&gt;&lt;br /&gt;10. &lt;span style="font-weight: bold;"&gt;Accumulate money as much you want&lt;/span&gt; : If the founding members say that startups mean money and success only, then you should be cautious. If people at top are just showing rosy picture then definitely there is some serious problem. A lot of ventures become unsuccessful, but a falied startup also provides huge learning opportunities. &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6555867709451033941-2092336181023795388?l=etechtrix.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://etechtrix.blogspot.com/feeds/2092336181023795388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6555867709451033941&amp;postID=2092336181023795388' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/2092336181023795388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/2092336181023795388'/><link rel='alternate' type='text/html' href='http://etechtrix.blogspot.com/2008/08/10-type-of-startups-you-should-never.html' title='10 Type of Startups You Should Never Join'/><author><name>Parry</name><uri>http://www.blogger.com/profile/07780535252161172528</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6555867709451033941.post-1306697889992811834</id><published>2008-07-16T07:14:00.000-07:00</published><updated>2008-07-16T07:21:33.161-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WebDesign'/><category scheme='http://www.blogger.com/atom/ns#' term='Sales'/><title type='text'>Ten Ways To Improve Your Website Conversion Rate</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Ten Ways To Improve Your Website Conversion Rate&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What is a Conversion Rate?&lt;br /&gt;&lt;br /&gt;Your conversion rate is a measure of the number of potential customers that go on to buy. In the context of a website, it is usually the percentage of visitors that make a purchase. Many websites concentrate solely on increasing the number of visitors they have, when often they have fairly simple problems with their site that, if solved, would have a huge effect on their conversion rate and improve their site's bottom line at minimal expense.&lt;br /&gt;&lt;br /&gt;Improving a website conversion rate can be relatively simple. Here are 10 techniques for doing just that:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;10. Make The User's Life Easy&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let's start with something that sounds simple, but apparently is too complex for many companies to get right. The more difficult you make your web site to use, the less people will buy from you.&lt;br /&gt;&lt;br /&gt;A well designed website should aim to prevent nobody from buying - to allow 100% of the people who want to buy to do so. So where do they go wrong?&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Accessibility&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;      Making a site accessible is a legal obligation in many countries. Despite that, inaccessible websites are still being created. That can affect your sales, depending on how inaccessible you are, as visitors find the site impossible to use and go elsewhere (and end up recommending one of your competitors to their friends as well). A fairly typical inaccessible site could be losing 5% of potential sales because of this. (A really inaccessible website could even prevent search engines indexing it, giving a far higher amount of potential lost sales.)&lt;br /&gt;&lt;ul&gt;&lt;li&gt;    Browsers&lt;/li&gt;&lt;/ul&gt;      Many designers only pay attention to Internet Explorer. The justification for this is usually that 99% of the site's users use IE. It never seems to occur to the designers that perhaps the reason they have so few visitors with other browsers is that their site is fundamentally broken - it doesn't work in anything else. Percentages of people not using IE varies from site to site - over 60% of visitors to this site use an alternative browser, for example. The number most often quoted though, is that 80-85% of web users are using IE on Windows, which means that an average site that doesn't work in anything else could easily be losing 15-20% of sales.&lt;br /&gt;&lt;ul&gt;&lt;li&gt; Bold!&lt;/li&gt;&lt;/ul&gt;      What happens when a user decides to buy a product? They add it to a shopping basket. How do they add it? They click a button or link (usually a button). What happens when they can't see the button? They go elsewhere. There are some users who are still uncomfortable scrolling. Having things above the fold is still important. And yet there are still plenty of sites out there with buttons that are too subtle, or don't say the right thing, or are hidden away at the bottom of the page. "Add" is rubbish button text. "Buy" is ok. "Add xxx To Your Basket" is great. "Add xxx to Your Basket" in big letters on a big, bright button, near the top of the page, is even better. Calls to action, like this, don't have to be gaudy or tasteless, but they do have to be obvious and clear. Sites I have worked on where just the call to action was changed have reported anything from a 1% to 30% increase in sales as a result.&lt;br /&gt;&lt;ul&gt;&lt;li&gt; Usability&lt;/li&gt;&lt;/ul&gt;      If your potential customers want to find out more before they buy, can they? Is it obvious to the user where to go to find the technical specs on your products? Are they online at all? Are they in PDF format? Can users even find your products in the first place? This is probably the most common mistake I see on any website - a complete failure to think of what the user wants and needs, and how they might use a site. Plenty of sites have product pages with a photo and some sales patter - and nothing else. Anything from 1% to 99% of potential sales can be lost through poor usability.&lt;br /&gt;&lt;br /&gt;When you combine all of the problems above, it becomes fairly clear how easy it is to have a site perform poorly. Make your site accessible, make sure it is usable, make sure it works in common browsers, and make your calls to action clear and unambiguous, and you should be in a position to start converting the people who want to buy.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;9. Be Clear, Open and Honest&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you have a product out of stock, say so. Few things annoy users as much as reading all about a product they are after, adding it to a cart, and starting the checkout process - only to find out the product isn't actually available.&lt;br /&gt;&lt;br /&gt;The same applies to pricing - a user might spend $100 on a product, but when they find out the shipping is $100 on top of that, they are unlikely to continue the sale. Showing delivery pricing is tricky business, but not impossible. An Ip to Country database will allow you to work out where a user is from and show them a likely delivery cost, for example. If you can't do that, show delivery prices for the countries most appropriate to you - where your products are most often delivered, or for major world regions.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;8. Don't Waste Time&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;One of the biggest mistakes sites make is asking for too much information. Your conversion process may be sale, or it may be a request for information. Either way, don't waste the user's time asking for things you don't need to know. This is, of course, doubly important when it comes to asking for information the user deems private, and that they don't want to give out without good reason.&lt;br /&gt;&lt;br /&gt;You don't need to demand the user's email address before letting them download a PDF. You don't need their phone number when they fill out an email enquiry form. A user may not want to buy from you twice - so why make them create an account so they can buy again later before processing their first order? You can give the user the option to do all of these things by all means, but make sure it's not compulsory.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;7. Help The User Trust You&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Most people are still cautious when buying online, and rightly so. There are plenty of people you really shouldn't give your credit card information to! It's important to give the potential customer every reason to trust you.&lt;br /&gt;&lt;br /&gt;An address - bricks and mortar, not a P.O. Box - is a good start. A phone number, with people answering the phone, also helps. Showing a privacy policy and explaining shipping procedures clearly can also help the user to trust you. If you have a SSL certificate, show the "VeriSign Secured" logo to the user.&lt;br /&gt;&lt;br /&gt;Design and content also play a part in trust. A poor design gives off an unprofessional feeling. If a company can't afford a decent website, or won't spend the money on it, how can a user be sure their order will be treated with the importance it deserves? If content is inaccurate or badly written, the same applies - show that you take pride in what you do.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;6. Have a Clear Returns Policy&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Returns on the web are, and are likely to remain, a major issue for consumers. With a bricks and mortar shop, the customer knows where the shop is and that to return the product they simply have to go back there and explain the problem. With the web, this is more of an issue. This is especially true for clothing (where people cannot try things on before buying).&lt;br /&gt;&lt;br /&gt;Users are impressed with sites with a good returns policy and are more likely to buy from them. Have people phone for returns - they can then explain the problem to a real person, which is always a good first step. Free return shipping is usually a good option, if commercially viable. People don't like to pay to return things, especially if it is a mistake by the retailer. Finally, give the user plenty of time to return things. 28 days is fairly common, but if it takes you that long to deliver a product, what use is the return policy? 28 days from the date of delivery is better.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5. Keep the User Informed&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When somebody buys something online, they want to know when it's going to arrive at their door. People are impatient, after all. Giving them an estimated delivery date during the checkout process is a good start. Emailing them when their product is dispatched is great. Giving them a tracking number if using a delivery service that supports online tracking is even better. Keep the user informed at every step of the process, before and after sale, about as much as you can.&lt;br /&gt;&lt;br /&gt;How will this improve your conversion rate? Leaving the customer happy once they have made a sale means they are more likely to speak favourably about you later. They may even recommend you to their friends and within online communities. They are also far more likely to buy from you again.&lt;br /&gt;&lt;br /&gt;Think about it like this - if a salesman is doing their absolute best to help you, and to make your life easy, and answering your questions, you might buy what they were selling. If they completely ignored you after you'd bought from them, how would you feel about them? They might well have undone all the good work they put in, because once you'd completed your purchase they see no immediate value in you. A company that shows it cares about their customers, even after they've finished shopping, will make a user far happier and far more likely to return.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4. Offer Different Payment Options&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It might sound obvious, but you should offer the user a reasonable selection of methods of payment. Not everybody has a credit card, and those that do don't always want to use them. You don't have to accept cheques, but when deciding on payment methods, consider alternatives to the usual methods. Make the user's life easy and give them what they want.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. Improve the Value of Visitors&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;People that buy from you are doing so because they like what it is they see. If a user adds a product to a basket, show them other things they might like as well. If they are viewing a product, the same applies - show them similar items. While they might not buy the product they first saw, other similar ones may not have issues that put them off the first. Upselling and cross-selling are tried and tested sales techniques, and there is no reason not to use them on the web.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. Be Memorable&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A good site will include information. A poor one is just an online catalogue. Information (articles, advice, reviews and so on) all help the user early in their buying process. Users start with research online, just as they do offline. If you can make contact with the user at that stage of their process, and give a favourable impression, there is a good chance that they will come back and buy from you when they finally decide to make a purchase.&lt;br /&gt;&lt;br /&gt;Being memorable, and making sure you stick in the user's mind, is dependant on a lot of factors. You must have a USP (see the next point), and branding is important (no good if your visitors remember why you are great but don't remember your name), as well as the quality of your site and information.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. Know Your USP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Finally, the most important point of all - your Unique Selling Point (USP). Your USP is what sets you apart from your competition. If a visitor goes to several sites looking for a product, why would they decide to buy from you instead of somewhere else?&lt;br /&gt;&lt;br /&gt;Many companies do not know their USP. Almost all companies have one, but not all of them are aware of it. If you are a family run business, that's a potential USP. Great customer service, low prices, products that can't be bought elsewhere, free delivery, great support - all of these are USPs. Tell your users what yours is. Shout it from the proverbial rooftops.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6555867709451033941-1306697889992811834?l=etechtrix.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://etechtrix.blogspot.com/feeds/1306697889992811834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6555867709451033941&amp;postID=1306697889992811834' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/1306697889992811834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/1306697889992811834'/><link rel='alternate' type='text/html' href='http://etechtrix.blogspot.com/2008/07/ten-ways-to-improve-your-website.html' title='Ten Ways To Improve Your Website Conversion Rate'/><author><name>Parry</name><uri>http://www.blogger.com/profile/07780535252161172528</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6555867709451033941.post-4451182293826054156</id><published>2008-03-10T22:44:00.000-07:00</published><updated>2008-03-10T22:46:25.388-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby on Rails'/><title type='text'>Rails: "Remember Me" Login Code</title><content type='html'>&lt;h2 class="title"&gt;     Auto-login&lt;span class="comment_count"&gt;&lt;/span&gt;   &lt;/h2&gt;    &lt;p style="color: rgb(153, 153, 153);" class="author"&gt;     Posted by &lt;cite&gt;Daniel Wanja&lt;/cite&gt;     &lt;abbr class="published" title="2006-02-18T13:41:00+00:00"&gt;&lt;span class="typo_date" title="Sat, 18 Feb 2006 13:41:00 GMT"&gt;on Saturday, February 18, 2006&lt;/span&gt;&lt;/abbr&gt;   &lt;/p&gt;    &lt;div class="content"&gt;     &lt;p&gt;One of my midnight Rails projects is a “time tracking” application for which I needed auto-login. You know, the “Remember me” check box so that you don’t have to login each time you visit the application. I found a nice article written by Matt McCray describing how this was implemented for TaskThis.com at http://www.mattmccray.com/archives/category/software/rails/taskthis/. Even further he provides the full source code for the application. I didn’t take directly his auto_login.rb module but was greatly inspired by it. I also used the &lt;em&gt;Login Engine Plugin&lt;/em&gt; that was not providing this feature, maybe this changed, so it could be simpler, but how simple implementing the auto-login can be. Note these are not the full classes just pertinent code extracts.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;1. Remember me&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;When the user login and checks the “Remember me” checkbox, the :save_login parameter is set, the User instance remember_me method invoked and the :auth_token cookie set.&lt;/p&gt;   &lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby"&gt;&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;AccountController&lt;/span&gt; &lt;span class="punct"&gt;&lt;&lt;/span&gt; &lt;span class="constant"&gt;ApplicationController&lt;/span&gt;&lt;br /&gt; &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;login&lt;/span&gt;&lt;br /&gt;   &lt;span class="keyword"&gt;case&lt;/span&gt; &lt;span class="attribute"&gt;@request&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;method&lt;/span&gt;&lt;br /&gt;     &lt;span class="keyword"&gt;when&lt;/span&gt; &lt;span class="symbol"&gt;:post&lt;/span&gt;&lt;br /&gt;     &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="attribute"&gt;@session&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:user&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;User&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;authenticate&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="attribute"&gt;@params&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:user_login&lt;/span&gt;&lt;span class="punct"&gt;],&lt;/span&gt; &lt;span class="attribute"&gt;@params&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:user_password&lt;/span&gt;&lt;span class="punct"&gt;])&lt;/span&gt;&lt;br /&gt;       &lt;span class="ident"&gt;flash&lt;/span&gt;&lt;span class="punct"&gt;['&lt;/span&gt;&lt;span class="string"&gt;notice&lt;/span&gt;&lt;span class="punct"&gt;']&lt;/span&gt;  &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;"&lt;/span&gt;&lt;span class="string"&gt;Login successful&lt;/span&gt;&lt;span class="punct"&gt;"&lt;/span&gt;&lt;br /&gt;       &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="attribute"&gt;@params&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:save_login&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt; &lt;span class="punct"&gt;==&lt;/span&gt; &lt;span class="punct"&gt;"&lt;/span&gt;&lt;span class="string"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;"&lt;/span&gt;&lt;br /&gt;         &lt;span class="attribute"&gt;@session&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:user&lt;/span&gt;&lt;span class="punct"&gt;].&lt;/span&gt;&lt;span class="ident"&gt;remember_me&lt;/span&gt;&lt;br /&gt;         &lt;span class="ident"&gt;cookies&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:auth_token&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;{&lt;/span&gt; &lt;span class="symbol"&gt;:value&lt;/span&gt; &lt;span class="punct"&gt;=&gt;&lt;/span&gt; &lt;span class="attribute"&gt;@session&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:user&lt;/span&gt;&lt;span class="punct"&gt;].&lt;/span&gt;&lt;span class="ident"&gt;remember_token&lt;/span&gt; &lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:expires&lt;/span&gt; &lt;span class="punct"&gt;=&gt;&lt;/span&gt; &lt;span class="attribute"&gt;@session&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:user&lt;/span&gt;&lt;span class="punct"&gt;].&lt;/span&gt;&lt;span class="ident"&gt;remember_token_expires&lt;/span&gt; &lt;span class="punct"&gt;}&lt;/span&gt;&lt;br /&gt;       &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;       &lt;span class="ident"&gt;redirect_back_or_default&lt;/span&gt; &lt;span class="symbol"&gt;:controller&lt;/span&gt; &lt;span class="punct"&gt;=&gt;&lt;/span&gt; &lt;span class="punct"&gt;"&lt;/span&gt;&lt;span class="string"&gt;time&lt;/span&gt;&lt;span class="punct"&gt;"&lt;/span&gt;&lt;br /&gt;     &lt;span class="keyword"&gt;else&lt;/span&gt;&lt;br /&gt;       &lt;span class="ident"&gt;flash&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;now&lt;/span&gt;&lt;span class="punct"&gt;['&lt;/span&gt;&lt;span class="string"&gt;notice&lt;/span&gt;&lt;span class="punct"&gt;']&lt;/span&gt;  &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;"&lt;/span&gt;&lt;span class="string"&gt;Login unsuccessful&lt;/span&gt;&lt;span class="punct"&gt;"&lt;/span&gt;&lt;br /&gt;       &lt;span class="attribute"&gt;@login&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="attribute"&gt;@params&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:user_login&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt;&lt;br /&gt;     &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;   &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt; &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;logout&lt;/span&gt;&lt;br /&gt;   &lt;span class="attribute"&gt;@session&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:user&lt;/span&gt;&lt;span class="punct"&gt;].&lt;/span&gt;&lt;span class="ident"&gt;forget_me&lt;/span&gt; &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="attribute"&gt;@session&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:user&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt;&lt;br /&gt;   &lt;span class="attribute"&gt;@session&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:user&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;nil&lt;/span&gt;&lt;br /&gt;   &lt;span class="ident"&gt;cookies&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;delete&lt;/span&gt; &lt;span class="symbol"&gt;:auth_token&lt;/span&gt;&lt;br /&gt; &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;   &lt;p&gt;&lt;strong&gt;2. login_from_cookie&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;The next time the user visits the website the “login_from_cookie” filter is triggered. This method checks that the user is not logged in and that the :auth_token cookie is set. If that’s the case the user matching the :auth_token is searched and the token_expiration verified the the user is automatically logged in. Et voila! I guess auto_login would be more appropriate as method name.&lt;/p&gt;   &lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby"&gt;&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;ApplicationController&lt;/span&gt; &lt;span class="punct"&gt;&lt;&lt;/span&gt; &lt;span class="constant"&gt;ActionController&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Base&lt;/span&gt;&lt;br /&gt;  &lt;span class="ident"&gt;before_filter&lt;/span&gt; &lt;span class="symbol"&gt;:login_from_cookie&lt;/span&gt;&lt;br /&gt;  &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;login_from_cookie&lt;/span&gt;&lt;br /&gt;     &lt;span class="keyword"&gt;return&lt;/span&gt; &lt;span class="keyword"&gt;unless&lt;/span&gt; &lt;span class="ident"&gt;cookies&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:auth_token&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt; &lt;span class="punct"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="attribute"&gt;@session&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:user&lt;/span&gt;&lt;span class="punct"&gt;].&lt;/span&gt;&lt;span class="ident"&gt;nil?&lt;/span&gt;&lt;br /&gt;     &lt;span class="ident"&gt;user&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;User&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;find_by_remember_token&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;cookies&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:auth_token&lt;/span&gt;&lt;span class="punct"&gt;])&lt;/span&gt;&lt;br /&gt;     &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="ident"&gt;user&lt;/span&gt; &lt;span class="punct"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="punct"&gt;!&lt;/span&gt;&lt;span class="ident"&gt;user&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;remember_token_expires&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;nil?&lt;/span&gt; &lt;span class="punct"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="constant"&gt;Time&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;now&lt;/span&gt; &lt;span class="punct"&gt;&lt;&lt;/span&gt; &lt;span class="ident"&gt;user&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;remember_token_expires&lt;/span&gt;&lt;br /&gt;        &lt;span class="attribute"&gt;@session&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:user&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;user&lt;/span&gt;&lt;br /&gt;     &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;  &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;   &lt;p&gt;&lt;strong&gt;3. the User class&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;The User class has two methods to set and remove the token from the database. It’s pretty secure as from the token the user cannot be identified without having the salt, the email, and the token expiration, which is most unlikely to be recreated. It could be even more secure by just encrypting some random unique identifier. The only issue I encountered was that the user class always forces the password validation and encryption when saving. For now I just bypass validation and encryption when setting and clearing the remember_me token.&lt;/p&gt;   &lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby"&gt;&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;User&lt;/span&gt; &lt;span class="punct"&gt;&lt;&lt;/span&gt; &lt;span class="constant"&gt;ActiveRecord&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Base&lt;/span&gt;&lt;br /&gt; &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;remember_me&lt;/span&gt;&lt;br /&gt;   &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;remember_token_expires&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="number"&gt;2&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;weeks&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;from_now&lt;/span&gt;&lt;br /&gt;   &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;remember_token&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Digest&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;SHA1&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;hexdigest&lt;/span&gt;&lt;span class="punct"&gt;("&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="expr"&gt;#{salt}&lt;/span&gt;--&lt;span class="expr"&gt;#{self.email}&lt;/span&gt;--&lt;span class="expr"&gt;#{self.remember_token_expires}&lt;/span&gt;&lt;/span&gt;&lt;span class="punct"&gt;")&lt;/span&gt;&lt;br /&gt;   &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;password&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;"&lt;/span&gt;&lt;span class="string"&gt;&lt;/span&gt;&lt;span class="punct"&gt;"&lt;/span&gt;  &lt;span class="comment"&gt;# This bypasses password encryption, thus leaving password intact&lt;/span&gt;&lt;br /&gt;   &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;save_with_validation&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="constant"&gt;false&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;forget_me&lt;/span&gt;&lt;br /&gt;   &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;remember_token_expires&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;nil&lt;/span&gt;&lt;br /&gt;   &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;remember_token&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;nil&lt;/span&gt;&lt;br /&gt;   &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;password&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;"&lt;/span&gt;&lt;span class="string"&gt;&lt;/span&gt;&lt;span class="punct"&gt;"&lt;/span&gt;  &lt;span class="comment"&gt;# This bypasses password encryption, thus leaving password intact&lt;/span&gt;&lt;br /&gt;   &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;save_with_validation&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="constant"&gt;false&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;&lt;br /&gt; &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;           &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6555867709451033941-4451182293826054156?l=etechtrix.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://etechtrix.blogspot.com/feeds/4451182293826054156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6555867709451033941&amp;postID=4451182293826054156' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/4451182293826054156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/4451182293826054156'/><link rel='alternate' type='text/html' href='http://etechtrix.blogspot.com/2008/03/rails-remember-me-login-code.html' title='Rails: &quot;Remember Me&quot; Login Code'/><author><name>Parry</name><uri>http://www.blogger.com/profile/07780535252161172528</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6555867709451033941.post-451884464084706180</id><published>2008-03-08T04:39:00.001-08:00</published><updated>2008-03-08T04:40:30.129-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>PHP Akelos: PHP on Rails!</title><content type='html'>&lt;p&gt;A new PHP based framework offers the benefits of "&lt;a href="http://www.rubyonrails.org/"&gt;Ruby on Rails&lt;/a&gt;" to PHP developers. Checkout their own &lt;a href="http://www.akelos.org/screencasts"&gt;version&lt;/a&gt; of the famous RoR "Creating a blog in 15 minutes" screencast by DHH, using the Akelos PHP Framework.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;blockquote&gt;"Akelos is a PHP framework for developing database-backed web applications according to the Model-View-Controller pattern (MVC). From the Ajax in the view, to the request and response in the controller, to the domain model wrapping the database the Akelos PHP Framework gives you a pure-PHP development environment built upon programming best practices. To go live, all you need to add is a database and a web server.&lt;br /&gt;Who is the Akelos PHP Framework for?&lt;br /&gt;&lt;br /&gt;   * PHP developers who want to enjoy writing web applications.&lt;br /&gt;   * Ruby on Rails developers who need to code in PHP.&lt;br /&gt;   * Developers who want to distribute their work to the mass market of cheap shared hosting.&lt;br /&gt;   * Developers who need to write multilingual web applications.&lt;br /&gt;&lt;br /&gt;Being port of Ruby on Rails to PHP Akelos is also optimized for programmer happiness and sustainable productivity. It lets you write beautiful PHP Code by favoring convention over configuration."&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;site: &lt;a href="http://www.akelos.org/"&gt;http://www.akelos.org&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6555867709451033941-451884464084706180?l=etechtrix.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://etechtrix.blogspot.com/feeds/451884464084706180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6555867709451033941&amp;postID=451884464084706180' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/451884464084706180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/451884464084706180'/><link rel='alternate' type='text/html' href='http://etechtrix.blogspot.com/2008/03/php-akelos-php-on-rails.html' title='PHP Akelos: PHP on Rails!'/><author><name>Parry</name><uri>http://www.blogger.com/profile/07780535252161172528</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6555867709451033941.post-8446537115893850302</id><published>2007-12-27T00:05:00.000-08:00</published><updated>2007-12-27T00:11:11.523-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby on Rails'/><title type='text'>Rails Best Practices, Tips and Tricks</title><content type='html'>(Source: http://glu.ttono.us/articles/2006/02/06/rails-best-practices-tips-and-tricks)&lt;br /&gt;Posted by kev   &lt;span class="typo_date" title="Tue, 07 Feb 2006 01:32:00 GMT"&gt;on Tuesday, February 07, 2006&lt;br /&gt;&lt;/span&gt;&lt;p&gt;Last month i joined company Bitla Softwares (www.bitlasoft.com). The work is exciting (all Rails) and the team is excellent. My favourite time-pass at office is digging up tricks in Rails. Found an excellent article, so thought of posting at my etechtrix just for me and U ofcourse!&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Because Rails is a young framework, I thought it would be helpful to write up what I consider best practices when coding with it both for my new coworkers and the web at large. Here’s my current draft. Feel free to critique and comment. I’m very open to suggestions.&lt;/p&gt;&lt;h3&gt;Testing&lt;/h3&gt;  &lt;p&gt;This is &lt;strong&gt;absolutely essential&lt;/strong&gt;. Rails makes writing unit and functional tests incredibly easy and testing should be employed at all times. Positive and negative testing should be employed: the first to verify that the application does what it is supposed to when the proper variables are passed to the correct action and then second to verify that when incorrect variables are passed the prefered behavior occurs.&lt;/p&gt;  &lt;h4&gt;Unit Testing&lt;/h4&gt;  &lt;p&gt;As a general rule, unit testing should test any validation in models as well as any added methods in those models. &lt;/p&gt;  &lt;p&gt;For example, if I have a &lt;code&gt;User&lt;/code&gt; model which &lt;code&gt;validates_presence_of&lt;/code&gt; first_name and last_name fields as well as a method &lt;code&gt;fullname&lt;/code&gt; which combines the two, I might have test cases &lt;code&gt;test_validates_names&lt;/code&gt; and &lt;code&gt;test_fullname&lt;/code&gt; which would test that the model worked as it was intended to.&lt;/p&gt;  &lt;h4&gt;Functional Testing&lt;/h4&gt;  &lt;p&gt;Functional testing is used to test controllers. As a rule, there should be atleast one testcase for each action and positive and negative testing should be employed. This means that if I have an action &lt;code&gt;create&lt;/code&gt; in my &lt;code&gt;PostsController&lt;/code&gt; then there should be  &lt;code&gt;test_create&lt;/code&gt; and &lt;code&gt;test_bad_create&lt;/code&gt; methods defined in my functional tests which do positive and negative testing. This does not mean there should be only two tests for each action. If there are exceptional cases beyond a simple good and bad, proper testing should cover those cases.&lt;/p&gt;  &lt;h4&gt;Helpful Reading&lt;/h4&gt;  &lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;a href="http://manuals.rubyonrails.com/read/book/5"&gt;A Guide To Testing The Rails&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Agile Web Development With Rails Chapter 12&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;h3&gt;Migrations&lt;/h3&gt;  &lt;p&gt;Migrations mean never having to say you’re sorry because you nuked the database. They allow for database agnostic schemas which means you can develop locally on SQLite and deploy on MySQL without a problem. They’re cleaner (and easier) than writing your own schemas custom and should be used whenever possible.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;NEVER EVER EVER modify schema.rb. It is a reflection of the database. Migrations should be used to move this forward. If you don’t use migrations and instead modify schema.rb, things will break and people will be unhappy.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Note&lt;/em&gt;: You should always run svn update before generating a migration so you don’t have prefix collisions (two number 4s for example).&lt;/p&gt;  &lt;h4&gt;Helpful Reading&lt;/h4&gt;  &lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;a href="http://glu.ttono.us/articles/2005/10/27/the-joy-of-migrations"&gt;The Joy of Migrations&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;a href="http://jamis.jamisbuck.org/articles/2005/09/27/getting-started-with-activerecord-migrations"&gt;Getting Started With ActiveRecord Migrations&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;h3&gt;SQLite&lt;/h3&gt;  &lt;p&gt;SQLite is an SQL engine which runs in a single file rather than a server. It is (in general) as fast or faster than MySQL and is excellent for development and testing. In fact, it is possible to run a database completely out of memory which speeds up tests significantly. With the advent of migrations, it makes sense to use SQLite for testing as there is no extra work to deploy on MySQL.&lt;/p&gt;  &lt;h3&gt;DRY: Don’t Repeat Yourself&lt;/h3&gt;  &lt;p&gt;The main idea of DRY is that if code which is repeated is extracted to a helper or function, you only have one place to look for (and edit) your code if and when something goes wrong. If you find that similar code is used in several places, you may want to look into extracting that code to a helper function or partial.&lt;/p&gt;  &lt;h4&gt;Helpful Reading&lt;/h4&gt;  &lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;a href="http://api.rubyonrails.org/classes/ActionController/Base.html#M000178"&gt;Rendering partials in the Rails API&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Refactoring by Martin Fowler&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;h3&gt;Naming Conventions&lt;/h3&gt;  &lt;p&gt;Don’t use abbreviations, especially in database column names. It should be immediately obvious what the column is for (or atleast what the name means) when looking at the name. These are not the days of C, we don’t need to conserve space with our variable names. Additionally, Rails error handling automatically knows how to “humanize” column names, so when you use a well described name you get to work less on outputting errors.&lt;/p&gt;  &lt;p&gt;If names are too long, try to think of another word or phrase that means the same thing, but is immediately obvious.&lt;/p&gt;  &lt;h3&gt;Source Control (Subversion)&lt;/h3&gt;  &lt;p&gt;Some sort of source control should be used at all times. This allows for easy roll back if something goes wrong as well as the ability to refer back to old code if needed. Rails has certain files which should not be included in a source control repository, so please refer to the &lt;a href="http://wiki.rubyonrails.org/rails/pages/HowtoUseRailsWithSubversion"&gt;wiki page&lt;/a&gt; when preparing the initial import.&lt;/p&gt;  &lt;h4&gt;Helpful Reading&lt;/h4&gt;  &lt;ul&gt;&lt;li&gt;&lt;a href="http://wiki.rubyonrails.org/rails/pages/HowtoUseRailsWithSubversion"&gt;How To Use Rails With Subversion&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;h3&gt;Authentication Systems&lt;/h3&gt;  &lt;p&gt;Several authentication modules have been written for Rails, but some are better at some things and some are better than others.&lt;/p&gt;  &lt;h4&gt;acts_as_authenticated&lt;/h4&gt;  &lt;p&gt;This should be the prefered authentication plugin. It is easily installed via &lt;code&gt;script/plugin&lt;/code&gt;, is easily extendible and can handle all issues of the other authentication modules. Additionally, the testing code is excellent which makes it easy to modify.&lt;/p&gt;  &lt;h4&gt;login_generator&lt;/h4&gt;  &lt;p&gt;&lt;code&gt;login_generator&lt;/code&gt; is the original login generator gem written by Tobias Luetke. The downside is that there is a bug which scrambles the password if you save an already existing user. It should not be used for this reason. It is replaced and superceded by acts_as_authenticated.&lt;/p&gt;  &lt;h4&gt;SaltedHashLoginGenerator&lt;/h4&gt;  &lt;p&gt;This was a first attempt at created a salted login generator which could reset passwords and do activation. It has since been extracted into login_engine. It is in general bloated and hard to modify. It should be avoided.&lt;/p&gt;  &lt;h4&gt;login_engine&lt;/h4&gt;  &lt;p&gt;login_engine is the extraction of SaltedHashLoginGenerator, and as such, has the disadvantages that SaltedHash has. Additionally, it uses the Rails Engines system which is designed for drop in use. In general, applications need customization. If you need more than simple modification of an authentication system, this should be avoided.&lt;/p&gt;  &lt;h3&gt;On Scaffolding&lt;/h3&gt;  &lt;p&gt;Scaffolding can be a time saver or a crutch. When using scaffolding, make sure to understand exactly what the code is doing and why. Once that happens you can generally write the code faster without using scaffolding as there are almost always changes to each section that scaffolding provides.&lt;/p&gt;  &lt;h3&gt;Suggested Reading (in General)&lt;/h3&gt;  &lt;ul&gt;&lt;li&gt;&lt;p&gt;The Pragmatic Programmer by Dave Thomas and Andy Hunt&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Refactoring by Martin Fowler&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Agile Web Development with Rails by Dave Thomas and David Heinemeier Hannson&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Programming Ruby by Dave Thomas, with Chad Fowler and Andy Hunt&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6555867709451033941-8446537115893850302?l=etechtrix.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://etechtrix.blogspot.com/feeds/8446537115893850302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6555867709451033941&amp;postID=8446537115893850302' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/8446537115893850302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/8446537115893850302'/><link rel='alternate' type='text/html' href='http://etechtrix.blogspot.com/2007/12/rails-best-practices-tips-and-tricks.html' title='Rails Best Practices, Tips and Tricks'/><author><name>Parry</name><uri>http://www.blogger.com/profile/07780535252161172528</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6555867709451033941.post-1687668441320980755</id><published>2007-12-26T23:23:00.000-08:00</published><updated>2007-12-26T23:44:42.540-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby on Rails'/><title type='text'>Rails for Designers</title><content type='html'>&lt;span style="font-style: italic;"&gt;(Source: http://glu.ttono.us/articles/2006/03/21/rails-for-designers) &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Posted by kev   &lt;span class="typo_date" title="Tue, 21 Mar 2006 21:57:00 GMT"&gt;on Wednesday, March 22, 2006&lt;/span&gt;&lt;/span&gt;  &lt;p&gt;This is for designers who are going to be working with Rails and is intended to give them a good starting point to jump into work with a Rails developer. This is all introductory material. As such, I cover some basics (MVC, locations of files) and move from there to a code example and more advanced topics (partials, ActionView helpers).&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: If there are other things people think I should cover, feel free to leave comments and I’ll do a follow up article.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Update #2&lt;/strong&gt;: If you liked the article, &lt;a href="http://digg.com/design/Rails_for_Designers"&gt;digg it&lt;/a&gt;!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Update #Again&lt;/strong&gt;: Marcel Molina (Jr) of the core team notes that &lt;code&gt;yield&lt;/code&gt; is prefered to &lt;code&gt;@content_for_layout&lt;/code&gt; when creating layouts, so I’ve updated my examples.&lt;/p&gt;&lt;h3&gt;Views and ‘MVC’&lt;/h3&gt;  &lt;p&gt;MVC stands for “Model, View, Controller” and is a way to separate what the user sees from what happens behind the scenes.&lt;/p&gt;  &lt;h4&gt;View: The front-end&lt;/h4&gt;  &lt;p&gt;View is the section which controls what things look like when they render. What this means for you, the designer, is that you don’t have to fiddle through large blocks of programming logic which get in the way of your markup.&lt;/p&gt;  &lt;h4&gt;Controller: Programming logic&lt;/h4&gt;  &lt;p&gt;Controllers are where the actual processing code goes. This is where the variables that might be used in the view (&lt;code&gt;@which @usually @look @like @this&lt;/code&gt;) will be set.&lt;/p&gt;  &lt;h4&gt;Model: Business logic and the database&lt;/h4&gt;  &lt;p&gt;The model deals with database and business logic and should never touch the front end.&lt;/p&gt;  &lt;h3&gt;Your friends, the views and public directories&lt;/h3&gt;  &lt;p&gt;One of the great things about Rails development is that you always know where something belongs. For designers, your code belongs either in &lt;code&gt;app/views&lt;/code&gt; or in &lt;code&gt;public/&lt;/code&gt;.&lt;/p&gt;  &lt;h4&gt;The &lt;code&gt;views&lt;/code&gt; directory and dissecting URLs&lt;/h4&gt;  &lt;p&gt;The basic form of an URL in *Rails is &lt;code&gt;http://yourhost/controller/action/id&lt;/code&gt;. The action corresponds to what view you will be rendering by default in the &lt;code&gt;app/views/&lt;/code&gt; directory.&lt;/p&gt;  &lt;p style=""&gt;&lt;img src="http://thar.be/url_breakdown.png" alt="URL Breakdown" /&gt;&lt;/p&gt;  &lt;p&gt;So, for example, let’s say that you’re working on a social networking site and you’ve got an URL which looks like &lt;code&gt;http://www.example.com/friends/show/1&lt;/code&gt;. This breaks down to the &lt;code&gt;app/views/friends&lt;/code&gt; directory and the **&lt;code&gt;show.rhtml&lt;/code&gt; file inside of it. &lt;/p&gt;  &lt;p&gt;We’ll go over what happens in an rhtml file shortly, but first I’d like to cover the &lt;code&gt;app/views/layouts/&lt;/code&gt; directory.&lt;/p&gt;  &lt;p&gt;&lt;small&gt;* If this is not the case, it is because your developer is using something called Routes. Just ask them where the file you’re looking for is located in this instance.&lt;/small&gt;&lt;/p&gt;  &lt;p&gt;&lt;small&gt;** Again, this might be &lt;code&gt;show.xml&lt;/code&gt; or &lt;code&gt;show.rjs&lt;/code&gt; or something else if your developer is doing something special. Ask them about it if this is the case.&lt;/small&gt;&lt;/p&gt;  &lt;h4&gt;Layouts: Templates in disguise&lt;/h4&gt;  &lt;p&gt;Basically, layouts are templates. If you think about what happens in a basic site, you’ve got a header, footer and content somewhere in the center. The content comes from your view and all the surrounding stuff that might be page dependent (but can probably be reused) is part of the layout.&lt;/p&gt;  &lt;p style=""&gt;&lt;img src="http://thar.be/layout_vs_content.png" alt="Layout Diagram" /&gt;&lt;/p&gt;  &lt;p&gt;By default, a layout named the same as the controller is used. In our example above, the controller is &lt;code&gt;friends&lt;/code&gt;, so a file &lt;code&gt;app/views/layouts/friends.rhtml&lt;/code&gt; will be used for any URL like &lt;code&gt;http://my.host/friends/anything&lt;/code&gt;. Additionally, if you create a &lt;code&gt;app/views/layouts/application.rhtml&lt;/code&gt; file, it will be used by default if there isn’t a file named the same as the controller. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Do note&lt;/strong&gt; that your developer can tell the view to render a template different from the default any time he wishes, so if you don’t want to be restricted to one layout per &lt;code&gt;app/views/&lt;/code&gt; subdirectory or controller you can create multiple layouts and the developer can explicitly define which is used. &lt;/p&gt;  &lt;h4&gt;Ok, so how do I get my view code to render in layouts?&lt;/h4&gt;  &lt;p&gt;Wherever you’d like the code from your view to go, place this bit of code &lt;code&gt;&lt;%= yield %&gt;&lt;/code&gt;. You might also see &lt;code&gt;&lt;%= @content_for_layout %&gt;&lt;/code&gt;, which does the same thing.&lt;/p&gt;  &lt;p&gt;Note that &lt;code&gt;&lt;%&lt;/code&gt; or &lt;code&gt;&lt;%=&lt;/code&gt; starts Embedded Ruby (ERb) code and &lt;code&gt;%&gt;&lt;/code&gt; ends it. The difference between the two is that &lt;code&gt;&lt;%=&lt;/code&gt; outputs the result of what happens inside the ERb tags (just like &lt;code&gt; or &lt;code&gt; in PHP).&lt;/code&gt;&lt;/code&gt;&lt;/p&gt;  &lt;h4&gt;The &lt;code&gt;public&lt;/code&gt; directory&lt;/h4&gt;  &lt;p&gt;The &lt;code&gt;app/public&lt;/code&gt; directory directly links to the root directory of your application. This is where you can place images, stylesheets and javascript. In fact, Rails already creates directories for these purposes at &lt;code&gt;app/public/images&lt;/code&gt;, &lt;code&gt;app/public/stylesheets&lt;/code&gt;, and &lt;code&gt;app/public/javascripts&lt;/code&gt; which are used by the helpers defined by Rails (which I will talk about later).&lt;/p&gt;&lt;h3&gt;RHTML: Not so scary, really&lt;/h3&gt;  &lt;p&gt;So far we haven’t looked at much code. For this topic, I really think you need to see what we’ve been talking about.&lt;/p&gt;  &lt;div class="typocode"&gt;&lt;div style="font-style: italic;" class="codetitle"&gt;app/views/layouts/application.rhtml&lt;br /&gt;&lt;br /&gt;&amp;lt;title&amp;gt;&amp;lt;%= @title || &amp;quot;My default title&amp;quot; %&amp;gt;&amp;lt;/title&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;%= stylesheet_link_tag 'global' %&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;%= javascript_include_tag 'custom', 'prototype', 'effects' %&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div id=&amp;quot;header&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;%= render :partial =&amp;gt; 'shared/header' %&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div id=&amp;quot;content&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;%= yield %&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div id=&amp;quot;footer&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;%= render :partial =&amp;gt; 'shared/footer' %&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;If we scan &lt;code&gt;application.rhtml&lt;/code&gt;, we see the basic (very basic) structure of an html document. A few elements may not be familiar.&lt;h4&gt;Variables and giving your developer options&lt;/h4&gt;  &lt;p&gt;From top to bottom, the first thing that is out of place is the title tag. There are ERb tags present which outputs a result, and inside the tags it says &lt;code&gt;@title || "My default title"&lt;/code&gt;. Recognize that &lt;code&gt;@title&lt;/code&gt; is a variable (like $title in PHP). If the ERb code only contained &lt;code&gt;@title&lt;/code&gt; then the value of &lt;code&gt;@title&lt;/code&gt; would be printed out. The one difference here is the &lt;code&gt;||&lt;/code&gt; character. This means OR and effectively how the line reads in English is “print a title if there is one otherwise print ‘My Default Title’”. Doing this allows your developer to choose whether to define their own title or to use the default. If you need to get more complex than that, you should check with your developer first.&lt;/p&gt;  &lt;h4&gt;Tags to make your life easier&lt;/h4&gt;  &lt;p&gt;The next thing which isn’t normal html is two ERb tags, &lt;code&gt;stylesheet_link_tag&lt;/code&gt; and &lt;code&gt;javascript_include_tag&lt;/code&gt;. These are both ActionView (the name Rails gives to it’s View part of MVC) helpers. They do what their name says, and generate the html to include javascript files and stylesheets. They automatically handle file extension (.js or .css) and the directory (WEBROOT/javascripts or WEBROOT/stylesheets) for you.&lt;/p&gt;  &lt;h5&gt;link_to, the hyperlink’s smarter brother&lt;/h5&gt;  &lt;p&gt;Because designers generally won’t be working with controllers and actions (which is programming logic), you usually won’t be using the &lt;code&gt;link_to&lt;/code&gt; helper in it’s regular form of &lt;code&gt;link_to 'My link', :controller =&gt; 'something', :action =&gt; 'something_else'&lt;/code&gt;, but you should be aware that it creates a hyperlink. You might use &lt;code&gt;link_to&lt;/code&gt; to link to static URLs like &lt;code&gt;link_to 'My link', '/my_link.html'&lt;/code&gt; or to named routes which look like &lt;code&gt;link_to 'Login!', login_url&lt;/code&gt;. Named Routes are a special case, and your developer should tell you if they are being used. For more information, see &lt;a href="http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#M000332"&gt;the api entry&lt;/a&gt;.&lt;/p&gt;  &lt;h5&gt;Applying attributes to Rails tags&lt;/h5&gt;  &lt;p&gt;There are many helpers in Rails which can output html for you. Most of these take options to modify attributes for each tag. You should see the &lt;a href="http://api.rubyonrails.com/"&gt;Rails API&lt;/a&gt; for further details, and the Learning More section at the end of this article about how to navigate the API page.&lt;/p&gt;  &lt;h4&gt;Partials&lt;/h4&gt;  &lt;p&gt;Let’s get back to the code example. Inside the header div things get a little more complicated. Here something called a partial is being rendered.&lt;/p&gt;  &lt;p&gt;Think of partials as snippets of code that you’ll want to reuse. If you’re writing a user information div on a forum, you don’t want to have to format each individually. If you have the contents of a shopping cart print in several places, you don’t want to have to write the formatting and code in each place. Partials handle this. To do this, write code as you would in a view but place it in a file prefixed with a “_” and then use &lt;code&gt;render :partial&lt;/code&gt;.&lt;/p&gt;  &lt;p&gt;With our user information example, we might place the file &lt;code&gt;_user_information.rhtml&lt;/code&gt; which contains all the code that needs to be rendered for user information in the &lt;code&gt;app/views/users&lt;/code&gt; directory. Then, when we want to use that code in another view, you just use &lt;code&gt;&lt;= render :partial =&gt; 'users/user_information' %&gt;&lt;/code&gt;.&lt;/p&gt;  &lt;p&gt;Using partials means you only have to edit code once. Everywhere the partial is used will be automatically updated when you make a change.&lt;/p&gt;  &lt;h3&gt;Effectively yours, Scriptaculous&lt;/h3&gt;  &lt;p&gt;If you’re not aware of the &lt;a href="http://script.aculo.us/"&gt;Scriptaculous&lt;/a&gt; library, you should take a look. It is a clean effects library which integrates well with Rails. Using Scriptaculous deserves a full article so I won’t cover usage here.&lt;/p&gt;  &lt;h3&gt;Learning More&lt;/h3&gt;  &lt;p&gt;The &lt;a href="http://api.rubyonrails.org/"&gt;Rails API&lt;/a&gt; holds all the documentation for the Ruby on Rails framework. As a designer, you will be most interested in ActionView (the name Rails gives for its View codebase). The API site is a bit ugly, but if you look at the left section in the middle frame and find links starting with ActionView you’ll find a wealth of helpers to make writing html easier. Familiarizing yourself with these and being able to find out what the helpers do will make you a better suited Rails designer, even if you choose not to use the helpers all of the time or at all.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6555867709451033941-1687668441320980755?l=etechtrix.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://etechtrix.blogspot.com/feeds/1687668441320980755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6555867709451033941&amp;postID=1687668441320980755' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/1687668441320980755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/1687668441320980755'/><link rel='alternate' type='text/html' href='http://etechtrix.blogspot.com/2007/12/rails-for-designers.html' title='Rails for Designers'/><author><name>Parry</name><uri>http://www.blogger.com/profile/07780535252161172528</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6555867709451033941.post-4823696983858567219</id><published>2007-12-26T23:01:00.000-08:00</published><updated>2007-12-26T23:07:29.715-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Project Management'/><title type='text'>10 Tips for Successful Development Projects</title><content type='html'>&lt;div id="body"&gt;  &lt;p&gt;When you’re juggling four active projects, talking with clients and debugging thousand-line classes, being a developer can be stressful at times. Luckily, by planning a little here and there and working on your process, things can be much more manageable. A good developer is always perfecting his/her habits and skills. Here are a few things we’ve learned along the way.&lt;/p&gt; &lt;/div&gt;  &lt;div id="extended"&gt; &lt;h2&gt;&lt;span style="font-size:100%;"&gt;1. Use a Version Control System (SVN, &lt;/span&gt;&lt;span class="caps"  style="font-size:100%;"&gt;CVS,&lt;/span&gt;&lt;span style="font-size:100%;"&gt; Git, et al.)&lt;/span&gt;&lt;/h2&gt;  &lt;p&gt;Many years ago, when I was first introduced to &lt;a href="http://subversion.tigris.org/"&gt;&lt;span class="caps"&gt;SVN&lt;/span&gt;&lt;/a&gt;, I didn’t understand the benefits right away. It seemed like a hassle — an extra step to go through that required me to learn something new and I didn’t think the value outweighed the inconvenience. Then I accidentally overwrote two large class files in an e-commerce project I was working on and had to redo the work. Needless to say, &lt;span class="caps"&gt;SVN &lt;/span&gt;became part of my daily workflow.&lt;/p&gt;  &lt;p&gt;In truth, it’s fairly simple to get up to speed with the core functionality of &lt;span class="caps"&gt;SVN.&lt;/span&gt; You only need to learn a few commands before &lt;span class="caps"&gt;SVN &lt;/span&gt;becomes a very powerful part of your process. It’s especially useful if you’re working with a team of developers, as it allows everyone to work together without overwriting each other’s work, to easily share fixes and patches, and to release code to the public in a logical way. If you’re not using a version control system, you’re playing with fire.&lt;/p&gt;  &lt;p&gt;If you’re a Rails developer, you might want to check out my &lt;a href="http://maniacalrage.net/past/2006/4/12/heres_how_i_create_a/"&gt;&lt;span class="caps"&gt;SVN &lt;/span&gt;with Rails tutorial&lt;/a&gt;. It’s a little outdated now, but it should still give beginners a good idea of how to use &lt;span class="caps"&gt;SVN &lt;/span&gt;with a new Rails project.&lt;/p&gt;  &lt;h2&gt;&lt;span style="font-size:100%;"&gt;2. Talk to Your Client&lt;/span&gt;&lt;/h2&gt;  &lt;p&gt;If you don’t know everything about a project, it probably won’t succeed. You need to get as much information from your client as you can. This means initial meetings and a discovery phase, but it also means that you can’t be afraid to ask follow up questions when you need to. You’ll find that most clients are more than willing to tell you anything you’d like to know about the project, and more likely than not they’ll be excited to see you’re so interested in understanding every aspect. Don’t be shy.&lt;/p&gt;  &lt;h2&gt;&lt;span style="font-size:100%;"&gt;3. Pick the Right Technology for the Job&lt;/span&gt;&lt;/h2&gt;  &lt;p&gt;Just because I like Ruby on Rails doesn’t make it the right technology for every job. A good developer chooses the right technology for each project based on the requirements. But do keep in mind that it is your responsibility to suggest the best option. A lot of clients will come to the table with pre-conceived solutions based on things they’ve read or been told, and it’s up to you to state your case and give them their best options.&lt;/p&gt;  &lt;p&gt;It’s not a bad thing to suggest a client go a different way. A lot of inexperienced developers will take a client’s requirements and run with them, even if they aren’t the best options for the project. No one wins that way. Be honest, be thorough, and make sure you’re choosing the right technology for the right reasons.&lt;/p&gt;  &lt;h2&gt;&lt;span style="font-size:100%;"&gt;4. Keep the Client Focused on the Important Issues&lt;/span&gt;&lt;/h2&gt;  &lt;p&gt;This tip could alternatively be titled, “Tell the Client to Stop Worrying So Much About 99.9% Uptime and Redundancy Before They Even Have a Product to Keep Up All the Time.” It’s true: Clients believe (as they have been told for years by IT people the hosting industry) that the most important thing is that your website or web application have near-100% uptime. &lt;a href="http://www.37signals.com/svn/archives2/dont_scale_99999_uptime_is_for_walmart.php"&gt;Notable people&lt;/a&gt; have written articles about how this simply isn’t true.&lt;/p&gt;  &lt;p&gt;Here’s the reality: If you never have a product to launch because you spend all your time maximizing scale and uptime, none of that will matter. The truth is, even large web applications don’t need 99% uptime. And that’s even during success. You’ve got weekends and holidays and nights and slipping a few minutes here and there isn’t going to hurt you. In fact, if your product is good enough (i.e. you spent your time making a killer product), people won’t even mind if there’s occasional downtime that spans hours.&lt;/p&gt;  &lt;p&gt;Don’t get me wrong: You should make an effort to maximize your product’s efficiency. But focus on getting it done first. Scale later.&lt;/p&gt;  &lt;h2&gt;&lt;span style="font-size:100%;"&gt;5. Create Functional Specs&lt;/span&gt;&lt;/h2&gt;  &lt;p&gt;When working in a team (large or small), it’s important to spend time creating a functional spec —or something similar —that gives you and your team a clear development path. Many of my most successful projects have started with a functional spec. This does not mean you have to plan every part of a project out. A functional spec is to a developer what an outline is to a novelist. It’s broad strokes: Page flow, general functionality, features. It gives you a map to begin plotting your development with.&lt;/p&gt;  &lt;p&gt;Functional specs do not need to be extremely complicated, which means that anyone on your team can do them. It doesn’t have to be the developer. Often times, the most successful functional specs I’ve used were created by other people on the project and then we met to discuss them and make changes. This lead to solid specs influenced by everyone in the project, and in the end a solid deliverable.&lt;/p&gt;  &lt;h2&gt;&lt;span style="font-size:100%;"&gt;6. Read the Documentation &amp;amp; Participate in the Community&lt;/span&gt;&lt;/h2&gt;  &lt;p&gt;Being a developer means learning many different foreign languages. Sure, the core is English, but it might as well be Eskimo the first time you look at it. If you take one of your &lt;span class="caps"&gt;PHP &lt;/span&gt;classes and show it to a non-developer, they’d be looking at gibberish. So it’s understandable that eventually (and constantly), you’re going to need to reference documentation to get things working. And that’s not a bad thing.&lt;/p&gt;  &lt;p&gt;Learning how to read documentation, and becoming good at seeking help is an important part of being a successful developer. Even more important is making an effort to be part of the community. Talk about the work you’re doing, read other developers’ weblogs, seek out new technologies and techniques. Join mailing lists or hang out in &lt;span class="caps"&gt;IRC &lt;/span&gt;chat rooms. You’d be surprised how much you can learn by asking questions or just reading about what other people are doing.&lt;/p&gt;  &lt;h2&gt;&lt;span style="font-size:100%;"&gt;7. Find the Right Tools&lt;/span&gt;&lt;/h2&gt;  &lt;p&gt;This sounds like a no-brainer, but you’d be surprised how many people are making due with whatever they’ve been using since 1999. Times have changed. There are great text editors, powerful &lt;span class="caps"&gt;IDE&lt;/span&gt;s, and fantastic tools to help a developer get work done more efficiently and with less stress. If you’re a Mac user, you’ve probably used &lt;span class="caps"&gt;BBE&lt;/span&gt;dit at some point in your career, but have you checked out TextMate or Coda? Or vice versa? Don’t assume that the tools you’re used to are the best tools for the job. It’s possible that your work can be easier if you suffer through a week of transition.&lt;/p&gt;  &lt;p&gt;And, of course, there are many utilities such as MySQL interfaces and solid &lt;span class="caps"&gt;FTP &lt;/span&gt;applications that will help. Don’t be afraid to spend a little time playing with your options. Once you’ve decided on a toolset, spend time learning as many shortcuts and such as you can. Getting really good with your tools speeds up your process and makes your job much easier.&lt;/p&gt;  &lt;h2&gt;&lt;span style="font-size:100%;"&gt;8. Take Frequent Breaks&lt;/span&gt;&lt;/h2&gt;  &lt;p&gt;It’s simple: The more you sit in your chair at your desk staring at a computer screen, typing and mousing, the worse it is for you. Break up your work day. Take frequent short breaks and a few long ones. Your back, arms, eyes and brain will thank you. And they might even reward you with the ability to solve those problems you’ve been having the past two days with your user authentication method.&lt;/p&gt;  &lt;h2&gt;&lt;span style="font-size:100%;"&gt;9. Do a Post Mortem&lt;/span&gt; &lt;/h2&gt;  &lt;p&gt;Once you’ve delivered your final project to the client, do an internal post mortem. Talk about what went well, what went wrong, and what you need to change in your process in the future. This is important to do even if the project was a complete success, since it’s a good idea to note how your process worked and how you might apply that to future work. It’s even more important, obviously, especially when things don’t go well.&lt;/p&gt;  &lt;p&gt;It’s also a good idea to get feedback from the client. Ask them how they felt about the process, the work, et cetera. Implore them to be very honest. Their feedback will help you to deal with new clients and even improve relations in case the client comes back for more work in the future.&lt;/p&gt;  &lt;h2&gt;&lt;span style="font-size:100%;"&gt;10. Choose the Right Project&lt;/span&gt;&lt;/h2&gt;  &lt;p&gt;Don’t take anything that crosses your plate, unless you’re in desperate need of money or there’s a special circumstance. Being picky is a good idea. Don’t choose projects which you have a bad feeling about — chances are that your first impression is the right one and things won’t work out. It’s much better to take fewer projects on and have them all be successful than taking many and having no successes.&lt;/p&gt;  &lt;p&gt;There will be many times that a project starts well and goes badly. That’s the nature of the work. But if things look bad before you write the estimate, step back and think hard about whether or not you want to put in the work to try to change the situation to something you want. In most cases, this simply won’t work out and you’ll regret taking on the work at all. Be selective.&lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6555867709451033941-4823696983858567219?l=etechtrix.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://etechtrix.blogspot.com/feeds/4823696983858567219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6555867709451033941&amp;postID=4823696983858567219' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/4823696983858567219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/4823696983858567219'/><link rel='alternate' type='text/html' href='http://etechtrix.blogspot.com/2007/12/10-tips-for-successful-development.html' title='10 Tips for Successful Development Projects'/><author><name>Parry</name><uri>http://www.blogger.com/profile/07780535252161172528</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6555867709451033941.post-3639278066935880277</id><published>2007-12-26T06:26:00.000-08:00</published><updated>2007-12-26T06:30:50.050-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby on Rails'/><title type='text'>Top 10 Ruby on Rails performance tips</title><content type='html'>&lt;p&gt;The performance of Ruby on Rails is influenced by many factors, particularly the configuration of your deployment server(s). However the application code can make a big difference and determine whether your site is slow or highly responsive. This short article is about some of the tips and best coding practices to improve performances in Rails only, and won’t attempt to cover the server configuration improvements for the various deployments options.&lt;/p&gt; &lt;center&gt;&lt;img src="http://www.antoniocangiano.com/files/slow_train.jpg" title="Don't let your web applications be this slow... :)" /&gt;&lt;/center&gt; &lt;ol&gt;&lt;li&gt;&lt;strong&gt;Optimize your Ruby code&lt;/strong&gt;: this may seem obvious, but a Rails application is essentially ruby code that will have to be run. Make sure your code is efficient from a Ruby standpoint. Take a look at your code and ask yourself if some refactoring is in order, keeping in mind performance considerations and algorithmic efficiency. Profiling tools are, of course, very helpful in identifying slow code, but the following are some general considerations (some of them may appear admittedly obvious to you): &lt;ul&gt;&lt;li&gt;When available use the built-in classes and methods, rather than rolling your own;&lt;/li&gt;&lt;li&gt;Use Regular Expressions rather than costly loops, when you need to parse and process all but the smallest text;&lt;/li&gt;&lt;li&gt;Use &lt;a href="http://libxml.rubyforge.org/"&gt;Libxml&lt;/a&gt; rather than the slower &lt;span class="caps"&gt;REXML&lt;/span&gt; if you are processing &lt;span class="caps"&gt;XML&lt;/span&gt; documents;&lt;/li&gt;&lt;li&gt;Sometimes you may want to trade off just a bit of elegance and abstraction for speed (e.g. &lt;tt&gt;define_method&lt;/tt&gt; and &lt;tt&gt;yield&lt;/tt&gt; can  be costly);&lt;/li&gt;&lt;li&gt;The best way to resolve slow loops, is to remove them if possible. Not always, but in a few cases you can avoid loops by restructuring your code;&lt;/li&gt;&lt;li&gt;Simplify and reduce nested &lt;tt&gt;if&lt;/tt&gt;/&lt;tt&gt;unless&lt;/tt&gt; as much as you can and remember that the operator &lt;tt&gt;||=&lt;/tt&gt; is your friend;&lt;/li&gt;&lt;li&gt;Hashes are expensive data structures. Consider storing the value for a given key in a local variable if you need to recall the value a few times. More in general, it’s a good idea to store in a variable (local, instance or class variable) any frequently accessed data structure.&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Caching is good&lt;/strong&gt;: caching can significantly speed up your application. In particular: &lt;ul&gt;&lt;li&gt;Cache your models through the plugin &lt;a href="http://errtheblog.com/post/27"&gt;acts_as_cached&lt;/a&gt; (&lt;a href="http://errtheblog.com/static/pdfs/memcached.pdf"&gt;a pdf presentation is here&lt;/a&gt;) or the &lt;a href="http://dev.robotcoop.com/Libraries/cached_model/index.html"&gt;cached_model&lt;/a&gt;  gem;&lt;/li&gt;&lt;li&gt;Use &lt;a href="http://wiki.rubyonrails.com/rails/pages/MemCached"&gt;MemCacheStore&lt;/a&gt; as Sessions container;&lt;/li&gt;&lt;li&gt;Cache your pages through fragment cache (take a look at the &lt;a href="http://rubyforge.org/forum/forum.php?forum_id=10022"&gt;extended_fragment_cache&lt;/a&gt;).&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Use your database to the full extent of the law &lt;img src="http://antoniocangiano.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /&gt; &lt;/strong&gt;: don’t be afraid of using the cool features provided by your database, even if they are not directly supported by Rails and doing so means bypassing ActiveRecord. For example define stored procedures and functions, knowing that you can use them by communicating directly with the database through driver calls, rather than ActiveRecord high level methods. This can hugely improve the performance of a data bound Rails application.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Finders are great but be careful&lt;/strong&gt;: finders are very pleasant to use, enable you to write readable code and they don’t require in-depth &lt;span class="caps"&gt;SQL&lt;/span&gt; knowledge. But the nice high level abstraction come with a computational cost. Follow these rules of thumb: &lt;ul&gt;&lt;li&gt;Retrieve only the information that you need. A lot of execution time can be wasted by running selects for data that is not really needed. When using the various finders make sure to provide the right options to select only the fields required (:select), and if you only need a numbered subset of records from the resultset, opportunely specify a limit (with the :limit and :offset options).&lt;/li&gt;&lt;li&gt;Don’t kill your database with too many queries, use &lt;a href="http://www.rubyonrails.org/api/classes/ActiveRecord/Associations/ClassMethods.html"&gt;eager loading of associations&lt;/a&gt; through the include option: &lt;div class="typocode"&gt; &lt;pre&gt;&lt;code class="typocode_ruby"&gt;&lt;span class="comment"&gt;# This will generates only one query,&lt;/span&gt;&lt;br /&gt;&lt;span class="comment"&gt;# rather than Post.count + 1 queries&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword"&gt;for&lt;/span&gt; &lt;span class="ident"&gt;post&lt;/span&gt; &lt;span class="keyword"&gt;in&lt;/span&gt; &lt;span class="constant"&gt;Post&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;find&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:all&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;&lt;br /&gt;                     &lt;span class="symbol"&gt;:include&lt;/span&gt; &lt;span class="punct"&gt;=&gt;&lt;/span&gt; &lt;span class="punct"&gt;[&lt;/span&gt; &lt;span class="symbol"&gt;:author&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:comments&lt;/span&gt; &lt;span class="punct"&gt;])&lt;/span&gt;&lt;br /&gt; &lt;span class="comment"&gt;# Do something with post&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/li&gt;&lt;li&gt;Avoid dynamic finders like MyModel.find_by_&lt;strong&gt;*&lt;/strong&gt;. While using something like User.find_by_username is very readable and easy, it also can cost you a lot. In fact, ActiveRecord dynamically generates these methods within &lt;tt&gt;method_missing&lt;/tt&gt; and this can be quite slow. In fact, once the method is defined and invoked, the mapping with the model attribute (username in our example) is ultimately achieved through a select query which is built before being sent to the database. Using MyModel.find_by_sql directly, or even MyModel.find, is much more efficient;&lt;/li&gt;&lt;li&gt;Be sure to use MyModel.find_by_sql whenever you need to run an optimized &lt;span class="caps"&gt;SQL&lt;/span&gt; query. Needless to say, even if the final &lt;span class="caps"&gt;SQL&lt;/span&gt; statement ends up being the same, &lt;tt&gt;find_by_sql&lt;/tt&gt; is more efficient than the equivalent &lt;tt&gt;find&lt;/tt&gt; (no need to build the actual &lt;span class="caps"&gt;SQL&lt;/span&gt; string from the various option passed to the method). If you are building a plugin that needs to be cross-platform though, verify that the &lt;span class="caps"&gt;SQL&lt;/span&gt; queries will run on all Rails supported databases, or just use &lt;tt&gt;find&lt;/tt&gt; instead. In general, using &lt;tt&gt;find&lt;/tt&gt; is more readable and leads to better maintainable code, so before starting to fill your application with &lt;tt&gt;find_by_sql&lt;/tt&gt;, do some profiling and individuate slow queries which may need to be customized and optimized manually.&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Group operations in a transaction&lt;/strong&gt;: ActiveRecord wraps the creation or update of a record in a single transaction. Multiple inserts will then generate many transactions (one for each insert). Grouping multiple inserts in one single transaction will speed things up. &lt;p&gt;Insead of:&lt;/p&gt; &lt;div class="typocode"&gt; &lt;pre&gt;&lt;code class="typocode_ruby"&gt; &lt;span class="ident"&gt;my_collection&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;each&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;q&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;&lt;br /&gt;  &lt;span class="constant"&gt;Quote&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;create&lt;/span&gt;&lt;span class="punct"&gt;({&lt;/span&gt;&lt;span class="symbol"&gt;:phrase&lt;/span&gt; &lt;span class="punct"&gt;=&gt;&lt;/span&gt; &lt;span class="ident"&gt;q&lt;/span&gt;&lt;span class="punct"&gt;})&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; &lt;/div&gt; &lt;p&gt;Use:&lt;/p&gt; &lt;div class="typocode"&gt; &lt;pre&gt;&lt;code class="typocode_ruby"&gt;&lt;span class="constant"&gt;Quote&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;transaction&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;&lt;br /&gt;&lt;span class="ident"&gt;my_collection&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;each&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;q&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;&lt;br /&gt;  &lt;span class="constant"&gt;Quote&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;create&lt;/span&gt;&lt;span class="punct"&gt;({&lt;/span&gt;&lt;span class="symbol"&gt;:phrase&lt;/span&gt; &lt;span class="punct"&gt;=&gt;&lt;/span&gt; &lt;span class="ident"&gt;q&lt;/span&gt;&lt;span class="punct"&gt;})&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; &lt;/div&gt; &lt;p&gt;or for rolling back the whole transaction if any insert fails, use:&lt;/p&gt; &lt;div class="typocode"&gt; &lt;pre&gt;&lt;code class="typocode_ruby"&gt;&lt;span class="constant"&gt;Quote&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;transaction&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;&lt;br /&gt;&lt;span class="ident"&gt;my_collection&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;each&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;q&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;&lt;br /&gt;  &lt;span class="ident"&gt;quote&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Quote&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;new&lt;/span&gt;&lt;span class="punct"&gt;({&lt;/span&gt;&lt;span class="symbol"&gt;:phrase&lt;/span&gt; &lt;span class="punct"&gt;=&gt;&lt;/span&gt; &lt;span class="ident"&gt;q&lt;/span&gt;&lt;span class="punct"&gt;})&lt;/span&gt;&lt;br /&gt;  &lt;span class="ident"&gt;quote&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;save!&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Control your controllers&lt;/strong&gt;: filters are expensive, don’t abuse them. Also, don’t overuse too many instance variables that are not actually required by your views (they are not light). &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Use &lt;span class="caps"&gt;HTML&lt;/span&gt; for your views&lt;/strong&gt;: in your view templates don’t overuse helpers. Every time you use form helpers you are introducing an extra step. Do you really need a helper to write the &lt;span class="caps"&gt;HTML&lt;/span&gt; for a link, a textbox or a form for you? (You may even make your designer, who doesn’t know Ruby, happy!) &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Logging&lt;/strong&gt;: configure your applications so that they log only the information that is absolutely vital to you. Logging is an expensive operation and an inappropriate level (e.g. Logger::DEBUG) can cripple your production application.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Patch the GC&lt;/strong&gt;: OK, not really a coding issue, but patching &lt;a href="http://rubyforge.org/projects/railsbench/"&gt;Ruby’s Garbage Collection&lt;/a&gt; is strongly advised and will improve the speed of your Ruby and Rails applications significantly.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A final note&lt;/strong&gt;:I don’t advocate premature optimization, but if you can, work on your code with these principles in mind (but don’t overdo it either). Last minute changes and tweaks are possible but less desirable than a “performance aware” style of coding. &lt;a href="http://ruby-prof.rubyforge.org/"&gt;Profile&lt;/a&gt; your applications, &lt;a href="http://rubyforge.org/projects/railsbench"&gt;benchmark them&lt;/a&gt;&lt;br /&gt; and have fun experimenting.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6555867709451033941-3639278066935880277?l=etechtrix.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://etechtrix.blogspot.com/feeds/3639278066935880277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6555867709451033941&amp;postID=3639278066935880277' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/3639278066935880277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/3639278066935880277'/><link rel='alternate' type='text/html' href='http://etechtrix.blogspot.com/2007/12/top-10-ruby-on-rails-performance-tips.html' title='Top 10 Ruby on Rails performance tips'/><author><name>Parry</name><uri>http://www.blogger.com/profile/07780535252161172528</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6555867709451033941.post-3353752186013295054</id><published>2007-12-12T23:18:00.000-08:00</published><updated>2007-12-12T23:20:21.115-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Marketing'/><title type='text'>26 MORE Guerrilla Marketing Tactics You Should Be Using</title><content type='html'>&lt;p class="post_info"&gt;Written by: Mike Smith on Thursday, December 13th, 2007 | &lt;a href="http://www.bootstrappingblog.com/category/guerrilla-marketing/" title="View all posts in Guerrilla Marketing" rel="category tag"&gt;Guerrilla Marketing&lt;/a&gt; &lt;/p&gt;                   &lt;script type="text/javascript"&gt; digg_url = 'http://www.bootstrappingblog.com/42-26-more-guerrilla-marketing-tactics-you-should-be-using/guerrilla-marketing/'; &lt;/script&gt;&lt;script type="text/javascript"&gt; digg_title = '26 MORE Guerrilla Marketing Tactics You Should Be Using'; &lt;/script&gt;      &lt;script type="text/javascript"&gt; digg_bodytext = 'WELCOME TO OUR WEBSITE! You may want to subscribe to the RSS feed to keep up to date with our content. Thanks for visiting!Let&amp;#8217;s follow up our original post: 24 Guerrilla Marketing Tactics You Should Be Using, I want to write about 26 more ideas to round the full number to 50 guerrilla marketing tactics. [...]'; &lt;/script&gt;   &lt;br /&gt;&lt;p&gt;Let’s follow up our original post: &lt;a href="http://www.bootstrappingblog.com/30-24-guerrilla-marketing-tactics-you-should-be-using/guerrilla-marketing/"&gt;24 Guerrilla Marketing Tactics You Should Be Using&lt;/a&gt;, I want to write about 26 more ideas to round the full number to 50 guerrilla marketing tactics. If you’ve got more ideas, feel free to leave a comment. If you like the article, feel free to digg it or stumble it. I’d appreciate it.&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;strong&gt;Client Appreciation BBQ&lt;/strong&gt; - Invite your past clients to a BBQ and let them invite 1-2 friends to come with them. This will help your customers LOVE you even more than they already do, as well as bring some new faces into contact with you as potential clients.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Outdoor Signs&lt;/strong&gt; - Ever see the huge amounts of signs in the grass for mayor elections or in the front yard of a house that just got remodeled? This is a great, and inexpensive way to get your websites name out there. Pick a great tagline or picture for the ads, and you’ll be sure to get noticed.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Circulars&lt;/strong&gt; - A lot of people nowadays are looking for good deals on just about anything, so when they receive the “junk mail” it’s not considered as “junk” anymore. Get a brochure put into these and you’ll have a good chance at 10-100K people to see it depending on how big the circulation is.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Newspapers&lt;/strong&gt; - You don’t have to just buy an ad. Today, a lot of newspapers are hurting for editorials, so if you have any copy writing skills, you can send in some editorials to the newspapers and include a byline for your company/website information.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Magazines&lt;/strong&gt; - Similar to above. Don’t just buy an ad that will get looked over, but write an article and if it is well written, when people read it, they’ll want to check out your website for more information on you.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Put it on a bus&lt;/strong&gt; - Mobile advertising is great and will get viewed by a lot of potential clients on a daily basis.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Postcard Mailing&lt;/strong&gt; - This is a bit cheaper then sending out envelopes that might weigh a bit and it also is easier for the potential client to read what you’re promoting without having the OPTION of opening the envelope (a postcard is one single piece of paper).&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Write an E-book&lt;/strong&gt; - You can do this for to reasons. 1, you can write a free e-book on a topic in your niche and circulate it so people will start to see you as an authority in your niche, or you can also sell the book for a small profit and use that money to fund some of the other Guerrilla Marketing tactics.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Giving it Away&lt;/strong&gt; - How many people will turn down a free service or product? I don’t think very many will, so your voice and company will get out there in front of a lot of people. It’s also good for press to say you’ve given away X amount of products or services.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Enter Business Awards&lt;/strong&gt; - from small, local awards, to big, multi-national ones like Inc., your company could benefit from the exposure inside the awards. It’s an added bonus if you win because then you have a nice trophy in the office, or ribbon on your website that says you’re a good company.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Link Bait &amp;amp; Viral Marketing&lt;/strong&gt; - This is a well known tip to bloggers and website owners but few actually use it to their full advantage. For example, Matt Inman from &lt;a href="http://www.0at.org/"&gt;0at.org&lt;/a&gt; created some surveys as link bait for his dating site. Eventually, his dating website ended up as #1 in google for “online dating”, ahead of match.com and the other big players in that niche. &lt;a href="http://www.youtube.com/user/lonelygirl15"&gt;Lonelygirl15&lt;/a&gt; is another viral marketing showcase on how creating some funny videos can boost your viewers in a huge way.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Offer all the extras&lt;/strong&gt; - If you design, offer to setup hosting and buy the domain name. If you cut grass, offer to come in the winter and shovel snow. If you cook dinners for offices or nurses at hospitals, offer to create desserts. The ideas are endless, but if you give your clients EVERYTHING, they will have nothing to go elsewhere for.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Borrow a wall/building &lt;/strong&gt;- get a projector and find someone to let you use the side of their business/wall, and have your company logo/website/information shown on it every night. I know I would personally stop and look at what was showing on the side of a building for sure, so I can imagine how many others would as well.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Own the bus stop&lt;/strong&gt; - Not literally, but if you can get your ad on the poster area of the bus stop along with the seat inside the bus stop, you could effectively “own” the bus stop and the eyes of everyone who stands there on a daily basis waiting for the bus. Add this in with #6 and you’ve got something everyone will remember and talk about.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Movie Theater Ads&lt;/strong&gt; - I’ve looked into these for myself and they are generally very inexpensive as far as ads of this style go. Think about the movie you want your ad to show for and target it accordingly. A hiphop movie would be a great place for my Kicks Junkie website to be promoted, while a teen movie will do best with games/celebrity news.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Doctors Office Magazines&lt;/strong&gt; - I’d slip business cards into magazines every time you go to the doctors. That’s what they get for making you sit in a waiting room for 2 hours at a time, only to be seen by the doctor for 10 minutes &lt;img src="http://www.bootstrappingblog.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /&gt; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Sex Sells&lt;/strong&gt; -If your business is built for it, use it. Anything that isn’t “highly upper class” could use a little sex in their ads or in various ways. Building on the 24 guerrilla marketing tactics I wrote about, you could have 5-10 bikini models picket outside your business. This will definitely grab attention of guys in cars passing by.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Sponsor the homeless&lt;/strong&gt; - I believe in helping people in any way possible. If you see a homeless person somewhere on your daily commute to work, or various other places, you could pay the homeless person to hold a sign that reads “YourCompany.com paid me to hold this sign”. Regardless if it brings a TON of business your way or not, at least you’ll feel good about yourself, and you’ll touch that persons life forever. Buy them lunch and dinner or take them to a grocery store and pick out some chips and various other foods they can keep with them. Buy them a hotel room for the night to sleep in and get cleaned up. They’ll gladly stand with a sign for you after you do this for them.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Underground Music&lt;/strong&gt; - Is there a genre of music that your target market listens to? I bet there are hundreds, if not, thousands of music groups that are unsigned and lack funds to survive off their music. Why not offer to rent the hall for their next performance in exchange for flyers and banners during the show, or passed out at the door? You can also sponsor their CD production, or offer to get their website created in exchange for advertising at their shows, on the site, ect.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Cross-Promotion on 404 Pages&lt;/strong&gt; - Network with other bloggers or website owners and exchange banners on 404 pages. You could also promote affiliate offers or at the very least, put a google adsense block on it. The ideas for this are limitless and you can do different tests on each of your websites.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;M&amp;amp;M Candy&lt;/strong&gt; - If you go to the M&amp;amp;M website, you’ll notice that you can personalize your candy. You can use this to either promote your business or just put a thank you onthe candy and give it to a client.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Hair Salon’s and Barber Shops&lt;/strong&gt; - How much talking happens in one of these places on a daily basis? Why WOULDN’T you want to be a business they are talking about? Drop in and offer the hair stylists some free food from your restaurant or coupons for free products. They’ll be talking about you to everyone who comes through the salon for weeks to come!&lt;/li&gt;&lt;li&gt;&lt;strong&gt;800 number and PO Box&lt;/strong&gt; - I’ve &lt;a href="http://www.bootstrappingblog.com/3-5-tips-to-appear-large-on-a-small-budget/bootstrapping-tips/"&gt;talked about these two things before&lt;/a&gt; but I know they deserve to be mentioned here. If you’re looking for a company in the yellowpages or online and one has a home address and a number like this: 1-333-565-3245, while the one next to it has a PO Box for the address and a 1-800 number, which do you think is more likely to ‘look’ and ‘feel’ more professional? What company do you think is going to get the first call? You guessed it, the one with the 800 number and PO Box. &lt;a href="http://www.bootstrappingblog.com/3-5-tips-to-appear-large-on-a-small-budget/bootstrapping-tips/"&gt;Read Here&lt;/a&gt; to find out more about these.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Press Releases&lt;/strong&gt; - Regardless of what anyone tells you, a well formed and well written press release can gain you a lot of attention not only from the media, but from the target market as well. Don’t let this simple tool pass you by when trying to establish your bootstrapped business.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Airplane Chauffeur&lt;/strong&gt; - Find out when a trade show pertaining to your business will be in town. Next, hire a student or someone who will work for a low amount of money and have them hand make a sign with your websites address on it and stand next to baggage claim or right outside the door of the airport. They aren’t picking anyone up, but the people walking by and seeing your website address don’t know that.&lt;/li&gt;&lt;li&gt;Let Others Talk You Up - For the final tip in this installment of the list (yes, there will be more coming soon) I want to leave you with something that sounds so simple, but you probably never thought about. A lot of people will &lt;a href="http://www.bootstrappingblog.com/15-enlisting-friends-and-family/bootstrapping-tips/"&gt;enlist their friends and family&lt;/a&gt; to talk to other people about their business, but why not get people who aren’t super close to you, pay them a bit of money and send them out to bars, clubs, movies, restaurants and other busy places to talk up your business. Any word of mouth is good, even if you have to by the persons dinner in order for them to do it. Every little bit helps.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6555867709451033941-3353752186013295054?l=etechtrix.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://etechtrix.blogspot.com/feeds/3353752186013295054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6555867709451033941&amp;postID=3353752186013295054' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/3353752186013295054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/3353752186013295054'/><link rel='alternate' type='text/html' href='http://etechtrix.blogspot.com/2007/12/26-more-guerrilla-marketing-tactics-you.html' title='26 MORE Guerrilla Marketing Tactics You Should Be Using'/><author><name>Parry</name><uri>http://www.blogger.com/profile/07780535252161172528</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6555867709451033941.post-6599167960039764467</id><published>2007-12-12T23:04:00.000-08:00</published><updated>2007-12-12T23:14:13.924-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Marketing'/><title type='text'>24 Guerrilla Marketing Tactics You Should Be Using</title><content type='html'>&lt;p class="post_info"&gt;Written by: Mike Smith on Monday, December 10th, 2007 | &lt;a href="http://www.bootstrappingblog.com/category/guerrilla-marketing/" title="View all posts in Guerrilla Marketing" rel="category tag"&gt;Guerrilla Marketing&lt;/a&gt; &lt;/p&gt;                       &lt;script type="text/javascript"&gt; digg_bodytext = 'To know how to incorporate some of the older Guerrilla Marketing strategies with some newer, unconventional marketing ideas is an art form and something you should really be doing in your day-to-day business promotion. It doesn&amp;#8217;t matter if you are promoting an information website, your new blog or some services you offer, the right marketing [...]'; &lt;/script&gt;          To know how to incorporate some of the older Guerrilla Marketing strategies with some newer, unconventional marketing ideas is an art form and something you should really be doing in your day-to-day business promotion. It doesn’t matter if you are promoting an information website, your new blog or some services you offer, the right marketing can make or break the fine line between success and failure. &lt;p&gt;For those who don’t know I want to give a brief overview of Guerrilla Marketing. In short you could describe guerrilla marketing as ‘link bait’ or ‘guest posting’ from the bloggers point of view, or ‘free t-shirt giveaway (t-shirts have your logo/website on it)’ for the record company. If you look on the wiki page for &lt;a href="http://en.wikipedia.org/wiki/Guerrilla_marketing"&gt;guerrilla marketing&lt;/a&gt;, it explains it like this:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;… an unconventional system of promotions on a very low budget, by relying on time, energy and imagination instead of big marketing budgets&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;This is the basic principle of bootstrapping, so that’s why we’re covering Guerrilla Marketing here on the Bootstrapping Blog now. This is the first of many articles in the new category. If you have an idea that’s not on this list, feel free to leave a comment and let us know&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;strong&gt;Money Stamping&lt;/strong&gt; - grab a stamper from your local office supply store and stamp a funny phrase along with your website address on it. Have a make money online blog? Stamp something like “Learn how to make thousands of these online: sitehere”.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Sticky Notes&lt;/strong&gt; - Another way to use your stamper or even your printer. Sticky notes are noticable anywhere because people know what they’re for; notes. Put these on local business doors, offices, cars, or above mail boxes in apartment complexes and people will take notice.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;So many stamps&lt;/strong&gt; - Looking for a way to get noticed in the huge pile of advertising mail potential clients get? Send your promo material in a big manilla envelope and put 39 - 1 cent stamps on it. Out of 100 envelopes, who’s do you think will catch the eye first?&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Do &lt;strike&gt;Not&lt;/strike&gt; Disturb&lt;/strong&gt; - Heading to a blog expo anytime soon? Get some door hangers printed up with your business information on it and possibly a link to something free on your site. Get the attention of everyone in your market this way, and it’s super cheap as well. Noone else I know has been doing this so you’ll stand out for sure.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Pay it forward&lt;/strong&gt; - when you’re heading into the movie theater, pay the persons way behind you and tell the cashier to give them your business card. You’re not guaranteed that the person will become a client but I bet the word of mouth on that one would be pretty big.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Fake publicity stunt&lt;/strong&gt; - you could have people picket your storefront with signs that read “This business is too nice” or “Company X is too good at their job”. Theres a million fake publicity stunts, use your imagination and I bet it’ll work no matter how weird or out of the box it seems.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Guest blogging&lt;/strong&gt; - This is for the bloggers out there, or even the freelance writers. Guest blog on other blogs largely related, or semi-related to your websites niche. Opening other peoples eyes to your name and your website is always good promotion, especially if you’re an awesome writer. Not to mention networking with other bloggers is great for business as well.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Business Cards&lt;/strong&gt; - STOP! Don’t skip this one. So many people see this and think you’re going to tell them to print cards and hand them out. I’m not! What you do with these cards is head to every library or book store in your city and find the section that relates to your business. Open each and every book and place a business card somewhere in the book. This is great targeted marketing and only costs you a few bucks for the cards and an afternoon of placing the cards.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Bumper Stickers&lt;/strong&gt; - These are great because they can go anywhere, not just on your car. Bathroom stalls, street poles, ect. Get creative with where you place them, they can grab peoples attention when placed in the right spots.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Temporary Tattoos&lt;/strong&gt; - I seen a post on some guerrilla marketing ideas over at &lt;a href="http://www.dailybits.com/17-guerrilla-marketing-ideas-for-your-website/"&gt;Daily Bits&lt;/a&gt; and they talked about this as well. These tattoos will last for X amount of days and would be perfect for blog expos or other events where tons of people will be. Placing it in a weird place (forehead, neck, full back, foot, ect) is also a great way to get it noticed. Hey, if people talk about it, thats the whole point right?&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Help Home Based Businesses&lt;/strong&gt; - most HBB owners try to keep their records hidden from local housing authorities so they’re hard to reach. head over to your local chamber of commerce and suggest a HBB committee. They might appoint you head of it (you can even ask to be) and you have a bunch of HBB owners who will come to chat and you can promote to with business cards, flyers, booklets, ect.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Anything Else?&lt;/strong&gt; - No, the list isn’t done yet. These are two words to say right before you exchange money with a client/customer. This will make them think and could open doors to a larger pay day.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Top 10 reasons to choose YOU&lt;/strong&gt; - instead of leaving business cards or other promo material at a business or in someones email box, create a list of the top 10 reasons why the prospect should choose your company. Make them 100% true, humerous and memberable.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Demonstrations&lt;/strong&gt; - got a service business? this is perfect for you. Find a local store that pertains to your services and put on a free demo of your services. Your service involve outdoors? Contact news stations and let them know you’ll be offering a BBQ and free service demonstration. The BBQ could get a little costly, but the amount of press and promotion could really pay off.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Print Calendars&lt;/strong&gt; - These could be given to each of your clients or left in a store for people to take for free. Print your website address and a little slogan or client testimonial on each months picture for exposure every day. The people using your calendars will even help you out when they have company over who will see the calendar, especially if the images you use are high end and visually appealing.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Window decals&lt;/strong&gt; - get a custom printed window decal on your car with your logo/website and possibly a slogan. looks professional, and is great for red lights.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Fish Bowl Business Cards&lt;/strong&gt; - You know the fish bowls at stores offering to choose a random card for a free lunch? Well, theres two ways to benefit from this. - 1. put your card in the fish bowl (hey, a free lunch is a free lunch, and who knows, the owner of the store might need your services) - 2. ask the store to let you have the losing cards each week/month which will generate a ton of free leads for you.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Sponsor an event&lt;/strong&gt; - doing this is at most times, very inexpensive and also GREAT for publicity, especially if its a big event. You normally get your logo and business mentioned in all of the events promo material which is tons of publicity you normally wouldn’t get. Be at the event to add extra stickiness to your business name and interact with the guests.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Holiday Greetings&lt;/strong&gt; - send emails or snail-mail to your past clients wishing them happy holidays (Christmas, Thanksgiving, New Years). This helps them keep your name/business in their head as well as standing out from the other people they’ve done business with before.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Charity Donations&lt;/strong&gt; - Donate some of the profits you generate every month to charity. Great for promotion in the media and clients to feel like they’re helping out the charity by purchasing from you.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Hold a Contest&lt;/strong&gt; - This could have 1-10 winners which helps the word-of-mouth promotion everyone needs and wants. You can gain free press for starting the contest, plus publishing the winners is great for more press coverage.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;T-Shirts&lt;/strong&gt; - This is great for turning yourself or others into walking billboard. You can give the t-shirts away as prizes which is also another great way of gaining word of mouth promotion. Your t-shirts for the prizes don’t need your website address on it. Just give away a great, fashionable shirt and that’ll have people eager to tell friends and family where they got it from.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Partnerships&lt;/strong&gt; - Do you run a &lt;a href="http://www.blogthememachine.com/"&gt;web design business&lt;/a&gt; and want to find more potential leads? Try partnering with a &lt;a href="http://hits.webair.com/cgi-bin/redir?pd_link=i1-a34484-o3158-c48358"&gt;web hosting company&lt;/a&gt;. Do you have a lawn-care business? Try partnering with a window washing company. Any partnership which benefits both companies is a great idea and a great way at grabbing the attention of new potential clients. Also a great way of giving your business targeted marketing.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Blood Drive&lt;/strong&gt; - Host a blood drive, contact newspapers, tv news, radio, ect. have 1-2 banners up with your website information and also have business cards at the sign in table. Everyone loves to help their country, city, state, ect. and giving blood is the easiest way for some people to do that. Putting yourself in the forefront of your cities next blood drive would make your business very visible to a whole range of new potential clients and word-of-mouth advertisers.&lt;/li&gt;&lt;/ol&gt;See more tactics on next post "26 more Guerrilla Marketing Tactics You Should Be Using".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6555867709451033941-6599167960039764467?l=etechtrix.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://etechtrix.blogspot.com/feeds/6599167960039764467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6555867709451033941&amp;postID=6599167960039764467' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/6599167960039764467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/6599167960039764467'/><link rel='alternate' type='text/html' href='http://etechtrix.blogspot.com/2007/12/24-guerrilla-marketing-tactics-you.html' title='24 Guerrilla Marketing Tactics You Should Be Using'/><author><name>Parry</name><uri>http://www.blogger.com/profile/07780535252161172528</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6555867709451033941.post-816809891897884417</id><published>2007-12-09T22:17:00.000-08:00</published><updated>2007-12-09T22:19:48.485-08:00</updated><title type='text'>Introduction to OLAP</title><content type='html'>&lt;span style="font-size:78%;"&gt;(Source: http://www.dwreview.com/OLAP/Introduction_OLAP.html)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;OLAP (or &lt;em&gt;Online Analytical Processing&lt;/em&gt;) has been growing in popularity due to the increase in data volumes and the recognition of the business value of analytics. Until the mid-nineties, performing OLAP analysis was an extremely costly process mainly restricted to larger organizations.&lt;/p&gt; &lt;p&gt;The major OLAP vendor are Hyperion, Cognos, Business Objects, MicroStrategy. The cost per seat were in the range of $1500 to $5000 per annum. The setting up of the environment to perform OLAP analysis would also require substantial investments in time and monetary resources.&lt;/p&gt; &lt;p&gt;This has changed as the major database vendor have started to incorporate OLAP modules within their database offering - Microsoft SQL Server 2000 with Analysis Services, Oracle with Express and Darwin, and IBM with DB2.&lt;/p&gt;  &lt;h4&gt;What is OLAP?&lt;br /&gt;&lt;/h4&gt;&lt;p&gt;OLAP allows business users to slice and dice data at will. Normally data in an organization is distributed in multiple data sources and are incompatible with each other. A retail example: Point-of-sales data and sales made via call-center or the Web are stored in different location and formats. It would a time consuming process for an executive to obtain OLAP reports such as - What are the most popular products purchased by customers between the ages 15 to 30?&lt;/p&gt; &lt;p&gt;Part of the OLAP implementation process involves extracting data from the various data repositories and making them compatible. Making data compatible involves ensuring that the meaning of the data in one repository matches all other repositories. An example of incompatible data: Customer ages can be stored as birth date for purchases made over the web and stored as age categories (i.e. between 15 and 30) for in store sales.&lt;/p&gt; &lt;p&gt;It is not always necessary to create a &lt;a href="http://www.dwreview.com/DW_Overview.html"&gt;data warehouse&lt;/a&gt; for OLAP analysis. Data stored by operational systems, such as point-of-sales, are in types of databases called OLTPs. OLTP, &lt;em&gt;Online Transaction Process&lt;/em&gt;, databases do not have any difference from a structural perspective from any other databases. The main difference, and only, difference is the way in which data is stored.&lt;/p&gt; &lt;p&gt;Examples of OLTPs can include ERP, CRM, SCM, Point-of-Sale applications, Call Center.&lt;/p&gt; &lt;p&gt;OLTPs are designed for optimal transaction speed. When a consumer makes a purchase online, they expect the transactions to occur instantaneously. With a database design, call data modeling, optimized for transactions the record 'Consumer name, Address, Telephone, Order Number, Order Name, Price, Payment Method' is created quickly on the database and the results can be recalled by managers equally quickly if needed.&lt;/p&gt; &lt;p align="center"&gt;&lt;img alt="OLTP Data Model" src="http://www.dwreview.com/OLAP/images/OLTP-Northwind.gif" border="0" height="539" width="382" /&gt;&lt;/p&gt; &lt;p align="center"&gt;Figure 1. Data Model for OLTP&lt;/p&gt; &lt;p&gt;Data are not &lt;a href="http://www.dwreview.com/Articles/Data_LifeCycle.html"&gt;typically stored&lt;/a&gt; for an extended period on OLTPs for storage cost and transaction speed reasons.&lt;/p&gt; &lt;p&gt;OLAPs have a different mandate from OLTPs. OLAPs are designed to give an overview analysis of what happened. Hence the data storage (i.e. data modeling) has to be set up differently. The most common method is called the star design.   &lt;/p&gt;&lt;p align="center"&gt;&lt;img alt="OLAP Data Model" src="http://www.dwreview.com/OLAP/images/OLAP-Northwind.gif" border="0" height="358" width="279" /&gt;&lt;/p&gt; &lt;p align="center"&gt;Figure 2. Star Data Model for OLAP&lt;/p&gt; &lt;p&gt;The central table in an OLAP start data model is called the fact table. The surrounding tables are called the dimensions. Using the above data model, it is possible to build reports that answer questions such as:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;The supervisor that gave the most discounts. &lt;/li&gt;&lt;li&gt;The quantity shipped on a particular date, month, year or quarter. &lt;/li&gt;&lt;li&gt;In which zip code did product A sell the most. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;To obtain answers, such as the ones above, from a data model OLAP &lt;em&gt;cubes&lt;/em&gt; are created. OLAP cubes are not strictly cuboids - it is the name given to the process of linking data from the different dimensions. The cubes can be developed along business units such as sales or marketing. Or a giant cube can be formed with all the dimensions.&lt;/p&gt; &lt;p align="center"&gt;&lt;img alt="OLAP Cube" src="http://www.dwreview.com/OLAP/images/Olap_Cube.gif" border="0" height="156" width="131" /&gt;&lt;/p&gt; &lt;p align="center"&gt;Figure 3. OLAP Cube with Time, Customer and Product Dimensions&lt;/p&gt; &lt;p&gt;OLAP can be a valuable and rewarding business tool. Aside from producing reports, OLAP analysis can aid an organization evaluate balanced scorecard targets.&lt;/p&gt; &lt;p align="center"&gt;&lt;img alt="Steps to Producing OLAP Reports" src="http://www.dwreview.com/OLAP/images/OLAP_Steps.gif" border="0" height="151" width="616" /&gt;&lt;/p&gt; &lt;p align="center"&gt;Figure 4. Steps in the OLAP Creation Process&lt;/p&gt;&lt;h4&gt;&lt;br /&gt;&lt;/h4&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6555867709451033941-816809891897884417?l=etechtrix.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://etechtrix.blogspot.com/feeds/816809891897884417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6555867709451033941&amp;postID=816809891897884417' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/816809891897884417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/816809891897884417'/><link rel='alternate' type='text/html' href='http://etechtrix.blogspot.com/2007/12/introduction-to-olap.html' title='Introduction to OLAP'/><author><name>Parry</name><uri>http://www.blogger.com/profile/07780535252161172528</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6555867709451033941.post-4163403349578641557</id><published>2007-12-08T05:12:00.000-08:00</published><updated>2007-12-08T05:18:18.109-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><title type='text'>Ajax: A New Approach to Web Applications</title><content type='html'>&lt;p style="text-align: justify;"&gt;If anything about current interaction design can be called “glamorous,” it’s creating Web applications. After all, when was the last time you heard someone rave about the interaction design of a product that wasn’t on the Web? (Okay, besides the iPod.) All the cool, innovative new projects are online.&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;Despite this, Web interaction designers can’t help but feel a little envious of our colleagues who create desktop software. Desktop applications have a richness and responsiveness that has seemed out of reach on the Web. The same simplicity that enabled the Web’s rapid proliferation also creates a gap between the experiences we can provide and the experiences users can get from a desktop application.&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;That gap is closing. Take a look at &lt;a href="http://www.google.com/webhp?complete=1&amp;amp;hl=en"&gt;Google Suggest&lt;/a&gt;. Watch the way the suggested terms update as you type, almost instantly. Now look at &lt;a href="http://maps.google.com/"&gt;Google Maps&lt;/a&gt;. Zoom in. Use your cursor to grab the map and scroll around a bit. Again, everything happens almost instantly, with no waiting for pages to reload.&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;Google Suggest and Google Maps are two examples of a new approach to web applications that we at Adaptive Path have been calling Ajax. The name is shorthand for Asynchronous JavaScript + XML, and it represents a fundamental shift in what’s possible on the Web.&lt;/p&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style="text-align: justify;"&gt;Defining Ajax&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;Ajax isn’t a technology. It’s really several technologies, each flourishing in its own right, coming together in powerful new ways. Ajax incorporates:&lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;&lt;a href="http://www.adaptivepath.com/publications/essays/archives/000266.php"&gt;standards-based presentation&lt;/a&gt; using XHTML and CSS;&lt;/li&gt;&lt;li&gt;dynamic display and interaction using the &lt;a href="http://www.scottandrew.com/weblog/articles/dom_1"&gt;Document Object Model&lt;/a&gt;;&lt;/li&gt;&lt;li&gt;data interchange and manipulation using &lt;a href="http://www-106.ibm.com/developerworks/xml/library/x-xslt/?article=xr"&gt;XML and XSLT&lt;/a&gt;;&lt;/li&gt;&lt;li&gt;asynchronous data retrieval using &lt;a href="http://www.xml.com/pub/a/2005/02/09/xml-http-request.html"&gt;XMLHttpRequest&lt;/a&gt;;&lt;/li&gt;&lt;li&gt;and &lt;a href="http://www.crockford.com/javascript/javascript.html"&gt;JavaScript&lt;/a&gt; binding everything together.&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;The classic web application model works like this: Most user actions in the interface trigger an HTTP request back to a web server. The server does some processing — retrieving data, crunching numbers, talking to various legacy systems — and then returns an HTML page to the client. It’s a model adapted from the Web’s original use as a hypertext medium, but as fans of &lt;a href="http://www.jjg.net/elements/"&gt;The Elements of User Experience&lt;/a&gt; know, what makes the Web good for hypertext doesn’t necessarily make it good for software applications.&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;&lt;a href="http://www.adaptivepath.com/images/publications/essays/ajax-fig1.png"&gt;&lt;img src="http://www.adaptivepath.com/images/publications/essays/ajax-fig1_small.png" alt="Ajax Overview 1" border="0" height="455" width="475" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;&lt;em&gt;Figure 1: The traditional model for web applications (left) compared to the Ajax model (right).&lt;/em&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;This approach makes a lot of technical sense, but it doesn’t make for a great user experience. While the server is doing its thing, what’s the user doing? That’s right, waiting. And at every step in a task, the user waits some more.&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;Obviously, if we were designing the Web from scratch for applications, we wouldn’t make users wait around. Once an interface is loaded, why should the user interaction come to a halt every time the application needs something from the server? In fact, why should the user see the application go to the server at all?&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;h2 style="text-align: justify;"&gt;How Ajax is Different&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;An Ajax application eliminates the start-stop-start-stop nature of interaction on the Web by introducing an intermediary — an Ajax engine — between the user and the server. It seems like adding a layer to the application would make it less responsive, but the opposite is true.&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;Instead of loading a webpage, at the start of the session, the browser loads an Ajax engine — written in JavaScript and usually tucked away in a hidden frame. This engine is responsible for both rendering the interface the user sees and communicating with the server on the user’s behalf. The Ajax engine allows the user’s interaction with the application to happen asynchronously — independent of communication with the server. So the user is never staring at a blank browser window and an hourglass icon, waiting around for the server to do something.&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;&lt;a href="http://www.adaptivepath.com/images/publications/essays/ajax-fig2.png"&gt;&lt;img src="http://www.adaptivepath.com/images/publications/essays/ajax-fig2_small.png" alt="Ajax Overview 2" border="0" height="598" width="475" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;&lt;em&gt;Figure 2: The synchronous interaction pattern of a traditional web application (top) compared with the asynchronous pattern of an Ajax application (bottom).&lt;/em&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;Every user action that normally would generate an HTTP request takes the form of a JavaScript call to the Ajax engine instead. Any response to a user action that doesn’t require a trip back to the server — such as simple data validation, editing data in memory, and even some navigation — the engine handles on its own. If the engine needs something from the server in order to respond — if it’s submitting data for processing, loading additional interface code, or retrieving new data — the engine makes those requests asynchronously, usually using XML, without stalling a user’s interaction with the application.&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;h2 style="text-align: justify;"&gt;Who’s Using Ajax&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;Google is making a huge investment in developing the Ajax approach. All of the major products Google has introduced over the last year — &lt;a href="http://www.orkut.com/"&gt;Orkut&lt;/a&gt;, &lt;a href="http://www.gmail.com/"&gt;Gmail&lt;/a&gt;, the latest beta version of &lt;a href="http://groups-beta.google.com/"&gt;Google Groups&lt;/a&gt;, &lt;a href="http://www.google.com/webhp?complete=1&amp;amp;hl=en"&gt;Google Suggest&lt;/a&gt;, and &lt;a href="http://maps.google.com/"&gt;Google Maps&lt;/a&gt; — are Ajax applications. (For more on the technical nuts and bolts of these Ajax implementations, check out these excellent analyses of &lt;a href="http://johnvey.com/features/gmailapi/"&gt;Gmail&lt;/a&gt;, &lt;a href="http://serversideguy.blogspot.com/2004/12/google-suggest-dissected.html"&gt;Google Suggest&lt;/a&gt;, and &lt;a href="http://web.archive.org/web/20050331002145/jgwebber.blogspot.com/2005/02/mapping-google.html"&gt;Google Maps&lt;/a&gt;.) Others are following suit: many of the features that people love in &lt;a href="http://www.flickr.com/"&gt;Flickr&lt;/a&gt; depend on Ajax, and Amazon’s &lt;a href="http://www.a9.com/"&gt;A9.com&lt;/a&gt; search engine applies similar techniques.&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;These projects demonstrate that Ajax is not only technically sound, but also practical for real-world applications. This isn’t another technology that only works in a laboratory. And Ajax applications can be any size, from the very simple, single-function Google Suggest to the very complex and sophisticated Google Maps.&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;At Adaptive Path, we’ve been doing our own work with Ajax over the last several months, and we’re realizing we’ve only scratched the surface of the rich interaction and responsiveness that Ajax applications can provide. Ajax is an important development for Web applications, and its importance is only going to grow. And because there are so many developers out there who already know how to use these technologies, we expect to see many more organizations following Google’s lead in reaping the competitive advantage Ajax provides.&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;h2 style="text-align: justify;"&gt;Moving Forward&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;The biggest challenges in creating Ajax applications are not technical. The core Ajax technologies are mature, stable, and well understood. Instead, the challenges are for the designers of these applications: to forget what we think we know about the limitations of the Web, and begin to imagine a wider, richer range of possibilities.&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;It’s going to be fun.&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;hr style="margin-left: 0px; margin-right: 0px;"&gt;&lt;div style="text-align: justify;"&gt;  &lt;a name="qanda"&gt;&lt;h2&gt;Ajax Q&amp;amp;A&lt;/h2&gt;&lt;/a&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;March 13, 2005:&lt;/strong&gt; Since we first published Jesse’s essay, we’ve received an enormous amount of correspondence from readers with questions about Ajax. In this Q&amp;amp;A, Jesse responds to some of the most common queries. &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;Q.&lt;/strong&gt; Did Adaptive Path invent Ajax? Did Google? Did Adaptive Path help build Google’s Ajax applications? &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;A.&lt;/strong&gt; Neither Adaptive Path nor Google invented Ajax. Google’s recent products are simply the highest-profile examples of Ajax applications. Adaptive Path was not involved in the development of Google’s Ajax applications, but we have been doing Ajax work for some of our other clients. &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;Q.&lt;/strong&gt; Is Adaptive Path selling Ajax components or trademarking the name? Where can I download it? &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;A.&lt;/strong&gt; Ajax isn’t something you can download. It’s an approach — a way of thinking about the architecture of web applications using certain technologies. Neither the Ajax name nor the approach are proprietary to Adaptive Path. &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;Q.&lt;/strong&gt; Is Ajax just another name for XMLHttpRequest? &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;A.&lt;/strong&gt; No. XMLHttpRequest is only part of the Ajax equation. XMLHttpRequest is the technical component that makes the asynchronous server communication possible; Ajax is our name for the overall approach described in the article, which relies not only on XMLHttpRequest, but on CSS, DOM, and other technologies. &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;Q.&lt;/strong&gt; Why did you feel the need to give this a name? &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;A.&lt;/strong&gt; I needed something shorter than “Asynchronous JavaScript+CSS+DOM+XMLHttpRequest” to use when discussing this approach with clients. &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;Q.&lt;/strong&gt; Techniques for asynchronous server communication have been around for years. What makes Ajax a “new” approach? &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;A.&lt;/strong&gt; What’s new is the prominent use of these techniques in real-world applications to change the fundamental interaction model of the Web. Ajax is taking hold now because these technologies and the industry’s understanding of how to deploy them most effectively have taken time to develop. &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;Q.&lt;/strong&gt; Is Ajax a technology platform or is it an architectural style? &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;A.&lt;/strong&gt; It’s both. Ajax is a set of technologies being used together in a particular way. &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;Q.&lt;/strong&gt; What kinds of applications is Ajax best suited for? &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;A.&lt;/strong&gt; We don’t know yet. Because this is a relatively new approach, our understanding of where Ajax can best be applied is still in its infancy. Sometimes the traditional web application model is the most appropriate solution to a problem. &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;Q.&lt;/strong&gt; Does this mean Adaptive Path is anti-Flash? &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;A.&lt;/strong&gt; Not at all. Macromedia is an Adaptive Path client, and we’ve long been supporters of Flash technology. As Ajax matures, we expect that sometimes Ajax will be the better solution to a particular problem, and sometimes Flash will be the better solution. We’re also interested in exploring ways the technologies can be mixed (as in the case of Flickr, which uses both). &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;Q.&lt;/strong&gt; Does Ajax have significant accessibility or browser compatibility limitations? Do Ajax applications break the back button? Is Ajax compatible with REST? Are there security considerations with Ajax development? Can Ajax applications be made to work for users who have JavaScript turned off? &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;A.&lt;/strong&gt; The answer to all of these questions is “maybe”. Many developers are already working on ways to address these concerns. We think there’s more work to be done to determine all the limitations of Ajax, and we expect the Ajax development community to uncover more issues like these along the way. &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;Q.&lt;/strong&gt; Some of the Google examples you cite don’t use XML at all. Do I have to use XML and/or XSLT in an Ajax application? &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;A.&lt;/strong&gt; No. XML is the most fully-developed means of getting data in and out of an Ajax client, but there’s no reason you couldn’t accomplish the same effects using a technology like &lt;a href="http://www.crockford.com/JSON/"&gt;JavaScript Object Notation&lt;/a&gt; or any similar means of structuring data for interchange. &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;Q.&lt;/strong&gt; Are Ajax applications easier to develop than traditional web applications? &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;A.&lt;/strong&gt; Not necessarily. Ajax applications inevitably involve running complex JavaScript code on the client. Making that complex code efficient and bug-free is not a task to be taken lightly, and better development tools and frameworks will be needed to help us meet that challenge. &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;Q.&lt;/strong&gt; Do Ajax applications always deliver a better experience than traditional web applications? &lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt; &lt;strong&gt;A.&lt;/strong&gt; Not necessarily. Ajax gives interaction designers more flexibility. However, the more power we have, the more caution we must use in exercising it. We must be careful to use Ajax to enhance the user experience of our applications, not degrade it. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6555867709451033941-4163403349578641557?l=etechtrix.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://etechtrix.blogspot.com/feeds/4163403349578641557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6555867709451033941&amp;postID=4163403349578641557' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/4163403349578641557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/4163403349578641557'/><link rel='alternate' type='text/html' href='http://etechtrix.blogspot.com/2007/12/ajax-new-approach-to-web-applications.html' title='Ajax: A New Approach to Web Applications'/><author><name>Parry</name><uri>http://www.blogger.com/profile/07780535252161172528</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6555867709451033941.post-5445682627795237093</id><published>2007-12-08T04:55:00.000-08:00</published><updated>2007-12-08T05:08:35.142-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Internet'/><title type='text'>HTTP Request</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;address&gt;(Ref: http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html)&lt;br /&gt;part of &lt;a rev="Section" href="http://www.w3.org/Protocols/rfc2616/rfc2616.html"&gt;Hypertext Transfer Protocol -- HTTP/1.1&lt;/a&gt;&lt;br /&gt;RFC 2616 Fielding, et al.&lt;/address&gt; &lt;/div&gt;&lt;h2 style="text-align: justify;"&gt;HTTP Request&lt;/h2&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    A request message from a client to a server includes, within the    first line of that message, the method to be applied to the resource,    the identifier of the resource, and the protocol version in use. &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;pre&gt;        Request       = Request-Line              ; Section 5.1&lt;br /&gt;                      *(( general-header        ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.5"&gt;4.5&lt;/a&gt;&lt;br /&gt;                       | request-header         ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.3"&gt;5.3&lt;/a&gt;&lt;br /&gt;                       | entity-header ) CRLF)  ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html#sec7.1"&gt;7.1&lt;/a&gt;&lt;br /&gt;                      CRLF&lt;br /&gt;                      [ message-body ]          ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3"&gt;4.3&lt;/a&gt; &lt;/pre&gt; &lt;/div&gt;&lt;h3 style="text-align: justify;"&gt;&lt;a id="sec5.1"&gt;5.1&lt;/a&gt; Request-Line&lt;/h3&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    The Request-Line begins with a method token, followed by the    Request-URI and the protocol version, and ending with CRLF. The    elements are separated by SP characters. No CR or LF is allowed    except in the final CRLF sequence. &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;pre&gt;        Request-Line   = Method SP Request-URI SP HTTP-Version CRLF&lt;br /&gt;&lt;/pre&gt; &lt;/div&gt;&lt;h3 style="text-align: justify;"&gt;&lt;a id="sec5.1.1"&gt;5.1.1&lt;/a&gt; Method&lt;/h3&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    The Method  token indicates the method to be performed on the    resource identified by the Request-URI. The method is case-sensitive. &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;pre&gt;       Method         = "OPTIONS"                ; Section 9.2&lt;br /&gt;                    | "GET"                    ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3"&gt;9.3&lt;/a&gt;&lt;br /&gt;                    | "HEAD"                   ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4"&gt;9.4&lt;/a&gt;&lt;br /&gt;                    | "POST"                   ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.5"&gt;9.5&lt;/a&gt;&lt;br /&gt;                    | "PUT"                    ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.6"&gt;9.6&lt;/a&gt;&lt;br /&gt;                    | "DELETE"                 ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.7"&gt;9.7&lt;/a&gt;&lt;br /&gt;                    | "TRACE"                  ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.8"&gt;9.8&lt;/a&gt;&lt;br /&gt;                    | "CONNECT"                ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.9"&gt;9.9&lt;/a&gt;&lt;br /&gt;                    | extension-method&lt;br /&gt;     extension-method = token&lt;br /&gt;&lt;/pre&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    The list of methods allowed by a resource can be specified in an    Allow header field (section 14.7). The return code of the response    always notifies the client whether a method is currently allowed on a    resource, since the set of allowed methods can change dynamically. An    origin server SHOULD return the status code 405 (Method Not Allowed)    if the method is known by the origin server but not allowed for the    requested resource, and 501 (Not Implemented) if the method is    unrecognized or not implemented by the origin server. The methods GET    and HEAD MUST be supported by all general-purpose servers. All other    methods are OPTIONAL; however, if the above methods are implemented,    they MUST be implemented with the same semantics as those specified    in section 9. &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;h3 style="text-align: justify;"&gt;&lt;a id="sec5.1.2"&gt;5.1.2&lt;/a&gt; Request-URI&lt;/h3&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    The Request-URI is a Uniform Resource Identifier (section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.2"&gt;3.2&lt;/a&gt;) and    identifies the resource upon which to apply the request. &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;pre&gt;       Request-URI    = "*" | absoluteURI | abs_path | authority&lt;br /&gt;&lt;/pre&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    The four options for Request-URI are dependent on the nature of the    request. The asterisk "*" means that the request does not apply to a    particular resource, but to the server itself, and is only allowed    when the method used does not necessarily apply to a resource. One    example would be &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;pre&gt;       OPTIONS * HTTP/1.1&lt;br /&gt;&lt;/pre&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    The absoluteURI form is REQUIRED when the request is being made to a    proxy. The proxy is requested to forward the request or service it    from a valid cache, and return the response. Note that the proxy MAY    forward the request on to another proxy or directly to the server &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    specified by the absoluteURI. In order to avoid request loops, a    proxy MUST be able to recognize all of its server names, including    any aliases, local variations, and the numeric IP address. An example    Request-Line would be: &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;pre&gt;       GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1&lt;br /&gt;&lt;/pre&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    To allow for transition to absoluteURIs in all requests in future    versions of HTTP, all HTTP/1.1 servers MUST accept the absoluteURI    form in requests, even though HTTP/1.1 clients will only generate    them in requests to proxies. &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    The authority form is only used by the CONNECT method (section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.9"&gt;9.9&lt;/a&gt;). &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    The most common form of Request-URI is that used to identify a    resource on an origin server or gateway. In this case the absolute    path of the URI MUST be transmitted (see section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.2.1"&gt;3.2.1&lt;/a&gt;, abs_path) as    the Request-URI, and the network location of the URI (authority) MUST    be transmitted in a Host header field. For example, a client wishing    to retrieve the resource above directly from the origin server would    create a TCP connection to port 80 of the host "www.w3.org" and send    the lines: &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;pre&gt;       GET /pub/WWW/TheProject.html HTTP/1.1&lt;br /&gt;     Host: www.w3.org&lt;br /&gt;&lt;/pre&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    followed by the remainder of the Request. Note that the absolute path    cannot be empty; if none is present in the original URI, it MUST be    given as "/" (the server root). &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    The Request-URI is transmitted in the format specified in section    3.2.1. If the Request-URI is encoded using the "% HEX HEX" encoding    &lt;a rel="bibref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec17.html#bib42"&gt;[42]&lt;/a&gt;, the origin server MUST decode the Request-URI in order to    properly interpret the request. Servers SHOULD respond to invalid    Request-URIs with an appropriate status code. &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    A transparent proxy MUST NOT rewrite the "abs_path" part of the    received Request-URI when forwarding it to the next inbound server,    except as noted above to replace a null abs_path with "/". &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;pre&gt;      Note: The "no rewrite" rule prevents the proxy from changing the&lt;br /&gt;    meaning of the request when the origin server is improperly using&lt;br /&gt;    a non-reserved URI character for a reserved purpose.  Implementors&lt;br /&gt;    should be aware that some pre-HTTP/1.1 proxies have been known to&lt;br /&gt;    rewrite the Request-URI.&lt;br /&gt;&lt;/pre&gt; &lt;/div&gt;&lt;h3 style="text-align: justify;"&gt;&lt;a id="sec5.2"&gt;5.2&lt;/a&gt; The Resource Identified by a Request&lt;/h3&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    The exact resource identified by an Internet request is determined by    examining both the Request-URI and the Host header field. &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    An origin server that does not allow resources to differ by the    requested host MAY ignore the Host header field value when    determining the resource identified by an HTTP/1.1 request. (But see    section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.6.1.1"&gt;19.6.1.1&lt;/a&gt; for other requirements on Host support in HTTP/1.1.) &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    An origin server that does differentiate resources based on the host    requested (sometimes referred to as virtual hosts or vanity host    names) MUST use the following rules for determining the requested    resource on an HTTP/1.1 request: &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    1. If Request-URI is an absoluteURI, the host is part of the      Request-URI. Any Host header field value in the request MUST be      ignored. &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    2. If the Request-URI is not an absoluteURI, and the request includes      a Host header field, the host is determined by the Host header      field value. &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    3. If the host as determined by rule 1 or 2 is not a valid host on      the server, the response MUST be a 400 (Bad Request) error message. &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    Recipients of an HTTP/1.0 request that lacks a Host header field MAY    attempt to use heuristics (e.g., examination of the URI path for    something unique to a particular host) in order to determine what    exact resource is being requested. &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;h3 style="text-align: justify;"&gt;&lt;a id="sec5.3"&gt;5.3&lt;/a&gt; Request Header Fields&lt;/h3&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    The request-header fields allow the client to pass additional    information about the request, and about the client itself, to the    server. These fields act as request modifiers, with semantics    equivalent to the parameters on a programming language method    invocation. &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;pre&gt;       request-header = Accept                   ; Section 14.1&lt;br /&gt;                    | Accept-Charset           ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.2"&gt;14.2&lt;/a&gt;&lt;br /&gt;                    | Accept-Encoding          ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3"&gt;14.3&lt;/a&gt;&lt;br /&gt;                    | Accept-Language          ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4"&gt;14.4&lt;/a&gt;&lt;br /&gt;                    | Authorization            ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.8"&gt;14.8&lt;/a&gt;&lt;br /&gt;                    | Expect                   ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.20"&gt;14.20&lt;/a&gt;&lt;br /&gt;                    | From                     ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.22"&gt;14.22&lt;/a&gt;&lt;br /&gt;                    | Host                     ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23"&gt;14.23&lt;/a&gt;&lt;br /&gt;                    | If-Match                 ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.24"&gt;14.24&lt;/a&gt; &lt;/pre&gt; &lt;pre&gt;                      | If-Modified-Since        ; Section 14.25&lt;br /&gt;                    | If-None-Match            ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.26"&gt;14.26&lt;/a&gt;&lt;br /&gt;                    | If-Range                 ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.27"&gt;14.27&lt;/a&gt;&lt;br /&gt;                    | If-Unmodified-Since      ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.28"&gt;14.28&lt;/a&gt;&lt;br /&gt;                    | Max-Forwards             ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.31"&gt;14.31&lt;/a&gt;&lt;br /&gt;                    | Proxy-Authorization      ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.34"&gt;14.34&lt;/a&gt;&lt;br /&gt;                    | Range                    ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35"&gt;14.35&lt;/a&gt;&lt;br /&gt;                    | Referer                  ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.36"&gt;14.36&lt;/a&gt;&lt;br /&gt;                    | TE                       ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.39"&gt;14.39&lt;/a&gt;&lt;br /&gt;                    | User-Agent               ; Section &lt;a rel="xref" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43"&gt;14.43&lt;/a&gt; &lt;/pre&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;    Request-header field names can be extended reliably only in    combination with a change in the protocol version. However, new or    experimental header fields MAY be given the semantics of request-    header fields if all parties in the communication recognize them to    be request-header fields. Unrecognized header fields are treated as    entity-header fields. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6555867709451033941-5445682627795237093?l=etechtrix.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://etechtrix.blogspot.com/feeds/5445682627795237093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6555867709451033941&amp;postID=5445682627795237093' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/5445682627795237093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6555867709451033941/posts/default/5445682627795237093'/><link rel='alternate' type='text/html' href='http://etechtrix.blogspot.com/2007/12/http-request.html' title='HTTP Request'/><author><name>Parry</name><uri>http://www.blogger.com/profile/07780535252161172528</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
