Atlantic Business Technologies, Inc.

Author: Atlantic BT

  • 8 Steps to Keeping Your Search Engine Optimization Plan on Track

    One of the things that makes search engine optimization so tough, from a client’s point of view, is that it’s more about willpower than it is about expertise. The greatest consultant in the world can come in and lay out a plan that will help you reach the top of Google, Yahoo, and Bing, but unless they’re generating all of the content, you’re still going to have to devote some time or money to making it a reality.

    There’s no way around it: search engine spiders love words, and so you’re going to have to find a lot of fresh ones if you’re going to make it to the top. As easy as it is to say we’re going to come up with a new blog post every few days, the reality is that the task leaves most of us just the way we were in high school – putting off our writing assignments until later, or even skipping them altogether.

    Without fresh content, however, your online business is bound to get a failing grade. Here are a few steps you can take to keep your search engine efforts moving forward:

    1. Make SEO a priority.

    If adding material to your site becomes just another in a long list of “to-do’s,” it’s very unlikely to ever actually get done.  Finding your way to the top of the search engine rankings for a profitable keyword is akin to trying to move your business onto one of the busiest streets in the world, and achieving that goal takes time and effort.  Try to keep that perspective and let it motivate you to post more.  Unless SEO is a major goal for your business, it’s probably not going to get the attention it deserves.

    2. Set realistic goals.

    By trying to write too much material, or gather too many pieces of information in a short amount of time, you aren’t being ambitious, you’re setting yourself up for failure.  Like the dieter who vows to never taste chocolate again, the marketer who sets a goal of writing three articles a day is only kidding themselves.  Setting achievable goals isn’t just less stressful; it’s more productive.

    3. Stick to schedule.

    Once you’ve established a plan you can live with, you have to stick to it.  Pencil in your SEO time the same way you would an important meeting.  Even if it’s just fifteen minutes a day to spend writing or finding resources, it’s critical that you do it and keep moving forward.  It’s easy to get so swept away with day-to-day business issues that you forget, but it only takes a little lost momentum to throw your plan off track.

    4. Get organized.

    You should have some sort of log or spreadsheet that shows what topics and keywords you’ve worked with, as well as which ones you plan to add to in the future.  Filling it in can provide you with valuable focus and motivation during those times when you’d rather not bother with writing or posting material, as well as making sure you don’t duplicate your efforts.

    5. Pay attention.

    Sometimes the market changes – people begin searching for new answers, leading to an entirely different set of core keywords for your SEO plan.  That doesn’t have to mean you abandon your efforts, but it might indicate that you should alter your approach.  You can’t make that determination, however, if you’re not paying attention to what your customers are thinking and talking about.

    6. Track your results.

    Some business owners get so caught up in the doing part of SEO that they neglect to check and see if it’s actually working.  Keep tabs on how many visitors your pages are tracking, how long people are staying to read or shop, which keywords are drawing the most sales, and so on.  You can’t build an effective campaign without feedback, so keep your ear to the ground, virtually speaking.

    7. Keep an idea file.

    It’s very hard to just sit down and add content to your website out of nothing. That’s why it’s a good idea to keep a notebook or computer file where you can record thoughts for upcoming topics. Then, when you need one, you’ll have inspiration at your fingertips.

    8. Practice patience.

    SEO, like most marketing practices, is a slow science.  It can take weeks or months to work, not days.  Realize that from the outset and plan your business accordingly.  The orders might not start flying in overnight, but if you follow the right steps and add lots of fresh new content to your site, it will pay off in a big way.

    Sticking to your search engine optimization plan might feel like a chore, but if you can follow these tips and keep your site constantly updated, you’ll eventually learn why so many companies love it.  Coming up with content isn’t always easy, but writing on your site is like writing a check to yourself in the future.

  • Is Your Website Optimized for Keywords…or Conversions?

    atmOne of the greatest things about web marketing is that once you’ve found a winning formula, it can continue to work consistently – even without further changes. In other words, as long as you know you’re getting a certain amount of traffic, then over time you are very, very likely to keep getting new leads and new sales at the same percentage rate. Your website becomes a cash machine, and all you have to do is keep it running.

    As wonderful as that dynamic is, however, it’s not always so straightforward to achieve in the real world. For example, some pages fail to convert a high enough percentage of visitors to make money or prices and trends change so quickly that they force the marketer or business owner to move in a new direction. An even greater obstacle is finding sufficient numbers of visitors in the first place, especially in a way that makes the effort cost-effective. It’s no use bringing in hundreds or thousands of fresh buyers if you are losing money on transactions.

    Because of this, many companies focus on bringing ever-greater amounts of traffic to their sites. Their reasoning is sound, at least at first glance: find enough new prospects, and you are bound to close at least some of them.

    Be very careful with that assumption. As important as search engine optimization and marketing programs are, it is not hits, impressions, or page views that add digits to your bottom line – it’s sales. Here are a few things to keep in mind as you consider your online marketing strategy:

    Consider your audience

    If you post about things people care about, then they’ll come to read or look at what you’ve put online. Marketing in a way that speaks to your audience isn’t exactly groundbreaking, but it’s becoming more vital than ever in a climate where so many companies are trying to blast customers with too many messages and ideas.

    If you’re ever in doubt about what’s on your customers’ minds, there’s a simple solution: ask them. Often, it takes very little (in the way of money or programming time) to add a forum or feedback section, but taking that small step can yield you quite a bit of insight into the minds of the men and women who are buying from you. Use it to take their pulse now and again, and then add content that speaks to their hopes, concerns, and needs.

    Think quality, not quantity

    quality-sealProbably the biggest sin marketers make online in focusing too much on traffic statistics is trying to cram more pages, articles, blog posts, and other updates than they can manage and still maintain a certain level of quality and originality. It’s the old spaghetti approach: throw enough keywords against the wall, and some should stick.

    Unfortunately, marketing hardly ever works that way – online or off. People read, visit, and shop on the websites they do because they find them to be helpful, informative, or entertaining, not because they care what’s tucked into the page header or embedded links. For that reason, it makes a lot more sense to add to your site the way you would a gourmet dinner, letting quality ingredients simmer together rather than dashing everything on the plate at once.

    Get specific

    In recent years, it’s become popular to talk about “long tail” searches and keywords, and for good reason – they offer the best of all possible business worlds. Because they’re more specific, they give marketers the opportunity to focus their efforts on one or two small areas and dominate them with relatively little effort. And, as an added bonus, long tail terms generally convert a much larger percentage of visitors than their more general, more expensive counterparts.

    The toughest part of executing a long tail strategy, for most companies, isn’t in making it work, but finding the right phrases to start with in the first place. It doesn’t have to be difficult, though; just think of what it is your business does better than any other and begin with that. From there, a good web design firm or online marketing professional should be able to help you find the right keyword combinations, not to mention track the results.

    Traffic is important to online sales, but bringing in visitors doesn’t automatically mean that you’re going to start making more money. In order to convert viewers into buyers, you need to find the right ones and present them with a compelling reason to do business with you. That’s the real name of the game, and it’s harder than simply optimizing your site for search engines and waiting for the orders to come in.

  • ASP.NET MVC: Using Ajax, Json and PartialViews

    While working on a new ASP.NET MVC project, I had a simple objective: add a new record and refresh my View. After sifting through several sites I found several resources that lead me to accomplish my goal.

    I’ve compiled my result into a new sample MVC Application that I created in Visual Studio. I’ll explain what I did using that as my reference. It’s a trimmed down version of what I did on the actual project, but it will get the point across.

    Let’s assume we want to have a View that lists some People from our data source. I started out by creating a Person data model:

    public class Person { public Guid Id { get; set; } public String FirstName { get; set; } public String LastName { get; set; } public Person() { Id = Guid.NewGuid(); } }

    Next, I created some ViewModels so that I can work with strongly typed Views:

    public class PersonIndexViewModel { public PersonListViewModel PersonListModel { get; set; } public AddPersonViewModel AddPersonModel { get; set; } } public class PersonListViewModel { public List PersonList { get; set; } } public class AddPersonViewModel { public String FirstName { get; set; } public String LastName { get; set; } }

    Next, I added a People folder in my Views folder and created a strongly typed Index View on my PersonIndexViewModel. I started out with building a table and doing a foreach to display each Person object. I moved that into a PartialView (.ascx) by creating a ParitialView in my Views/Shared folder (This blog post is very helpful for showing you how to use PartialViews). I called that PersonList.ascx and that is a strongly typed partial view on my PersonListViewModel.

    Now, I can update my View to display that PartialView with this code:

    <% Html.RenderPartial(“PersonList”, Model.PersonListModel); %>

    Next, I want to be able to perform a delete action to remove a Person from the DB. You’ll notice I’m using an Ajax.ActionLink in my PersonList PartialView so that I can perform the delete with Ajax.

    <%= Ajax.ActionLink(“delete”, “JsonDelete”, “People”, new { Id = person.Id }, new AjaxOptions { Confirm = “Are you sure you want to Delete this Person? This action cannot be undone.”, HttpMethod = “Delete”, OnComplete = “JsonDelete_OnComplete” })%>

    In the ActionLink, I specify the Action I want to call, pass the Person.Id and in the AjaxOptions I defined a JavaScript method that should be called on complete. In my People Controller I can now add the JsonDelete method:

    [AcceptVerbs(HttpVerbs.Delete)] public JsonResult JsonDelete(Guid Id) { // call your Repository to delete the Person bool result = _personList.Remove(toDelete); // return a Json Object, you could define a new class return Json(new { Success = result, Message = result ? “The person has been deleted!” : “Error!” }); }

    You would call your Repository to delete that Person and then return a new Json Object. What I did was define a couple of properties that I will reference from the JavaScript function to give feedback to the user. Here is the JavaScript function:

    function JsonDelete_OnComplete(context) { var JsonDelete = context.get_response().get_object(); if (JsonDelete.Success) { $(this).parents(‘tr.item’).remove(); } $(“#message”).html(JsonDelete.Message); }

    I found this link that showed me how to use “context.get_response().get_object();” to get the Json Object in JavaScript.

    Now that I can delete, the next logical step would be the ability to add a new Person. I’ll start out by creating a new form that uses my AddPersonViewModel Model:

    <% using (Ajax.BeginForm(“JsonAdd”, “People”, new AjaxOptions { OnComplete = “JsonAdd_OnComplete” })) {%> <fieldset> <legend>Add a Person</legend> <%= Html.LabelFor(model => model.AddPersonModel.FirstName)%>: <%= Html.TextBoxFor(model => model.AddPersonModel.FirstName, new { @class = “firstname” })%> <%= Html.ValidationMessageFor(model => model.AddPersonModel.FirstName)%> <%= Html.LabelFor(model => model.AddPersonModel.LastName)%>: <%= Html.TextBoxFor(model => model.AddPersonModel.LastName, new { @class = “lastname” })%> <%= Html.ValidationMessageFor(model => model.AddPersonModel.LastName)%> <input id=”AddBtn” name=”AddBtn” type=”submit” value=”Add” /> </fieldset> <% } %>

    Again, I use the Ajax.BeginForm to set the Action to call and define a JavaScript function to call on complete. To my Controller I add:

    public JsonResult JsonAdd(AddPersonViewModel AddPersonModel) { … Person newPerson = new Person { FirstName = AddPersonModel.FirstName, LastName = AddPersonModel.LastName }; // call your Repository to add the new Person _personList.Add(newPerson); // return a Json Object, you could define a new class return Json(new { Success = true, Message = “The person has been added!”, PartialViewHtml = RenderPartialViewToString(“PersonList”, new PersonListViewModel {PersonList = _personList}) }); }

    One important thing here is the method “RenderPartialViewToString”. I ran across this which was a tremendous resource in solving my problem here, which was returning a Json Object with a rendered PartialView so that I could use JavaScript/jQuery to update the page.

    The post I referenced above showed where you needed to create a base Controller to inherit from and that Controller defines the methods which will return a PartialView as an HTML string:

    public abstract class BaseController : Controller { protected string RenderPartialViewToString() { return RenderPartialViewToString(null, null); } protected string RenderPartialViewToString(string viewName) { return RenderPartialViewToString(viewName, null); } protected string RenderPartialViewToString(object model) { return RenderPartialViewToString(null, model); } protected string RenderPartialViewToString(string viewName, object model) { if (string.IsNullOrEmpty(viewName)) viewName = ControllerContext.RouteData.GetRequiredString(“action”); ViewData.Model = model; using (StringWriter sw = new StringWriter()) { ViewEngineResult viewResult = ViewEngines.Engines.FindPartialView(ControllerContext, viewName); ViewContext viewContext = new ViewContext(ControllerContext, viewResult.View, ViewData, TempData, sw); viewResult.View.Render(viewContext, sw); return sw.GetStringBuilder().ToString(); } } }

    Now with my JavaScript function is called, I can again reference my Json Object and then update the page:

    function JsonAdd_OnComplete(context) { var JsonAdd = context.get_response().get_object(); if (JsonAdd.Success) { $(“#PersonList”).html(JsonAdd.PartialViewHtml); } $(“#message”).html(JsonAdd.Message); }

    With this line:

    $(“#PersonList”).html(JsonAdd.PartialViewHtml);

    I have a div tag that surrounds my Html.RenderPartial call and I can use jQuery to just replace the HTML. Remember JsonAdd.PartialViewHtml contains the entire HTML of the newly rendered PartialView that we called from the Controller:

    return Json(new { Success = true, Message = “The person has been added!”, PartialViewHtml = RenderPartialViewToString(“PersonList”, new PersonListViewModel {PersonList = _personList}) });

    That just about sums it up how to use Ajax, jQuery, Json, and PartialViews in an effective manor in an ASP.NET MVC application.

  • ASP.NET MVC: Using Ajax, Json, PartialViews (cnt’d)

    While working on a new ASP.NET MVC project, I had a simple objective: add a new record and refresh my View. After sifting through several sites I found several resources that lead me to accomplish my goal.

    I’ve compiled my result into a new sample MVC Application that I created in Visual Studio that you can download here. I’ll explain what I did using that as my reference. It’s a trimmed down version of what I did on the actual project, but it will get the point across.

    Let’s assume we want to have a View that lists some People from our data source. I started out by creating a Person data model:

    public class Person
    {
      public Guid Id { get; set; }
      public String FirstName { get; set; }
      public String LastName { get; set; }
    
      public Person()
      {
        Id = Guid.NewGuid();
      }
    }

    Next, I created some ViewModels so that I can work with strongly typed Views:

    public class PersonIndexViewModel
      {
        public PersonListViewModel PersonListModel { get; set; }
    
        public AddPersonViewModel AddPersonModel { get; set; }
      }
    
      public class PersonListViewModel
      {
        public List PersonList { get; set; }
      }
    
      public class AddPersonViewModel
      {
        public String FirstName { get; set; }
        public String LastName { get; set; }
    }

    Next, I added a People folder in my Views folder and created a strongly typed Index View on my PersonIndexViewModel. I started out with building a table and doing a foreach to display each Person object. I moved that into a PartialView (.ascx) by creating a ParitialView in my Views/Shared folder (This blog post is very helpful for showing you how to use PartialViews). I called that PersonList.ascx and that is a strongly typed partial view on my PersonListViewModel.

    Now, I can update my View to display that PartialView with this code:

    <% Html.RenderPartial("PersonList", Model.PersonListModel); %>

    Next, I want to be able to perform a delete action to remove a Person from the DB. You’ll notice I’m using an Ajax.ActionLink in my PersonList PartialView so that I can perform the delete with Ajax.

    <%= Ajax.ActionLink("delete", "JsonDelete", "People",
    new { Id = person.Id },
    new AjaxOptions { Confirm = "Are you sure you want to Delete this Person? This action cannot be undone.",
    HttpMethod = "Delete",
    OnComplete = "JsonDelete_OnComplete" })%>

    In the ActionLink, I specify the Action I want to call, pass the Person.Id and in the AjaxOptions I defined a JavaScript method that should be called on complete. In my People Controller I can now add the JsonDelete method:

    [AcceptVerbs(HttpVerbs.Delete)]
    public JsonResult JsonDelete(Guid Id)
    {
      // call your Repository to delete the Person
      bool result = _personList.Remove(toDelete);
    
      // return a Json Object, you could define a new class
      return Json(new
      {
        Success = result,
        Message = result ? "The person has been deleted!" : "Error!"
      });
    }

    You would call your Repository to delete that Person and then return a new Json Object. What I did was define a couple of properties that I will reference from the JavaScript function to give feedback to the user. Here is the JavaScript function:

    function JsonDelete_OnComplete(context) {
    
      var JsonDelete = context.get_response().get_object();
    
      if (JsonDelete.Success) {
        $(this).parents('tr.item').remove();
      }
    
      $("#message").html(JsonDelete.Message);
    }

    I found this link that showed me how to use “context.get_response().get_object();” to get the Json Object in JavaScript.

    Now that I can delete, the next logical step would be the ability to add a new Person. I’ll start out by creating a new form that uses my AddPersonViewModel Model:

    <% using (Ajax.BeginForm("JsonAdd", "People", new AjaxOptions { OnComplete = "JsonAdd_OnComplete" }))
     {%>
    <fieldset>
      <legend>Add a Person</legend>
      <%= Html.LabelFor(model => model.AddPersonModel.FirstName)%>:
      <%= Html.TextBoxFor(model => model.AddPersonModel.FirstName, new { @class = "firstname" })%>
      <%= Html.ValidationMessageFor(model => model.AddPersonModel.FirstName)%>
    
      <%= Html.LabelFor(model => model.AddPersonModel.LastName)%>:
      <%= Html.TextBoxFor(model => model.AddPersonModel.LastName, new { @class = "lastname" })%>
      <%= Html.ValidationMessageFor(model => model.AddPersonModel.LastName)%>
    
      <input id="AddBtn" name="AddBtn" type="submit" value="Add" />
    </fieldset>
    <% } %>

    Again, I use the Ajax.BeginForm to set the Action to call and define a JavaScript function to call on complete. To my Controller I add:

    public JsonResult JsonAdd(AddPersonViewModel AddPersonModel)
    {
      ...
    
      Person newPerson = new Person
      {
        FirstName = AddPersonModel.FirstName,
        LastName = AddPersonModel.LastName
      };
    
      // call your Repository to add the new Person
      _personList.Add(newPerson);
    
      // return a Json Object, you could define a new class
      return Json(new
      {
        Success = true,
        Message = "The person has been added!",
        PartialViewHtml = RenderPartialViewToString("PersonList", new PersonListViewModel {PersonList = _personList})
      });
    }

    One important thing here is the method “RenderPartialViewToString”. I ran across this which was a tremendous resource in solving my problem here, which was returning a Json Object with a rendered PartialView so that I could use JavaScript/jQuery to update the page.

    The post I referenced above showed where you needed to create a base Controller to inherit from and that Controller defines the methods which will return a PartialView as an HTML string:

    public abstract class BaseController : Controller
      {
        protected string RenderPartialViewToString()
        {
          return RenderPartialViewToString(null, null);
        }
    
        protected string RenderPartialViewToString(string viewName)
        {
          return RenderPartialViewToString(viewName, null);
        }
    
        protected string RenderPartialViewToString(object model)
        {
          return RenderPartialViewToString(null, model);
        }
    
        protected string RenderPartialViewToString(string viewName, object model)
        {
          if (string.IsNullOrEmpty(viewName))
            viewName = ControllerContext.RouteData.GetRequiredString("action");
    
          ViewData.Model = model;
    
          using (StringWriter sw = new StringWriter())
          {
            ViewEngineResult viewResult = ViewEngines.Engines.FindPartialView(ControllerContext, viewName);
            ViewContext viewContext = new ViewContext(ControllerContext, viewResult.View, ViewData, TempData, sw);
            viewResult.View.Render(viewContext, sw);
    
            return sw.GetStringBuilder().ToString();
          }
        }
    }

    Now with my JavaScript function is called, I can again reference my Json Object and then update the page:

    function JsonAdd_OnComplete(context) {
    
      var JsonAdd = context.get_response().get_object();
    
      if (JsonAdd.Success) {
        $("#PersonList").html(JsonAdd.PartialViewHtml);
      }
    
      $("#message").html(JsonAdd.Message);
    }

    With this line:

    $("#PersonList").html(JsonAdd.PartialViewHtml);

    I have a div tag that surrounds my Html.RenderPartial call and I can use jQuery to just replace the HTML. Remember JsonAdd.PartialViewHtml contains the entire HTML of the newly rendered PartialView that we called from the Controller:

    return Json(new
    {
      Success = true,
      Message = "The person has been added!",
      PartialViewHtml = RenderPartialViewToString("PersonList", new PersonListViewModel {PersonList = _personList})
    });

    That just about sums it up how to use Ajax, jQuery, Json, and PartialViews in an effective manor in an ASP.NET MVC application.

  • Got Surveys? An easy way to collect data from your visitors

    For this example you will need a copy of the current version of Shadowbox. Download Shadowbox

    Everyone knows that advertising ideas and marketing plans can be driven by data collected from potential buyers.  This inevitability has brought forth many different avenues that can be taken in order to collect data from potential buyers.

    Now to get to the point, how does this pertain to web development?  Simple!  We want to create a unique way to present a survey on your website. We can use Shadowbox to display a simple survey overlaying a page for first time visitors.

    The first thing that you need to do is create your survey, for this example I will create a very simple HTML form that I’ll refer to as form.html for the remainder of this post.

    <html>
    <head>
    </head>
    <body>
    <fieldset>
       <legend>Information</legend>
            <ul>
             <li>
               <label for="name">Name:</label><input type="text" id="name">
             </li>
             <li>
               <label for="name">Email:</label><input type="text" id="email">
             </li>
            </ul>
            <p>
                <input type="submit" id="submit" value="Submit" >
                <input type="submit" id="cancel" value="Cancel">
            </p>
        </fieldset>
    </body>
    </html>
    

    Although the above code will build a simple form you will need to modify the onclick property values of the submit inputs (our buttons).

    Submit Button

    The submit button’s onclick property will need to be set to a method that you have developed to suit your specific needs. For the simplicity of this example I will not cover creating the method to save the collected data.

    Cancel Button

    The cancel button onclick property will use simple JavaScript to redirect the parent window (the initial page the user is trying to visit) back to whichever page you desire.

    
    onclick="self.parent.window.location = '[redirect location]';return false;"
    

    The next thing you need to do is determine which page you would like the Shadowbox survey to be displayed on. Once you have chosen a page you need to include the shadowbox.js file in the <head> section of the page.

    <head>
    <script type="text/javascript" src="/js/shadowbox/shadowbox.js">
    </head>
    

    After the shadowbox.js has been included you can initialize the Shadowbox survey on the page.load event of the window element.

    function init(){
                    Shadowbox.init({
                    players:  ['html', 'iframe', 'swf']
                    });
                    Shadowbox.open({
                    player:     'iframe',
                    content:    'form.html',
                    title:      'Survey'
                    });
                    }
                    window.onload = init;
    

    There are many different options that can be set when calling Shadowbox.init() and Shadowbox.open(), but for this example I kept it simple. A list of options can be found at the Shadowbox Options page.

    Lastly, you need to ensure that you have accommodated for those users that have already visited the page and filled out the survey. One simple method of performing this task is simply storing a cookie once the data has been collected and submitted. The determination of whether a user should fill out a survey can be based on different properties of the cookie (or different cookies for that matter).

    And there you have it, you’ve created a survey that you want your users to fill out and simply included the Shadowbox library to display this survey over the page of your choice. Combine this technique with the analytic tracking service of choice to find your desired landing page. This is just one productive use of Shadowbox, what other uses can you think of?

  • Using .NET 3.5 List.Distinct()

    When I was working on a project today, I had a List of objects where I needed to grab objects that had a distinct property value (i.e. where MyObject.MyID is distinct).

    I discovered the Distinct() method on the List and I had never used it before so I wasn’t sure of the syntax. After further review, I learned you can use the IEqualityComparer interface to specify how to determine if the object is distinct.

    I’ll just show you the code because I feel it’s self explanatory:

    public class MyObjectMyIDComparer : IEqualityComparer
    {
      public bool Equals(MyObject x, MyObject y)
      {
        return x.MyID == y.MyID;
      }
    
      public int GetHashCode(MyObject obj)
      {
        return obj.ToString().GetHashCode();
      }
    }

    Now you can call the Distinct() method and pass in the class:

    List MyObjectDistinctMyIDList = MyObjectList.Distinct(new MyObjectMyIDComparer()).ToList();