SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 33

Thread: MVC and SEO

  1. #1
    SitePoint Addict crabby80's Avatar
    Join Date
    May 2007
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MVC and SEO

    Hi guys

    Can MVC affect SEO, as content is pulled in dynamically?

    Thanks in advance

    Crabby

  2. #2
    SitePoint Addict Jasper Bekkers's Avatar
    Join Date
    May 2007
    Location
    The Netherlands
    Posts
    282
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    MVC persé shouldn't affect SEO, however if the implementation is bad it might.
    Design patterns: trying to do Smalltalk in Java.
    I blog too, you know.

  3. #3
    SitePoint Addict crabby80's Avatar
    Join Date
    May 2007
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Jasper

    Thanks for your reply

    What would be an example of bad implementation to affect SEO?

  4. #4
    SitePoint Member
    Join Date
    Jan 2005
    Location
    Barcelona
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The way a MVC framework is implemented can affect SEO if the framework:

    * Doesn't support nice URL's
    * Doesn't send correct status code in the header
    * Has poor performance.
    * Makes it difficult to modify existing URL's in order to change the SEO strategy.

    Those thing should be taken into account not only when looking for a MVC framework, but in every dynamic website.

    The only concern about dynamic content is that queries to the database and generating pages requires time which might slow your site (bad for users and spiders). Normally languages like PHP are fast enough for normal sites, but on high load sites you might look for something that allows you to cache dynamic content for improving performance.

  5. #5
    SitePoint Addict crabby80's Avatar
    Join Date
    May 2007
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah ok, so dynamic content can be read by spiders then, as long as the content is loaded nice and fast?

    Thanks again

  6. #6
    PHP/Rails Developer Czaries's Avatar
    Join Date
    May 2004
    Location
    Central USA
    Posts
    806
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In my mind, these two things are completely unrelated. MVC is nothing more than a concept - one of many theories on how a system should work to produce the desired result. SEO is an actual service/practice. The only way "MVC" is going to ever effect SEO is in the implementation.

    Dynamic content doesn't matter as long as the search engines can access it. "Pretty" URLs help this. Again, it's all in the implementation. MVC itself has nothing at all related to SEO.

  7. #7
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are want the framework I wrote before to have the seo style URL's I would need to change the router, request and url classes.

  8. #8
    SitePoint Addict Jasper Bekkers's Avatar
    Join Date
    May 2007
    Location
    The Netherlands
    Posts
    282
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by blueyon View Post
    If you are want the framework I wrote before to have the seo style URL's I would need to change the router, request and url classes.
    That sounds like an orthogonality problem. If you must change 3 subsystems for one conceptual change you're making the application smell bad. My advice would be to set up a configuration file to keep the the changes central.
    Design patterns: trying to do Smalltalk in Java.
    I blog too, you know.

  9. #9
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jasper Bekkers View Post
    That sounds like an orthogonality problem. If you must change 3 subsystems for one conceptual change you're making the application smell bad. My advice would be to set up a configuration file to keep the the changes central.
    Of course you need to change classes to change how the url's work. I don't know one framework that doesn't require this! I only used normal URL style to keep the application simple.

  10. #10
    SitePoint Member
    Join Date
    Jan 2005
    Location
    Barcelona
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by blueyon View Post
    Of course you need to change classes to change how the url's work. I don't know one framework that doesn't require this! I only used normal URL style to keep the application simple.
    Name those Frameworks so we can keep away from them.

    AFAIK all common frameworks that include a Router, Request and a url generation routine will ONLY need to change ONE configuration file for mapping URL rewriting rules - as Jasper suggested.

    If you avoided using the URL generation routines, then you'll need to do some link hunting when the SEO guy asks for a new approach.

  11. #11
    SitePoint Addict Jasper Bekkers's Avatar
    Join Date
    May 2007
    Location
    The Netherlands
    Posts
    282
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by blueyon View Post
    Of course you need to change classes to change how the url's work. I don't know one framework that doesn't require this! I only used normal URL style to keep the application simple.
    I don't care how other frameworks do it, I perceive it as flawed that such a small thing requires me to go through multiple source files to change the behaviour. Preferably you'd want a transparant and simple to use framework. If a framework cannot give me this (simple) feature I know I might be up for a maintenance nightmare.
    Design patterns: trying to do Smalltalk in Java.
    I blog too, you know.

  12. #12
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jasper Bekkers View Post
    I don't care how other frameworks do it, I perceive it as flawed that such a small thing requires me to go through multiple source files to change the behaviour. Preferably you'd want a transparant and simple to use framework. If a framework cannot give me this (simple) feature I know I might be up for a maintenance nightmare.
    maintenance nightmare
    3 small classes to change the URL's of the entrie site? Hardly a maintenance nightmare!

  13. #13
    SitePoint Addict Jasper Bekkers's Avatar
    Join Date
    May 2007
    Location
    The Netherlands
    Posts
    282
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by blueyon View Post
    3 small classes to change the URL's of the entrie site? Hardly a maintenance nightmare!
    This is a quote form the book "The Pragmatic Programmer".

    In inner cities, some buildings are beautiful and clean, while others are rotting hulks. Why? Researchers in the field of crime and urban decay discovered a fascinating trigger mechanism, one that very quickly turns a clean, inhabited building into a smashed and abandoned derelict.

    A broken window.

    One broken window, left unrepaired for any substantial length of time, instills in the inhabitants of the building a sense of abandonment -- a sense that the powers that be don't care about the building. So another window gets broken. People start littering. Graffiti appears. Serious structural damage begins. In a relative short space of time, the building becomes damaged beyond the owner's desire to fix it, and the sense of abandonment becomes reality.
    Design patterns: trying to do Smalltalk in Java.
    I blog too, you know.

  14. #14
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bermi View Post
    Name those Frameworks so we can keep away from them.

    AFAIK all common frameworks that include a Router, Request and a url generation routine will ONLY need to change ONE configuration file for mapping URL rewriting rules - as Jasper suggested.

    If you avoided using the URL generation routines, then you'll need to do some link hunting when the SEO guy asks for a new approach.
    bermi,

    I think you misunderstand what I mean.

    The framework I have set up currently generates urls like this:

    index.php?var1=somthing&var2=somthingelse

    To make the URLs SEO friendly I would need to make them look like this:

    index.php/var1/somthing/var2/somthingelse

    The common frameworks urls use this style already.

  15. #15
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jasper Bekkers View Post
    This is a quote form the book "The Pragmatic Programmer".
    I thnk you misunderstand how I have set the example up.

  16. #16
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The quotation makes sense, and the point that Jasper is making should be obvious. If you have to make changes to more than one class to modify some behavour, then you do have a maintenance issue.

    Depending on complexity, it can turn out to be a nightmare. A right -beep- nightmare as I've learnt from experience

    > The common frameworks urls use this style already...

    Doesn't matter, as you should be able to use any style or format without actually physically making any changes. Google for the Open/Closed Principle, whereby a modular framework should be open for extension but closed for modification.

    That is one of Bob Martin's principles by the way...

  17. #17
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by blueyon View Post
    index.php?var1=somthing&var2=somthingelse

    To make the URLs SEO friendly I would need to make them look like this:

    index.php/var1/somthing/var2/somthingelse
    In which way is the second URL more SEO friendly, than the first?

  18. #18
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dr Livingston View Post
    The quotation makes sense, and the point that Jasper is making should be obvious. If you have to make changes to more than one class to modify some behavour, then you do have a maintenance issue.

    Depending on complexity, it can turn out to be a nightmare. A right -beep- nightmare as I've learnt from experience

    > The common frameworks urls use this style already...

    Doesn't matter, as you should be able to use any style or format without actually physically making any changes. Google for the Open/Closed Principle, whereby a modular framework should be open for extension but closed for modification.

    That is one of Bob Martin's principles by the way...
    I'm not trying to make a be-all-end-all of framworks.

    To change how the urls are setup I would need to make a massive class to try to cover all and every url style out there. I understand Open/Closed Principle and extending the class but its just not needed for what I have in mind.

  19. #19
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kyberfabrikken View Post
    In which way is the second URL more SEO friendly, than the first?
    Google and some of the other search engines just prefer to give higher ranking to sites that have urls using '/' rather than using '?', '=', '&'.

    Also when the urls have search keywords in them.

  20. #20
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by blueyon View Post
    Google and some of the other search engines just prefer to give higher ranking to sites that have urls using '/' rather than using '?', '=', '&'.
    I'm by no means an expert on search engine optimisation, but I kind of doubt the validity of that statement. I've seen it proposed a lot -- explicitly or implicitly -- but I have a strong hunch that it's an urban myth more than anything. This is probably fuelled by the fact that the exact nature of search engines isn't public knowledge, so there is some level of guesswork involved with the whole SEO area. It's common sense, that it is important whether a URL contains keywords, but I don't see why it should make a difference, if it's in the location or in the query string. On the other hand, there is an intended functional difference between the two types of information, and treating them as interchangeable blurs this distinction. Ultimately that leads to a weaker URL scheme, since the URL contains less accessible information. Even if a search engine won't punish you for that, it's weakening the interface of your application.

  21. #21
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kyberfabrikken View Post
    I'm by no means an expert on search engine optimisation, but I kind of doubt the validity of that statement. I've seen it proposed a lot -- explicitly or implicitly -- but I have a strong hunch that it's an urban myth more than anything. This is probably fuelled by the fact that the exact nature of search engines isn't public knowledge, so there is some level of guesswork involved with the whole SEO area. It's common sense, that it is important whether a URL contains keywords, but I don't see why it should make a difference, if it's in the location or in the query string. On the other hand, there is an intended functional difference between the two types of information, and treating them as interchangeable blurs this distinction. Ultimately that leads to a weaker URL scheme, since the URL contains less accessible information. Even if a search engine won't punish you for that, it's weakening the interface of your application.
    I've see the results myself on a number of sites and it does work. A company I worked for had some 60+ sites selling electronics that where the top postions for many keywords. Later on Google changed their algorithm and we dropped to around postion 1000 something. We tried a lot things to get our postion back and found using search engine friendly urls helped to get the shops back up to a good ranking.

    This why there are so many url contributions around for scripts like osCommerce. The standard osCommerce shops can not get decent rankings.

    Don't ask me why google decided to do this.

    I remember reading some where that that '?,=,&' are not supposed to be used in hrefs and they are only used when form data is being is submitted using the GET method.
    Last edited by blueyon; Jul 27, 2007 at 09:30.

  22. #22
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bermi View Post
    Name those Frameworks so we can keep away from them.
    Codeignitor, akelos, phpcake.

    You should look at my code and read my post properly before before trying to be a smart ***!

  23. #23
    SitePoint Addict webaddictz's Avatar
    Join Date
    Feb 2006
    Location
    Netherlands
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kyberfabrikken View Post
    I'm by no means an expert on search engine optimisation, but I kind of doubt the validity of that statement.
    Nor am I, but I am sure of one thing. There is only a x amount of pages that google will index if there is only one GET var differing. So, if you have index.php?page=foo and index.php?page=bar, it will index the first x pages, not sure about that number though.

    When using /foo/ and /bar/, they will all be indexed, so, yeah, it helps.

    Quote Originally Posted by blueyon View Post
    Codeignitor, akelos, phpcake.

    You should look at my code and read my post properly before before trying to be a smart ***!
    Actually, I only have (much) experience with one of those frameworks; CodeIgniter. In CodeIgniter, you'll only have to change $config['enable_query_strings'] to true in the file application/config.php, or vice versa. That means you don't have to change one class, let alone three. If the responsibility for extracting the controller, action and parameters from the URL is divided over three different classes, you've made a mistake.
    Last edited by webaddictz; Jul 30, 2007 at 05:14. Reason: typo's

  24. #24
    SitePoint Member
    Join Date
    Jan 2005
    Location
    Barcelona
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by blueyon View Post
    Codeignitor, akelos, phpcake.

    You should look at my code and read my post properly before before trying to be a smart ***!
    after reading at your comment

    If you are want the framework I wrote before to have the seo style URL's...
    I could hardly understand what you wanted to say there, so I did my best and failed.

    Then after looking at

    The framework I have set up currently generates urls like this:

    index.php?var1=somthing&var2=somthingelse

    To make the URLs SEO friendly I would need to make them look like this:

    index.php/var1/somthing/var2/somthingelse

    The common frameworks urls use this style already.
    It's clear that you have not used the Routers provided by Cake and Akelos (not sure about Code Igniter). They do not use the approach you have commented.

    In those frameworks having an URL like

    HTML Code:
    index.php?controller=acticles&action=listing&sort_by=date&order=DESC&limit=15
    would NOT be written as YOUR previous proposal like

    HTML Code:
    index.php/controller/acticles/action/listing/sort_by/date/order/DESC/limit/15
    which might work for you, but it is not as meaningful as the URL that those frameworks generate by adding a simple routing rule.

    HTML Code:
    /new/acticles
    Now that looks more relevant for humans and for search boots, which day by day are becoming smarter when it comes to identify well though resources.

    For achieving this you just need to set up a rule at your config/routes.php file with this rule

    PHP Code:
    $Map->connect('/new/:category', array('controller' => 'articles''action' => 'listing''sort_by'=>'date''order'=>'DESC'=>'limit'=>15)); 
    And when coding your application in order to build previous URL you can use the framework functions which are aware of those rules.

    PHP Code:
    url_for( array('controller' => 'articles''action' => 'listing''sort_by'=>'date''order'=>'DESC'=>'limit'=>15)); 
    Try both techniques and you'll find out that the Router approach is far more flexible when it comes to modifying your URL's for SEO purposes.

    You could also use plain OLD mod_rewrite Apache rules for mapping incoming requests, but you'll still need a routing for rendering those URLs.

  25. #25
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by blueyon View Post
    I've see the results myself on a number of sites and it does work. A company I worked for had some 60+ sites selling electronics that where the top postions for many keywords. Later on Google changed their algorithm and we dropped to around postion 1000 something. We tried a lot things to get our postion back and found using search engine friendly urls helped to get the shops back up to a good ranking.

    This why there are so many url contributions around for scripts like osCommerce. The standard osCommerce shops can not get decent rankings.

    Don't ask me why google decided to do this.
    I'm not saying, that it can't be true, but I would like to see some sort of evidence to back it up. From a professional perspective, your claim that "You've seen the results yourself, and it does work", doesn't quite cut it for me.

    The fact that a lot of applications/frameworks masks the querystring as a location does suggest that there could be some truth in the myth. On the other hand, McDonalds serves 47 million customers per day, and I wouldn't take that as evidence of the quality of the meals served.

    Quote Originally Posted by webaddictz View Post
    Nor am I, but I am sure of one thing. There is only a x amount of pages that google will index if there is only one GET var differing.
    What makes you think that?

    On the flip-side, some spiders might get confused by the fact that the location part isn't really a location. For example, apparently some spiders will only crawl a site to a maximum of 4 levels.
    Last edited by kyberfabrikken; Jul 30, 2007 at 11:21.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •