Just a quick reply for now,I *really* recommend you don't use Xajax. Those method mappings bypass the entire framework, and changing that is a horrendous task. Xajax is a wonky solution that people can drop into existing legacy apps with spaghetti code, but since you're starting from scratch, I urge you to go the "standard" way. Trust me, it's not more work than with Xajax, and you get clean code, and, as a side effect, almost automatic "unobtrusiveness" of your Javascript.
More later; maybe others can toss in their advice here!? - David Am 03.02.2009 um 14:24 schrieb Marius Hein:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi David. Thanks for the quick response. | Why do you want to split it up like this? | The idea was to split the Application into parts, which one of them is the core part, including the libs and so on. | What do you mean by "template"? The page template, the layout, I think. So everything you need to run these application parts are bundled within an separated module. || I'd suggest putting third party libraries (including agavi itself) into | a folder "libs" in your project dir, so you have "libs" and "app" and| "pub" there initially. | But this sounds really nice, I think this is the better approach. | Usually before you initialize the context. Commonly, initialization | stuff is put into app/config.php. | I've tried this. Are the Autoloader ready at this point?| Would you mind sharing a couple more details about what you're trying to| do, then I can give a more useful answer :) | The only thing I want to do is to develop an app, and figure out some best practice how I could do that. I don't want to run into troubleslater, because this was the matter to switch to agavi. We want to start with an single part of an application, but it should be flexible enoughto extend the platform. I want to configure some factories, e.g XAJAX ( ... yes I know), so i can use this singleton later.| Xajax really is a horrible, horrible thing, and completely incompatible | with frameworks, MVC or clean, separated code for bazillions of reasons| I won't get into for now :) | I think it's not the best, but the mapping of php methods is a unbeatable feature.| The key to using Ajax in Agavi is Output Types. Lets assume you have an | action that outputs information on a product. The URL for that is, say, | /products/12345. This is a resource as intended by HTTP/REST, and it can | serve different representations by leveraging a core HTTP mechanism: the| "Accept" header. | | I'm assuming you're using Mootools here, but most JS frameworks do| similar things. With Request.JSON requests, Mootools will send Accept:| application/json as an HTTP header. You can read this header using | Agavi's routing, and change the output type accordingly. I've seen this within the sample app. The problem is that xajax is not sending any special headers to identify the source. I've created aspecial routing to do this. But the action in the routing chain executesonly once (the best match), right? My last solution was a filter to identify a xajax request. But I think this is really not the best solution. The problem ist that xajax needs access to $_GET which was cleared before, so I restored the params. After that i can decide to process the container or process the ajax request. | Hope that helps, Yes, thanks a million. Regards, ~ Marius. - -- http://www.itsocks.de - It’s time to put a slinky on an escalator. PGP: 0x53FA79D0 (https://users.itsocks.de/~mhein/pgp/mhein.asc) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmIRW0ACgkQPXGUPVP6edAQbQCdHjezC3WQQRYYOt4SEynawYiB m/kAoIE5oI3ZksnKoVRGd+vaRrJq4DcK =Im00 -----END PGP SIGNATURE-----< AppKitAjaxFilter .class.php>_______________________________________________users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users
