Showing posts with label Web. Show all posts
Showing posts with label Web. Show all posts

Thursday, 17 January 2013

About The Meaning Of Colours...

This post collects a couple of 'good' posts about the meaning and psychology of colours:
As someone said: "Never use pure black, it does not exist in nature!"

Monday, 3 September 2012

Spring MVC-Service-DAO-Persistence Architecture Example

It is considered good practice to use modularity across Spring web applications. It keeps them maintainable and testable. This can be achieved by using controllers, services and data access objects (DAO). Typically, a user request is handled by a controller, which calls a service, which calls a data access object, which calls the persistence layer implementation.

Using services means that application functionalities can be tested without a test framework simulating user calls to controllers. Separating services from the persistence layer implementation via DAO, allows using an in-memory database (for example) by substituting production DAO implementations, by test DAO implementation pointing to an in-memory database.

The code example used in this post is available from Github in the Spring-MVC-Service-DAO-Persistence-Architecture directory. It is a variation of the Spring Web JPA Hibernate In-Memory example.

MVC Controller Calls The Service Implementation

The following controller is injected with an implementation of MyService. It handles /roundtrip user calls by calling its create() and Retrieve(id) methods, which creates and retrieves an instance of a MilliTimeItem object. It contains a unique ID and a timestamp in milliseconds.
@Controller
public class MyController {

    @Autowired
    private MyService myService;

    @RequestMapping(value = "/")
    public String home(Model model) {
        return "index";
    }

    @RequestMapping(value = "/roundtrip")
    public String persistenceStatus(Model model) {

        long id = myService.create();
        MilliTimeItem retr = myService.retrieve(id);
 
        model.addAttribute("RoundTrip", retr);
 
        return "roundtrip";

    }

}

Service Implementation calls Data Access Objects (DAO)

The DAO is injected in the MyService implementation. The createAndRetrieve() calls the DAO createMilliTimeItem() and getMilliTimeItem() methods. It returns the created and retrieved item.
public class MyServiceImpl implements MyService {

    @Autowired
    private MyPersistenceDAO myDAO;

    @Transactional
    long create();
 
    @Transactional
    MilliTimeItem retrieve(long id);

}

Data Access Object Implementation Calls The Persistence Layer

The DAO implementation is injected with the JPA EntityManager:
@Repository
public class MyPersistenceDAOImpl implements MyPersistenceDAO {

    @PersistenceContext
    private EntityManager em;

    @Override
    public long createMilliTimeItem() {
 
        MilliTimeItem mti = new MilliTimeItem();
        mti.setMilliTime(System.currentTimeMillis());

        em.persist(mti);
        long result = mti.getID();
        em.detach(mti);
 
        return result;
 
    }

    @Override
    public MilliTimeItem getMilliTimeItem(long id) {
        return em.find(MilliTimeItem.class, id);
    }

}

Running the Example

After compiling this example with Maven, it can be run with mvn tomcat:run. Then, browse http://localhost:8585/spring-mvc-service-dao-persistence-architecture/.

The generated output is:
Created MilliTimeItem's ID: 1
Created MilliTimeItem's value: 1346691836108

More Spring related posts here.

Wednesday, 15 August 2012

How Bad Traffic Kills Your Earnings (and Solution)

A quick post to share some interesting insight I experienced recently on my blog. It receives traffic from all over the world. But recently, I noticed a peak from Russia. I checked the Referring URLs to my blog in the Stats > Traffic Sources menu.

Referring URL - Bad Traffic


All this traffic was coming from the same referring URL. At the beginning, I was not really concerned by this, but it became more and more annoying. I was trying to perform some statistical analysis, and I knew this traffic was nothing but bad data.

I decided to report it to Google via this page. Within two days, this traffic was gone. Then, something unexpected happened. I was monitoring my Page RPM (revenue per mille, or per thousand page impression) from my AdSense account. It got multiplied between 5x - 10x. My good versus bad traffic ratio was miles from this ratio.

In other words, a site with 10 000 views with a RPM of 0.10$ and (say) 15% bad traffic would generate 1$. After removing the bad traffic, and assuming a 7x increase in RPM, it would generate 10 000 * 85% * 0.1 * 7 = 5.95$. That is, an extra 4.95$.

