Web application using Play platform and sencha

Well, I was thinking of developing a web application using the playback platform as my internal service and sencha for my interface.

Now I also look at the sencha touchscreen and phone dialogue, which can help me create my own Android application. So the problem is how to make data on two different devices. One of them is a touch device, and the other is in a suitable desktop browser.

Do I have to determine from which device the request was made, and then download the appropriate controller or what? I'm really confused right now! I am very new to web and mobile applications, so please, if someone can explain to me how to do this, this will be a big help! Thanks.

+6
source share
2 answers

I also use Sencha, not Touch, but Ext Js. I have done the following:

Play! The server contains my logic and provides me with useful URLs:

POST /user/create AccountController.createUser GET /user/userid AccountController.getUser 

With Sencha, I defined a Store that retrieves JSON data from a specific URL, this URL points to my game! URLs

In my method on Play, I retrieve the model from my database and simply return the JSON that Sencha will parse / read as:

 Query userQry = JPA.em().createQuery("select * from Account"); List<Article> accounts= userQry .getResultList(); renderJSON(accounts); 

Greetings

+4
source

Sencha Touch is not suitable for use on desktop PCs. You must create another desktop application using Ext.JS. But if you still want to go with Sencha Touch, here you will learn how to have different views for different devices. http://docs.sencha.com/touch/2-0/#!/guide/profiles

0
source

Source: https://habr.com/ru/post/908789/


All Articles