View Full Version : Wordpress application

29 Jul 2010, 6:57 PM
I am new to working on the Sencha platform but think it is quite awesome.. my lack of experience brings me to this question:

I am building an application that retrieves posts from my wordpress blog and displays it nicely on touch devices. After many hours of development I have hit many roadblocks and my questions are:

1- Do I have to use JSON to work with Sencha Touch or can I use PHP calls to provide content? Based on the examples provided, it seems like the best way to provide data is to do it through JSON. PHP calls are more powerful but I do not want 'hack' my way through the framework.

2- I have started building my application but ended up hitting a major roadblock due to my lack of experience in building good code using Sencha Touch (or ExtJS for that matter).. is there any recommendations to provide on building this app the right way?

Thank you!

- Mo

29 Jul 2010, 7:10 PM
1) It's not really a case of "or". You use PHP to generate JSON that you send to the client.

2) There is no "right" way. The best thing to do is follow normal software development practices. Write classes where it makes sense. Abstract your code so you can reuse parts. Make sure you comment things!

Also have a look at the code for the library itself.

29 Jul 2010, 7:34 PM
Well right now I can either:

1- Use a wordpress plugin to provide me with JSON files that contain all the posts

2- Use PHP commands specific to wordpress to retrieve content and add it directly into HTML elements in items and components

If there is a better way please let me know!