Conclusion: bad traffic kills your earnings! Get rid of it!

Saturday, 11 August 2012

Blogging - Silly Mistakes Hampering Traffic Development

This is a checklist of silly mistakes one can easily correct to improve blog traffic:
  • Ugly Layout - A bad looking blog, with a bad or lazy layout, but still readable will only succeed if it has fantastic and valuable content for its readers. But then again, why shoot yourself in the foot by giving a bad first impression? Why make it hard to the eye for the user? On the other side, a very good looking blog without valuable content never takes off (especially on the long term).
  • Colors - Never use black as a color. It is not a natural color.
  • Spelling & Grammar Mistakes - There is an inverse correlation between page ranking and the number of spelling and grammar mistakes on a blog. The more mistakes, the lower the ranking.
  • Broken links - Broken links are an extremely frustrating experience to readers, especially when they are visiting your blog for the first time. It is a big indicator of its quality and people often stick to first impressions. Broken links kill your returning visitors rate. Yet, there is a simple and free tool available online to detect broken links on your blog. Use it.
  • Internal links - Make cross references (i.e., links) between your posts if these are relevant to the topic or for the user. It will ease the navigation on your blog, which is good for the reader.
  • Same Post Title - I made the silly mistake of using the same title on multiple post: Summary - Part I, Summary - Part II, Summary - Part III... This is not a good idea since post titles are often used by Google to differentiate them. These are also (often) displayed when people make searches. If a title does not inform the user of the content of the post, change it to include words related to the content.
  • Keywords in URLs - A little boost in ranking is to use keywords related to the content of your post in the URL. If you did not use that trick for existing posts, never mind. Leave it for new posts only.
  • Keywords in Titles - Proper keywords related to the content of posts are important not only for search engines ranking, but also when users make searches and scan results for valuable links. A post title is a front door. Make sure all your posts have relevant keywords in their titles.
  • Small Posts Don't Count For Much - Unfortunately, I can't find the reference anymore, but someone mentioned that Google more or less ignores posts containing less than 250-300 words. I could not find any confirmation of this, but somehow, it makes sense. Blogging is not Tweeting. Blogging is about substance.
  • No Translation Widget - The moment I added a translation widget on my blog, I started receiving traffic from all over the world.
  • No Social Buttons - You need to give means to visitors to share your blog posts. This is so easy to achieve with ShareThis for example. I explain how to achieve this in another post.
  • No 'Search This Blog' Widget - Returning visitors may remember one of your posts, but can't find it anymore. This widget will help them find it again. If you don't add this widget, there is a higher probability that they will give up.
  • No Subscription Widget - Some of your readers will be interested in your new posts. You have to provide them means to subscribe to your blog by email or with feeds. Install the corresponding widgets.
  • No Followers Widget - Build a crowd of followers by allowing them to join your blog. Add the corresponding widget.
  • Not Enabling Comments - Let people participate to the dynamics of your blog. Let them put comments on your posts. You always have the possibility to filter these if necessary.
  • No Labels On Posts - Labels are a mean to tag your posts (at least on Blogger). For example: vegetarian recipe, chicken recipe, etc... Have them displayed below each post. They will appear as links that users can click. If they do so, they will access all posts having the corresponding tag. This is great for navigating between posts.
  • No Navigation Links - On Blogger, use pages (you have maximum 20 per blog) to create menu pages, then install the page widget to let readers access them. It is another mean to organize your blog and make it accessible to users.
  • No Feedback Widget - Readers like to read feedback information about your blog (for example, with the statistic widget). I personally love the popular widget, which displays the most popular posts on your blog. Readers are interested in this information.
  • Not Listing Your Blog - On Blogger, make sure the visibility of your blog is set to true in the settings. It will be listed on Blogger and accessible by all search engines. Think about Technorati listing to have an idea of how you blog fares compared to other blogs.
  • Low Stamina Posting - That is the ultimate traffic killer. Blogging is nothing less than running a marathon. You need to post frequently and have at least 50-100 relevant and valuable posts before raising significant and regular traffic. Don't be obsessed about posting exactly 2 posts per day, and don't wait until you have 30 post before dumping them all. Just post them as they are ready. Don't strategize, it does not help with traffic. Do post often.
  • Quality vs Quantity - If you have 20 posts and meet all quality requirements described above, it won't help with traffic. You may see small spikes in traffic as you work on quality, but it will not be sustainable. When it comes to blogging, quantity trumps quality (unless content is mediocre). In other words: quality support quantity, but not the other way round.
