tags:

views:

69

answers:

3

I am currently working on a site which resembles a forum in its essential structure. I have decided not to opt for using one of the established PHP frameworks (I have played with Rails before), partially to learn, and also partially because I believe they hinder development in the long term.

I wanted to know how important URL rewriting becomes when building an app. Are dynamic URL's really out of fashion. If implementing URL rewritting should one also then just as well implement controllers? Would it be difficult to switch to a URL rewritting system later on?

Right now I only have a separation between Models and Views, and it's working fine for my purposes. Trying to keep things simple and add as I go.

What are your thoughts?

A: 

Remember that URLs are an important part of the user interface of your web application for many users. So URL rewriting is an important tool for increasing the usability of your site.

Nick Lewis
+1  A: 

I would suggest being mindful of rewriting, but don't specifically implement it as you develop. So long as you make sure not to create arcane urls, it should be relatively easy to add later using mod_rewrite.

In particular, I would recommend building links using a function rather than string concatenation. Then when you implement pretty URLs, you can easily modify the function to return the rewritten values, not the actual paths.

phantombrain
+1  A: 

URL rewriting is nice because it looks prettier, and makes it a tad easier for the user to see what the content he's about to read is about (although that's probably in a header anyway). Some argue that rewriting is better for SEO reasons.

Still, rewriting is NOT pivotal for a large app. I'd say not having dead links and making it easy to find content is pivotal, not how pretty the URLs are.

If anything its just a "nice to have" that is fairly trivial to implement - that's why everyone is doing it these days.

Giovanni Galbo