|
|
|
|
|
by thumper
5410 days ago
|
|
I had the same experience -- I didn't fully grasp how useful XHP was until I had to use it. Not only are they reusable components, but the type system they create and can enforce is a powerful aid to helping me suss out how they were meant to be used. (Now if only XHP::render could detect when it's already been called, to avoid weird validation bugs from the side-effects!) And when I had to include some multi-line javascript in my code, I found myself feeling a huge loss. First, heredocs seemed to be the only way to make it readable. Second, I'd have to actually run the code and interact with the page to find out if I got the syntax right. It would be awesome if there was a way to make JS into an object in PHP, the way that XHP is done, and have it support some simple sanity checks and easily import JS components (which I suppose Javelin tries to do). |
|