More web related posts here.

Sunday, 5 August 2012

Free Online Web Tools (Best Of)

My personal web related best of free online tools. Updated as necessary.

Javascript & CSS

HTML

  • Special Characters - To find the HTML equivalent of special characters (for example, accentuated characters).
  • Shape Catcher - Help finding a unicode character by recognizing its shape.

Image, Colors & Backgrounds

  • Color Scheme Designer - Very useful to create color palettes.
  • Pattern Designer - Really nice patterns.
  • Smush It - To compress a set of images.
  • JPEGMini - To reduce JPEG images in size without loosing quality.
  • SpritePad -  Simple & useful tool to generate the CSS for sub-images embedded in a larger image (i.e., sprites). The purpose is to reduce the number of requests to the server to fetch images.
  • Background Patterns - Great online tool to generate nice background patterns.

SEO

  • See the Web/SEO page, in the Tools section.

Website


More Web related posts.

Wednesday, 9 May 2012

How To Estimate Another Website's Traffic?

I used to think that estimating another website's traffic was impossible if one did not have access to its raw data.

I noticed several free online services ready to suggest numbers. I took some time to check them and their data. I found the data results to be 3 times as high as the lowest data for a given URL. This was quite frustrating. Pretty useless and unreliable.

Fortunately, after a lot of research, I found compete.com which has a solid source of real user data. It provides a good statistical estimation of unique visitors per month. The only drawback is that it only focuses on U.S. population. But, it is still a very good start (probably the best estimator).

Recently, I also found Google's AdPlanner which provides great monthly data in addition to demographic data. It seems like you need a Google account to access it.

For daily page views and unique visitors, I used to found StatShow to be more or less realistic and a bit on the conservative side. But, recent tests with some blogs I own now show completely false and unrealistic results. It is out of my list.


If you know a free online tool which is more reliable, please put a comment and I will add the link to this post.

More free online web tools (best of) here.

Tuesday, 8 May 2012

How To Perform A Keyword Traffic Analysis

Google AdWord Tools and Analysis TabThis post is about learning how to perform a keyword analysis for traffic using Google AdWord's Keyword Tool.  You will need an AdWord account for this. If necessary, apply for one. Then log into AdWord and select the Tools & Analysis tab.

The keyword tool is a mean to estimate how much traffic and user searches is generated according to some words carefully selected by you. Using a metaphor, such traffic can be compared to water flowing in a pipe. The end destination are web pages. The valves and the pipe connections are the key influential words you have selected. They influence the debit and the type of user flow delivered to those web pages.

Performing a keyword analysis is about identifying and estimating the quality and the debit of user flow (traffic) to web pages containing those keywords. It is not about implementing a keyword strategy. This comes after the analysis. The product is this analysis is a set of traffic generating keywords.

What is at Stake?

As a website publisher, you want to make sure the user traffic you receive matches your website content. If you are discussing jam recipes, car sellers will not be interested. It is even more important if you plan to put advertising on your pages. As an advertiser, you want to make sure your ads are displayed to users interested in your products or services. Therefore, you need to be positioned on proper web pages made available by publishers willing to accept advertising.

From a publisher's perspective, even though the keyword tool is primarily developed for publishers planning to put ads on their web pages, it can also be used by those who don't plan to put ads on their pages. For example, if you need users to register to your website to access a service, you have the same goal as an advertiser willing to attract relevant traffic to its ads.

Google AdWord (or any other ad network) acts as facilitator for advertisers willing to find locations for their ad inventory. Advertisers specify the keywords they have selected for their ads and AdWord is in charge of displaying these on suitable web page made available by publishers.

Google AdSense (or any other ad network) acts as facilitator for publishers searching for advertisements for their web page inventory. They make sure their pages are properly identifiable with keywords. AdSense is then responsible for displaying the best suitable ads from advertisers to these pages.

