Live data from Hacker News

Hey PHP guys... OOP question

news.ycombinator.com

11–14 of 14 posts

Re: Hey PHP guys... OOP question

#11
post #9

Its about maintainability. Is "learn about our website" the only thing you ever want to echo? Will it always be only in english? Might you want to echo it other places, or use it in different circumstances? Try to think of instances where you might want to make a change that causes you to have to go and search through the code for a million different echoes spread all over the place. The 'extra code' is insurance aga…

Yes yes yes! I can't emphasize this enough. My biggest regret in 10 years of building cdbaby.com was that when I wanted to make it multi-lingual, 7 years into it, I was screwed! All of the language was spread around so many little print/echo statements in 10,000 different places. With each one I had thought, "Oh it's just a little one shot deal." But after a few years, guess what you have thousands of? Do it their wa…

Hmmm... would it really be that hard to automatically do (most of) the extraction of text constants?

Re: Hey PHP guys... OOP question

#12
Dude, before you get too deep - use Kohana; it doesn't shackle you and it is quite powerful.

I tried Cake, Symphony, and Zend Framework - they are all quite strong but Cake and Symphony make you build your app 'their way', Zend Framework is looser than the others (more a collection of libraries) but is bloated, slow, and over-engineered.

My opinion is biased because I am a core developer.

Kohana's i18n system is pretty intuitive too. http://www.kohanaphp.com

Re: Hey PHP guys... OOP question

#14
post #9

Its about maintainability. Is "learn about our website" the only thing you ever want to echo? Will it always be only in english? Might you want to echo it other places, or use it in different circumstances? Try to think of instances where you might want to make a change that causes you to have to go and search through the code for a million different echoes spread all over the place. The 'extra code' is insurance aga…

Yes yes yes! I can't emphasize this enough. My biggest regret in 10 years of building cdbaby.com was that when I wanted to make it multi-lingual, 7 years into it, I was screwed! All of the language was spread around so many little print/echo statements in 10,000 different places. With each one I had thought, "Oh it's just a little one shot deal." But after a few years, guess what you have thousands of? Do it their wa…

I imagined your biggest regret would be wasting all of that time trying to force the site to work on RoR and then finally relenting and switching back to PHP.

Not a flame, just a serious thought: from what I remember the RoR was worked on for a year or more - did it take longer than that to implement internationalization?

Post reply on HN