Titanium JIRA Archive
Alloy (ALOY)

[ALOY-241] Change getController() to createController() to better show it returns a new instance each time vs getView() with always returns the same object

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusResolved
ResolutionFixed
Resolution Date2012-09-06T22:28:50.000+0000
Affected Version/s2012 Sprint 18
Fix Version/s2012 Sprint 18, Release 3.0.0
ComponentsRuntime
Labelsn/a
ReporterRussell McMahon
AssigneeRussell McMahon
Created2012-09-01T10:09:01.000+0000
Updated2012-11-28T20:50:17.000+0000

Description

We need to keep getController() as people have started to do Alloy development but we can deprecate it's use. We need to change all the samples and docs including the quick start to reflect the change.

Comments

  1. Tony Lukasavage 2012-09-01

    SOunds perfect. We will need to do the same with the following functions as well: * Alloy.getModel -> Alloy.createModel * Alloy.getCollection -> Alloy.createCollection * Alloy.getWidget -> Alloy.createWidget Can we ask Neeraj what the exact policy is for instituting deprecation? We may not need to do exactly what platform does now, but I think they have a standard method for deprecating things in the API. I think for one 0.1.0 version they mark a property/function as deprecated and log a WARN message in the TiStudio log whenever it is used, indicating that the API in use is deprecated, and which API should be used instead. After that 0.1.0 passes, I believe they remove the deprecated API. SO for example, if a 1.8 API was being deprecated, it would still work but show a warning in 1.9.0, and in 2.0 it would have removed the deprecated API entirely. Again, I need confirmation on this though.
  2. Russell McMahon 2012-09-04

    Not just controller we need the following: Alloy.getController -> Alloy.createController Alloy.getModel -> Alloy.createModel Alloy.getCollection -> Alloy.createCollection Alloy.getWidget -> Alloy.createWidget Also need to deprecate the existing getX calls. Will work with doc team on how to do this.
  3. Tony Lukasavage 2012-09-05

    Also make sure the quick start and all test apps are updated and tested as well.

JSON Source