Of course, all this happens for a fee that advertisers pay to Google for publishing ads. A percentage of that fee is paid to the publisher by Google. The difference is a commission Google keeps for its matching (facilitator) role. An advertiser and an publisher could talk directly to each other, but they would have to organize the connection between ads and web pages themselves, which has a cost in time and resources.

How is Efficiency Measured?

From an advertiser's perspective, you want the maximum number of user to click on your ad per ad display (or impression). This is called the CTR for click through rate. It is measured as a percentage. The higher the better for the advertiser.

One way to reward the publisher is to pay a commission per ad click. This is called PPC or (CPC) for pay per click (or cost per click). In this case, it is also in the publisher's interest to maximize the CTR to maximize its commission. If Google does not match ads and pages correctly, the advertiser will be disappointed by the results of its campaign and Google will loose their future ad inventory. If this happens, then it does not have anything to offer to publishers, which will be then disappointed too and reduce their web page inventory offer to Google. Hence, it is also in Google's interest to maximize the CTR.

The publisher may not be satisfied with being paid only when there is an ad click. On the other side, the advertiser may not be interested in paying for each click and will prefer to pay per impressions. The price to pay is then called CPM (or CPI) for cost per mille (or cost per impression). CPM is a cost per thousand impressions (or ads display on publisher's web pages). In this case, it is also in everyone's interest to maximize the CTR.

This explains why advertisers are ready to pay more for higher CTR and why it is in the publisher's interest to match its content to proper keywords. Cheating or failing will only reduce the number of clicking users and therefore, commission.

Now, some advertisers only want to pay when there is a real sell (or an action), eventually after a user has clicked on an ad. This is called CPA (or PPA) for cost per action (or pay per action). They are ready to pay a much higher commission when this happens. In this case, it is also in everyone's interest to maximize CTR, since if there is no click, there is no possibility for subsequent actions and sales.

But CTR is not the only efficiency factor to be taken into account, volume (or traffic) is also as important.

From a PPC perspective, everyone remains happy to see a high CTR (the higher the traffic), since advertisers get more customers and publishers get more commission. From a CPM perspective, advertisers will be interested in the quality of the traffic. If it does not match their keywords, CTR will plummet and they don't want that (low bang for the buck). So they need a mean to control this. From a CPA perspective, the publisher is interested in the quality of the traffic, because it wants users to click on the ad in order to trigger a possible sell (or action) behind this. So they need a mean to control this too.

How to Control Traffic Quality and Quantity

Back to the keyword tool screen. On the left column, there is a Match Type box. It controls the connection between keywords and the users' queries. There are three types of "valves".

Broad means that if keywords appear at least once in a user search request, it counts as traffic. This means more traffic in general and more flow to web pages, but not necessarily of quality. If the keywords are 'Victorian Furniture', the 'Victorian wood furniture' search will count as traffic as well as 'furniture'. If you are an advertiser for Victorian era furniture, you will not be interested in all users querying about 'furniture'. It can be a low bang for the buck situation.

Exact means the keywords must match the user query exactly, in the same order (not more, not less) to be considered as traffic. The advertiser for Victorian furniture will be interested in this option, because it is obvious that the user shows interested when typing 'Victorian furniture'. It is a high bang for the buck situation. However, such option will miss 'Victorian wood furniture' which is interesting traffic too.

Phrase means that if keywords appears in that order in a phrase, it counts as traffic. If a user types 'Victorian furniture book', the advertiser will get this traffic, but he won't get 'Victorian wood furniture' traffic. He will also get 'Victorian furniture reparation' traffic as well as 'Victorian furniture destruction' too.

A publisher will mostly be interested in phrase traffic, unless he develops a niche website about selling and buying Victorian furniture. In this case, the exact option will be more appropriate to evaluate traffic.

How to Use the Keyword Tool


  1. After selecting the match type (broad, exact or phrase), type in a word or phrase such as orange paint for example.
  2. You can control additional search options such a location and language, etc...
  3. Google AdWords displays results for orange paint for example: around 14000 monthly searches globally.
  4. But, it also displays keywords ideas which could be related to orange paint too. This where publishers can find extra keyword ideas for their pages, together with an estimation of users searches (i.e., potential traffic)
Publisher should use this tool iteratively, to search for new keywords, earlier suggestions, or using synonyms. Each valuation combination should be written down with potential traffic. This collection of keywords can then be used in web pages to capture corresponding traffic.

There is another tool for advertisers called the traffic estimator. For a given keyword set and given budget, it provides an estimation of daily clicks, impression, CTC and average CPC. We will not cover this here, but it is easy to use and well documented.

Conclusion

Performing a keyword traffic analysis is pretty easy and only requires understanding a couple of simple principles. It is a huge traffic differentiator between websites implementing a proper keyword strategy and those who don't.

Friday, 23 September 2011

Noca vs Authorize.net: Which is the best option?

Recently, Noca announced simplified online payment rates on Hacker News. These are certainly appealing and sexy. Noca also claims one can "start accepting payments on websites withing minutes". Reduced online payment transactions cost within minutes? I decided to give it a try. Here are my findings.

An attempt at Noca
The registration process was straight forward. No issues encountered. Then, I took a look at their developer's page. I followed the instructions, but found them a little rough. I send an email for clarification and received an answer within hours.

I tried to make their Iframe and Redirect solution work, but never managed to make it work. I did not find the logos very sexy, but then again, this is cosmetics. I am interested in cost reduction. So I decided to try the Lite API page generating code.

I plugged some "code for testing" in a page. This redirected me to their sandbox payment page. I filled in some information, and clicked on accept payment. I got an eternal "Processing, please wait" message. I did not like it. If the simplest implementation they are suggesting does not work in the test environment, what about production? What about customer experience? Very bad first impression so far. I sent an email to support and received a quick answer saying their engineers were taking a look at it.

I tried to make my first pages work again, in order to make a direct payment. I was redirected to an empty blank page with no message. I sent another email to support and got a response saying they took a look at their log and it seems that the issue was caused by an invalid email address. They are working on providing better error messages.

Fair enough, I did not enter a valid email address. Noca's website does mention that issues will happen if fields are not properly encoded. But, I find this an unreasonable expectation. I know that customers DO make errors and ending on an empty web page is not acceptable. I don't want to be associated with this level of service.

Revisting Authorize.net
While waiting for answers from Noca, I decided to take a look at Authorize.net again. I had visited their website some time ago and did find the AIM solution interesting, but it was a lot of work to integrate. The barrier to entry was pretty high.

However, they have now provided several development kits for PHP, Ruby, Java and C#. I tried the Java solution and within two hours, I managed to make their example work like a charm in my small test application. Obviously, these examples have been properly tested and documented.

Who has the best offer and the best business model?
I did not experience the "start accepting payments on websites withing minutes" claim from Noca, even when following their recommendations. I made further research on Noca and found this company was founded in 2009.

Every market has its sweet spot. There is only so much money you can make and there is an unbreakable minimum amount of profit one must make in order to operate it and be sustainable. The question I have is: a) does Noca have a real mean to reduce online payment costs? or b) is it only cutting on its margins hoping to grow its revenues with a larger future customer base?

In both cases, Noca needs to make its barrier to entry lower from a technical perspective. Ideally, a tested kit would be the first step. Next, a better set of error messages and a more sexy interface would be necessary. This is not very hard to achieve considering what they have achieved so far.

If Noca is strictly relying on b), then it does not have a sustainable business model to thrive, since it operates below the market's natural sweet spot. We are not in a first-to-market situation anymore. Noca will only become a major player if it has a disruptive solution to cut costs. If so, and if I was leading that company, I would talk to investors and raise cash to hire good engineers in order to provide a stronger API.

Merchant and vendors would naturally rush to Noca. No need for expensive marketing campaigns.

Conclusion
I don't care if Noca operates only in the U.S., even if my needs are international. I will always be happy to find ways to cut my costs, especially in a large market.

So far, I am not ready to rely on Noca. Even if Authorize.net is more expensive, I would rather pass the cost to the customer, than take the risk of loosing them on a bad experience or weak interface.

P.S.: For the record, I am not affiliated with Noca, Authorize.net or any other company offering online payment solutions. I am just your average software engineer.