
(Re)writing Reddit/Y.News in CakePHP - rami
http://raminasser.com/2007/04/22/learning-cakephp-step-1/
======
BrandonM
I wonder how many of these posts we will see. Why spend time showing that you
can duplicate a site using a certain platform when you could theoretically
build an entirely new site in the same amount of time? Of course, the hard
part is figuring out what you need to be coding, but I definitely subscribe to
pg's philosophy of letting the code tell you. That is, just set out to do
_something_ on the platform of your choice and before long, you'll find
yourself doing something interesting.

Then again, this is probably a generalization of the procrastinator in all of
us, that part of us that spends hours every day doing pointless activities,
later lamenting that we don't have enough time to do X.

~~~
shiro
I have a different view. Taking exiting site as an "example" for "how to build
a web app in X" type tutorial is quite useful, since the audience also know
what to expect, and can have something working at the end.

Of course the true difficulty isn't in the surface features---scaling to
thousands of users and millions of records, handling all sorts of corner cases
of browers, etc... but that can come later, after the introductory tutorial.

~~~
BrandonM
Yes, I agree that these types of tutorials can be useful, and they should
probably exist in some kind of "tutorial repository" associated with different
languages. If that was the intention of the person who wrote it, then their
time was time well spent in terms of how much they might help others.

Part of the feeling I get out of these submissions, though, is "Hey, our
platform is just as good as RoR/Arc/x because we can do what they did _this_
easily." I was trying to point out that such activities are not really
accurate depictions of how good a given platform is, because much of what
makes a language or platform good is being able to "think in the language", to
develop your design and ideas as you go. Once you have a solid design in mind,
you could use just about any language to implement it.

That's why I thought it would be more interesting for someone to develop
something new using a given platform, and show the kind of work that gets done
that way. For example, pg often writes about how good Lisp is for writing
programs when you're not sure of exactly what you want to do yet. It would be
intriguing to see someone use a similar approach with their platform of
choice, recording the process, in order to show how flexible it is and what
kinds of issues come up from the very start. For example, how much re-writing
occurs when a very small change is made? Does the platform provide enough
abstraction capabilities to make the underlying implementation transparent?

As I've been reading On Lisp lately, I'm finally starting to get why pg likes
Lisp so much. There's just something cool about being able to write macro-
defining-macro-defining macros, and it turns out that it can make the
development process much more liquid. Do these platforms (like PHP) support
similar levels of abstraction? Judging from "For example, to display the time
elapsed since a site was added, you could use:
$time->relativeTime($site['Site']['created']), now that is awesome!" I think
not, because there are definitely implementation-specific details there that
hamper flexibility and would be better off being abstracted away somehow.

~~~
rami
Hey BrandonM, I am a big fan of CakePHP, the only problem with Cake is the
lack of documentation, that's why i wrote this tutorial. I believe in giving
back to the open source community, whether by writing code or writing
tutorials. Also you make a good point about procrastination, guilty :), I will
also give Lisp a try, especially that more developers are adopting it now.

~~~
BrandonM
If you wrote this to give back to the community, then I applaud you. Sorry to
criticize.

------
aston
Didn't know this existed. Good to know there are people trying to framework-
ize PHP. As PHP's my personal favorite web language, I'm hoping this'll gain
enough momentum to knock my personal least favorite web stack off the top of
the eager headhunter's resume keyword list.

