简体   繁体   English

Titanium Studio appcelerator(全部运行一次写入)

[英]Titanium Studio appcelerator (write once run for all)

I am new on Titanium Studio Appcelerator,i have the following questions about titanium studio appcelerator: 我是Titanium Studio Appcelerator的新手,我对Titanium Studio Appcelerator有以下疑问:

  1. In titanium if i want to consume Ksoap2 webservices then i will be write code at once?and will be run that code on all plateform?like android/ios. 在钛中,如果我想使用Ksoap2 Web服务,那么我将立即编写代码?并将在所有平台上运行该代码?例如android / ios。
  2. Or the webservices consuming code will be specific to plateform dependent? 还是Web服务使用代码将特定于平台依赖? i mean if i want to consume webservices in titanium then i will write code in all platform(android/ios). 我的意思是,如果我想在Titanium中使用Web服务,那么我将在所有平台(android / ios)中编写代码。

Please some Titanium studio appcelerator experts guid me in right direction Thank in advance. 请一些钛制工作室的制烟专家指导我正确的方向,谢谢。

您可以使用Ksoap2进行Web服务,并使用Ti.Network.createHttpClient检索所需的数据。

All logic and most of the UI can be shared amongst all platforms. 所有逻辑和大部分UI均可在所有平台之间共享。 A great advantage of Appcelerator Titanium. Appcelerator Titanium的一大优势。

Have you gone through the titanium docs for web services APIs ? 您是否已浏览过用于Web服务API的Titan文档?

As titanium is a hybrid technology, most of the APIs are common for both the platform, but depends on your need and the API you are using, you may have to write the platform specific code in condition and this code will not affect the others platforms. 由于Titan是一种混合技术,因此大多数API对于这两个平台都是通用的,但是取决于您的需要和所使用的API,您可能必须在适当的情况下编写特定于平台的代码,并且此代码不会影响其他平台。 。

From my experience, in the case of web service calling single code will run on both the platform. 根据我的经验,在Web服务调用的情况下,单个代码将在两个平台上运行。 There are some platform specific properties if need to use them use in a platform specific condition. 如果需要使用某些特定于平台的属性,请在特定于平台的条件下使用它们。 its a just a few line of code and your code will run in both the platforms 只需几行代码,您的代码即可在两个平台上运行

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

相关问题 在Android(Appcelerator Titanium)上运行应用程序时出错 - Errors when run app on android (appcelerator titanium) Appcelerator Titanium卸载时运行代码(android) - Appcelerator Titanium run code on uninstall (android) Titanium Appcelerator推送通知回调多次调用 - Titanium Appcelerator push notification callback called more than once Titanium工作室无法在终端运行“钛”命令 - Titanium studio cannot run “titanium” command in terminal 无法在Titanium Studio(Appcelerator)中安装ADT(Android Development Toolkit)? - Failed to install the ADT (Android Development Toolkit) in Titanium Studio (Appcelerator)? 如何将 Android Studio 项目转换为 Appcelerator Titanium 模块 - How to convert an Android Studio project to an Appcelerator Titanium Module 如何使Android Studio和Appcelerator Titanium一起工作 - How to get android studio and appcelerator titanium work together 为什么Appcelerator Studio将停止在Windows 10上编译Android Titan应用程序 - Why will Appcelerator Studio stop compiling Android titanium app on Windows 10 平板电脑应用程序带有钛制加速器? - Tablet App with titanium appcelerator? 在Titanium Appcelerator中注册一个BroadcastReceiver - Rregister a BroadcastReceiver in Titanium Appcelerator
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM