相同的Sencha应用程序的网络和移动 [英] Same Sencha app for web and mobile

查看:154
本文介绍了相同的Sencha应用程序的网络和移动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

查询是:我有一个当前的Web应用程序来提供我的数据在一个列表中使用java和ui构建使用jsp构建。我想在Sencha设计一个移动应用程序来执行相同的任务,并同时使用Sencha / ExtJs在桌面上使用它。



现在我以下列方式感到困惑: p>


  1. 我需要为网络应用和移动应用创建单独的应用吗?


  2. 对于网络应用,我需要加载一组单独的文件,而对于移动应用,它是不同的。如果应用程序是一个,那么我可以这样做吗?


  3. 此外,我用于获取列表数据的所有java文件应该是一样的代码库或分开?


提前感谢

解决方案

Sencha是基于HTML5和查询的移动应用开发框架。因此,控件和视图基本上是为移动屏幕设计的。但它并不阻止您在普通的桌面浏览器上显示相同的内容。虽然在手机上看起来不错,但浏览器看起来不错,反之亦然。


我需要为网络应用程序创建单独的应用程序和移动应用程序?


不是真的,一切都可以相同,查看中间件甚至后端。如果你可以设计一个可以在手机和桌面上使用的用户界面,那么你很好。


对于网络应用程序,我需要加载单独的文件集,而对于
移动应用程序,它是不同的。如果应用程序是一个,那么我可以做
这个吗?


如上所述,除了UI没有什么应该是一个问题。如果你想要不同的外观和感觉的网络和手机,那么只需创建不同的HTML文件为上述目的。但是您可以使用相同的后端逻辑。


此外,我用于获取列表
数据的所有java文件应该在相同的代码库或分开?


通常,动态Web应用程序通过ajax / http服务调用从后台服务器中获取数据。您可以在单个项目中管理代码,也可以在逻辑上较小的项目中进行分类,以实现更好的管理。 Maven应该是管理您的项目的好选择。


Query is : I have a current web application in place to provide me data in a list which is built using java and ui is built using jsp. I want to design a mobile app in Sencha to perform the same task and simultaneously want it in desktop using Sencha/ExtJs.

Now I am confused in following manner :

  1. Do I need to create separate applications for web app and mobile app?

  2. For the web app I need to load a separate set of files whereas for the mobile app it is different. If the application is one then can I do this?

  3. Also, all the java files which I am using for the getting the list data, should be in same code base or separate?

Thanks in advance.

解决方案

Sencha is a mobile app development framework based on HTML5 and query. So the controls and views are basically designed for mobile screens. But it does not stop you to display the same content on normal desktop browsers. Although what looks great on mobile may not look that good on a browser and vice versa.

Do I need to create separate applications for web app and mobile app?

Not really, everything can be same, views middleware and even backend. If you can design a UI that may look both on mobile and desktop then you are good.

For the web app I need to load a separate set of files whereas for the mobile app it is different. If the application is one then can I do this?

As I said above, except UI nothing should be a concern. If you want different look and feel for web and mobile then just create different HTML files for the said purposes. But you can use the same backend logic.

Also, all the java files which I am using for the getting the list data, should be in same code base or separate?

Generally dynamic web applications fetches the data from backend servers using ajax/http service calls. You may manage the code in a single project or can divide it in logically smaller projects for better management. Maven should be a good choice to manage your projects.

这篇关于相同的Sencha应用程序的网络和移动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