views:

43

answers:

3

i'm building my webapp using the wicket java web framework. there is one page that i'm building right now contains 20+ external links, a lot of them are pointing to the wikipedia pages. i'm currently hardcoding the url for all these links in the html page.

i could definitely add these links by using the framework (wicket has a class for external link), but i really wonder, is there really a point to do so? all these links are external and they very likely won't change for a long long time. it seems to me if i add them using the framework, it simply just increase the amount of code and it's just a matter of hardcoding java code vs hardcoding html. i really can't think of a reason to do them via the java side.

i'm just a newbie programmer who is trying to learn how to use web framework, so i wonder am i missing anything here? thanks for your help!

A: 

When in doubt, go the simple route. You can always refactor and add complexity later if it turns out you need to be more dynamic.

TheHurt
A: 

In my opinion, all of the text and links in a web application should be externalized. It's a minimal amount of effort to store this information in a properties file (or content management system for larger applications). This will make it easier to maintain and internationalize your application in the future.

Hope it helps!

--Neal

Neal Swearer
A: 

Remember KISS and YAGNI. If you think the links don't change, wait with programming until you need the flexibility. Flexibility comes always at a price!

deamon