1
votes

I am new to Appcelerator Studio and a bit confused over the different alternatives when starting a new project.

I started two projects, one with menu "New - Mobile App Project - (Project Template) Default Project", and the second with "New - Mobile App Project (Project Template) Single Window Application".

Both projects have, Titanium SDK version 5.2.0.GA, Deployment Targets: iPhone, Mobile Web, and Unchecked Enable Appcelerator Platform Services.

Please see image link below from Studio Project Explorer on how these two projects look like:

enter image description here

The first project (DefaultProject) makes a single window with two tabs. The second project (SingleWindowApplication) just makes a single window.

  1. Why are the structure of these to projects/apps that different? In the first, the window creation etc. are done in app.js. In the second, the code has been moved around to directories like common, handheld and tablet.
  2. What should be the right questions to ask (for an app making beginner) in order to choose between those two "template" projects?
  3. In the second project, why do I get the android and tablet directories? I did specify targets iPhone and Mobile Web.
  4. Why is directory i18n present in the second project but not in the first?
1
Clearly the templates need to be refreshed and simplified. We will do so in the coming months.Fokke Zandbergen
Or perhaps they both have some purpose as is? The first one seems very straightforward in having all code in app.js (but I can't find any code taking care of the platform/tablet-stuff (switch platform/if (isTablet)). Perhaps there is some documentation describing the templates? Some more text in the README-file should do fine.blaffen
The code taking care of the platform/tablet switch can be found under github.com/appcelerator-developer-relations/…Fokke Zandbergen

1 Answers

3
votes

At first, if you start learning Ti, I would start with an Alloy project and straight learn this route. Helps you to be more organized in your projects (MVC structure).

The projects you've created are classis Ti projects (works fine too). The different folders are just a way to organize your projects. You can create them in the first example if you like to. E.g. the i18n is just not part of the first template but if you start to create a multilanguage project you would just add it.

The targets you define are used during compiling. So if you compile it for iphone it won't add the android assets in there, so just ignore those folders (the template creates them). If you create a empty project from the command line ti create select app and android it will just create the android folder in the Resources directory. But if you run alloy new to create an Alloy project inside this directory it will automatically create all other asset folders (again, ignore them, they won't be used)