简体   繁体   English

使用网络移动框架?

[英]Use a web mobile framework?

I'm currently on a new projet to realize an application for mobile. 我目前正在开发一个新的项目来实现移动应用程序。 The client isn't decided and I've to suggest several solutions. 客户没有决定,我建议几个解决方案。 The compatibility with Android (version 2.2+) is required and iOS and others OS could be nice. 需要与Android(版本2.2+)的兼容性,iOS和其他操作系统可能会很好。 We can only develop for Android but I thought to use a web mobile framework. 我们只能为Android开发,但我想使用Web移动框架。

As I never used them, I started to looking for the existing solutions. 由于我从未使用它们,我开始寻找现有的解决方案。 I has heard of PhoneGap, Titanium, Sencha Touch and jQuery Mobile. 我听说过PhoneGap,Titanium,Sencha Touch和jQuery Mobile。

Here is possibilities that I found : 以下是我发现的可能性:

  • PhoneGap + Sencha Touch PhoneGap + Sencha Touch
  • PhoneGap + jQuery Mobile (or an equivalent) PhoneGap + jQuery Mobile(或同等产品)
  • Sencha Touch (API + UI) Sencha Touch(API + UI)
  • Titanium

The critical point in the application will be to allow users to take a photo and edit it : resize, add some text... On Android it's technically possible but with a web mobile framework I don't know. 应用程序中的关键点是允许用户拍摄照片并对其进行编辑:调整大小,添加一些文本......在Android上,技术上可行,但我不知道使用的是移动框架。

With PhoneGap and jQuery Mobile for example, is it possible to do it ? 以PhoneGap和jQuery Mobile为例,它可以做到吗? I found parts of code for each function but nothing very complete, and not sure it'll be compatible on a lot of mobiles. 我找到了每个功能的部分代码,但没有一个非常完整,并且不确定它是否会在很多手机上兼容。 For developping time, perhaps is it better to do 2 natives applications instead of trying to use a mobile framework (and develop the picture edition in Javascript) ? 对于开发时间,或许更好的做2个本地应用程序而不是尝试使用移动框架(并在Javascript中开发图片版本)?

And I found a lot of opinions on each framework but some of them were posted there is more than one year and they evolved so difficult to have a clear vision of all solutions. 我发现每个框架都有很多意见,但其中有一些是在一年多的时间内发布的,而且他们很难对所有解决方案有清晰的认识。

So I would like to know if I could do realize this picture edition with one of these solutions and which could be the best. 所以我想知道我是否可以用这些解决方案之一实现这个图片版本,这可能是最好的。

Thank you for your help 谢谢您的帮助

Intro 介绍

Technically it can be done using all of your possibilities, I will rank them by the difficulty from low to hard, I will even few more possibilities. 从技术上讲,它可以使用你所有的可能性来完成,我会按照从低到难的难度对它们进行排名,我甚至会有更多的可能性。 Also, I wrote much more extensive ARTICLE for my blog. 另外,我为我的博客写了更广泛的文章

PhoneGap/Cordova + jQuery Mobile (Low difficulty) PhoneGap / Cordova + jQuery Mobile(低难度)

Phonegap is what you need here, jQuery Mobile is only for the UI. Phonegap就是你所需要的,jQuery Mobile仅适用于UI。 Still this combination is very easy to implement together and there are a lot of working examples. 这个组合仍然很容易一起实现,并且有很多工作示例。 Phonegap serves as a wrapper for HTML5/JS/CSS and it will give you an access to mobile phone functionalists. Phonegap是HTML5 / JS / CSS的包装器,它可以让您访问手机功能主义者。 Phonegap will be used to take a picture and jQM will be used to modifications. Phonegap将用于拍照,jQM将用于修改。

Here's a rather new PhoneGap + jQuery Mobile tutorial. 这是一个相当新的PhoneGap + jQuery Mobile教程。 If you want to see a MAcOS version of that article than take a look here . 如果您想查看该文章的MAcOS版本,请查看此处

Take a look HERE if you want to find a good source of information regarding differences between jQuery and jQuery Mobile a lot lot more. 看看这里,如果你想找到关于jQuery和jQuery Mobile之间差异的很好的信息来源。

PhoneGap/Cordova + Sencha Touch (Medium/Hard difficulty) PhoneGap / Cordova + Sencha Touch(中/难度难度)

Unlike jQM, Sencha Touch is a bit harder (or a lot harder, depending on your javascript knowledge) to learn, especially if you don't have a good background knowledge with javascript or don't have a license for Sencha Touch designer tool. 与jQM不同,Sencha Touch要学习更难(或者更难,取决于你的javascript知识),特别是如果你没有javascript的良好背景知识或没有Sencha Touch设计工具的许可。 Go this road only if you have have enough time to learn something new. 只有在你有足够的时间学习新东西时才走这条路。 Sencha Touch version 2 has its own app wrapper so Phonegap is no longer needed. Sencha Touch版本2有自己的app包装器,因此不再需要Phonegap。

If you want to find out more take a look at this ARTICLE that discuss the difference between jQuery Mobile and Sencha Touch. 如果你想了解更多,请看一下讨论jQuery Mobile和Sencha Touch之间差异的文章

Titanium Appcelerator (Medium difficulty) Titanium Appcelerator(中等难度)

Unlike previous two options, Titanium works a little bit different. 与前两个选项不同,Titanium的工作方式略有不同。 Where jQM and Sencha are used to create a hybrid mobile app, Titanium appcelerator is used to create a native app from javascript code. 在jQM和Sencha用于创建混合移动应用程序的地方,Titanium appcelerator用于从javascript代码创建本机应用程序。 Not too difficult to master, js code is pretty simple to be frank. 不难掌握,js代码很坦率。 While fast development tool it will be harder to properly style your native app (it's much easier process when building it native from scratch). 虽然快速开发工具很难正确地设计您的原生应用程序(从头开始构建原始应用程序时更容易)。

Inter App Framework / ex jqMoby (Low difficulty) Inter App Framework / ex jqMoby(低难度)

This framework is almost old as jQuery Mobile and now it is owned by Intel. 这个框架几乎与jQuery Mobile一样古老,现在它归英特尔所有。 Like Sencha Touch main goal of this framework is hybrid mobile app development and it works great. 像Sencha Touch这个框架的主要目标是混合移动应用程序开发,它的工作非常好。 It is optimized for Android and iOS so expect faster execution then jQuery Mobile, also like Sencha Touch this framework has its own native app wrapper. 它针对Android和iOS进行了优化,因此希望jQuery Mobile能够更快地执行,也就像Sencha Touch这样的框架拥有自己的原生app包装器。 Of course there are few bad sides of this framework like horrible documentation (at least during the point of writing this article). 当然,这个框架的一些不好的方面就像可怕的文档(至少在写这篇文章的时候)。 If you want to find more about this framework take a look at this ARTICLE . 如果您想了解有关此框架的更多信息,请查看此文章

Kendo UI (Low difficulty) 剑道UI(低难度)

Excelent alternative to jQuery Mobile. jQuery Mobile的完美替代品。 Better, faster in any way. 以任何方式更好,更快。 There's only one problem, it is a commercial product. 只有一个问题,它是一种商业产品。 It will cost you cca 200 USD. 这将花费你cca 200美元。

Find more information here . 在此处查找更多信息。

PhoneJS (Low difficulty) PhoneJS(低难度)

Another excellent alternative to jQuery Mobile and Kendo UI. jQuery Mobile和Kendo UI的另一个很好的替代品。 Much faster then jQuery Mobile, on the same level like Kendo UI. 比jQuery Mobile快得多,就像Kendo UI一样。 It has a great documentation, one of the best I so up to today. 它有一个很棒的文档,是我今天所做的最好的文档之一。

Find more information here . 在此处查找更多信息。

Read about it HERE . 这里阅读它。

Honorable mention 荣誉奖

Goes to Rhomobile. 去Rhomobile。 Similar to Phonegap/Cordova but less used. 与Phonegap / Cordova类似但使用较少。

From the perspective of developing time it is faster to create a hybrid app then a native one. 从开发时间的角度来看,创建混合应用程序然后是本地应用程序更快。 In your case, if you have a Java/Objective C knowlede stick with native app. 在您的情况下,如果您有一个Java / Objective C知识棒与本机应用程序。 No matter how much time you sink into hybrid app it will be good or fast enough. 无论你沉入混合应用程序多少时间,它都会很好或者足够快。

EDIT : 编辑:

Here's an Phonegap + jQuery Mobile example: http://therockncoder.blogspot.com/2012/07/jquery-mobile-phonegap-and-camera.html , there you will find a github link for Android and iOS implementation. 这是一个Phonegap + jQuery Mobile示例: http ://therockncoder.blogspot.com/2012/07/jquery-mobile-phonegap-and-camera.html,在那里你会找到一个用于Android和iOS实现的github链接。

If you have never used jQuery then stick with Dawson Toth Titanium example. 如果您从未使用过jQuery,那么坚持使用Dawson Toth Titanium示例。 But if possible stick with jQuery Mobile. 但如果可能的话坚持使用jQuery Mobile。

UPDATE 1 更新1

You might also be interested in the open source PropertyCross project which demonstrates the same application implemented with a range of cross-platform frameworks (including Sencha, jQM and PhoneGap). 您可能还对开源PropertyCross项目感兴趣,该项目演示了使用一系列跨平台框架(包括Sencha,jQM和PhoneGap)实现的相同应用程序。

UPDATE 2 更新2

I have spent last few weeks review other HTML5 mobile frameworks. 我花了几周时间回顾其他HTML5移动框架。 My comment can be found here and here . 我的评论可以在这里这里找到。

Yes, you can do this in Titanium. 是的,您可以在Titanium中执行此操作。 A naive implementation is below, drafted and tested in 5 minutes. 一个简单的实现在下面,在5分钟内起草和测试。

To give you an idea what it could look like, refer to the following. 为了让您了解它的外观,请参阅以下内容。 Then look at TiDraggable, by Pedro Enrique, if you want to enhance it to let the user drag around text or images relative to each other: https://github.com/pec1985/TiDraggable 然后看看Pedro Enrique的TiDraggable,如果你想增强它,让用户相对于彼此拖动文本或图像: https//github.com/pec1985/TiDraggable

// This app consists of two visual parts: a canvas where the user does stuff,
// and a save button in the bottom right.
var win = Ti.UI.createWindow({
    backgroundColor: 'black'
});

// First, the canvas.
var canvas = Ti.UI.createView({
    bottom: 50,
    backgroundColor: 'white'
});
// It has a scroll view so the user can...
var scroll = Ti.UI.createScrollView({
    // ... zoom content in or out.
    maxZoomScale: 2, minZoomScale: 0.1,
    // .. and freely position the image.
    contentWidth: 1000, contentHeight: 1000
});
// Add the image to the middle of the scroll view.
scroll.add(Ti.UI.createImageView({
    image: 'http://appc.me/Content/kitten.jpg',
    width: 750, height: 426,
    hires: true
}));
canvas.add(scroll);
// Add some text.
canvas.add(Ti.UI.createLabel({
    text: 'Kittens are the best.', textAlign: 'center',
    font: { fontSize: 28 },
    color: '#000',
    bottom: 20
}));
// Add the canvas to the win.
win.add(canvas);

// Second, create the "save" button.
var save = Ti.UI.createButton({
    title: 'Save to Gallery',
    height: 30, width: Ti.UI.SIZE,
    bottom: 10, right: 10
});
save.addEventListener('click', function (evt) {
    // Turn our "canvas" view (and its children) in to an image,
    // and save it to the gallery.
    Ti.Media.saveToPhotoGallery(canvas.toImage(), {
        success: function () {
            alert('Saved!');
        },
        error: function () {
            alert('Oh no...');
        }
    });
});
// Add it to the win.
win.add(save);

win.open();

See this in-depth review and comparison of 5 of the best mobile web application frameworks: 查看5个最佳移动Web应用程序框架的深入审查和比较:

Ignore JQM, it adds too much overhead to your application. 忽略JQM,它会给您的应用程序增加太多开销。 I would recommend Ionic instead. 我会推荐Ionic PhoneGap/Cordova + Angularjs (optional) + Ionic will get you really far. PhoneGap / Cordova + Angularjs(可选)+ Ionic将让你走得更远。

I would say go with Ionic - http://ionicframework.com 我会说与Ionic一起去 - http://ionicframework.com

Ionic offers a library of mobile-optimized HTML, CSS and JS CSS components, gestures, and tools for building highly interactive apps. Ionic提供了一个移动优化的HTML,CSS和JS CSS组件库,手势和用于构建高度交互式应用程序的工具。 Built with Sass and optimized for AngularJS. 使用Sass构建并针对AngularJS进行了优化。

It's a Performance obsessed and Native focused framework with a powerful CLI. 这是一个性能痴迷和本土焦点框架与强大的CLI。

It allows you to develop 它可以让你发展

  1. iOS iOS版
  2. Android Android的
  3. Windows Phone/Universal Windows Phone / Universal
  4. Mobile Web 移动网络

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 尝试在我的Web应用程序中使用Mobile Framework:Gliders - Trying to use Mobile Framework: Gliders in my web application 适用于Web和移动的HTML5框架(LAMP) - HTML5 framework for both Web and Mobile (LAMP) 一种在网页之间进行“类似于iPhone”的转换的方法,但是却浪费了完整(移动)网络框架的开销,并使用了iScroll(v4) - A way to do “iPhone-like” transitions between webpages, but whitout the overhead of a full (mobile)web framework and with the use of iScroll (v4) 如何通过移动Web开发有效地利用资源? - How to effectively use resources with mobile web development? 如何使用javascript检测网页是否在移动设备上响应 - how to use javascript to detect whether a web page is responsive on mobile 如何在桌面和移动网络上使用通用的javascript文件? - How to use the common javascript files for both desktop and mobile web? 用于设计和 ERP Web 应用程序的 UI 设计框架 - Which UI Design Framework to use for designing and ERP Web Application 我可以在Amazon Web Serviecs中使用任何自定义UI框架吗 - Can I use any custom UI framework with Amazon Web Serviecs Ionic Framework-在手机上查看 - Ionic Framework - View on mobile 启动新的数据库驱动的python Web应用程序,您会使用javascript小部件框架吗? 如果是这样的框架? - Starting a new database driven python web application would you use a javascript widget framework? If so which framework?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM