-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Rejected] SDL 0133 - Enhanced iOS Proxy Interface #379
Comments
This is an extensive proposal, some of which I agree with (the core idea), some I don't (a lot of the details), and I think a lot of expansion, discussion, prototyping, API design, and work on this is necessary before we can really say that it's good to be approved. This is a starting point, I understand that, but I don't think that we can really approve a starting point that is this nascent. With that said, here are my points and concerns.
These are just a few of the issues, concerns, and notes I have on this proposal. This is such a large topic that in my opinion, it's hard to discuss without an extremely thorough proposal with a nailed down API or in a workshop setting. I support the vision of making the SDL library simpler for developers and painting over the complexity when possible. The broad vision of this is good and will work with additional work, though I do believe there are more pressing areas begging for simplification. |
The Steering Committee voted to defer this proposal, keeping it in review until our next meeting on 2018-02-06 to allow the author to respond to the comments provided and also to allow other members to review and comment on the proposal. The Project Maintainer stressed that this is a very important proposal for all members to review, as it involves a substantial change for both proxies. It was noted that after this additional week of review, we will likely take the conversation offline to discuss in greater detail in a workshop setting. |
Agreed. I think @eslerner sent over the draft she is working on for Android. I think this should be in a separate proposal since the improved Android interface should be tailored to conform to the standard Android design patterns/practices.
This proposal aims to address the main display interface for SDL, which is Show and it's satellite implementation details (so perhaps the proposal name should be tweaked). It is based on consistent feedback that we have received from application partners. There has been an expressed desire to see SDL interfaces that more closely resemble the native design patterns, but Show has been the interface most frequently called out. The interaction sets also need an enhanced interface, but that seemed to be a lot of work independent to improving the display interface, and probably needs its own proposal.
In the proof of concepting work this proposal is based on, we tried a few different approaches with media and other non-soft buttons. An example is given in the proposal of what a media delegate could look like, but that's not to say that the controls couldn't be mated to UIButtons like what is proposed for soft buttons. Softbutton highlighted state could be mated to the UIButton selected state, which can be toggled if needed. The goal of this proposal is not to make this the only interface to Show, but to provide a simple and intuitive interface to happy-path/common SDL integrations that don't want or need to utilize some of the lower level features/complexities.
App integrations that want to directly use SDLButton or other SDL features that do not easily map into UIKit can still use the lower level interface, for example the proposed Show Manager. However the desire has been expressed many times for an integration option that maps much cleaner to native components/principles. It is not very difficult to map most SDLButton events/functionality to UIButton. I believe a few methods of doing this were discussed in one of the haptic proposals previously, I will try to find some code snippets.
The proposal suggests that the proxy could provide ViewControllers for the common SDL templates (the ones specified in the developer guides), but also leave the delegate public should an app developer want to utilize it directly via a Swift extension or similar. The delegate could be made private and only SDL View Controllers exposed to integrations, but leaving it public was based on some of the feedback we have received.
Agreed that the API needs to be nailed down in a workshop setting. The proposal was left somewhat conceptual/open ended because we believed that needed to happen. Most likely a lot of the SDL APIs need this kind of attention as discussed earlier in this comment. We made this proposal for enhancing the Show interface first, because that is what we have received the most feedback on. |
This remebers me of a concept from Ford to improve the SDL libraries. It's little more than a year ago... The concept was to mimic the design of the native OS (Android or iOS). For Android there exist a lot of code that could be used for that. API lifecycle (pretty much what iOS managers are doing): smartdevicelink/sdl_java_suite#299 A similar (but conceptional) approach was done for iOS. It shows a concept which is similar to UIApplication, UIViewController and UIViews (and subclasses). See attached PDF for details ios-enhanced-framework.pdf It was never proposed to the SDLC as it's more revolutionary to the libraries. I tried to divide the concept into smaller pieces but it makes sense to review the entire concept instead. The concept might need to be updated but it's still valid and it's already at a stage for future workshops. |
@kshala-ford yea the initial discussions we had for the "enhanced frameworks" were along the same lines as this proposal. However, we've asked for evolution proposals based on those works in the past with no response or timeline as to when they might be included. And at this point they are seemingly stale. Also, in my opinion, they were overengineered and essentially created an entire new framework over the existing framework that would greatly increase the maintenance burden. I think there were some good ideas there that we can leverage, but I believe we should aim for a simpler solution that provides what developers need, not the exhaustive functionality that was initially created. |
Agreed, however, I would argue that the difficulty of working with Choice Sets is greater than Shows / Soft Buttons, especially if the Show Manager / Image Upload Manager are implemented. That is where we should focus our increase in complexity and work, in my opinion.
The issue with this as I currently understand it is that for anything non-trivial, this whole approach won't work well enough as is.
I think this is a mistake. We should not have two primary integration methods, only one that unfolds in complexity as more features are needed. To implement, document, and maintain two wholly different in style integrations is asking for trouble.
I think there is a big difference between something that maps better to native principles and something that uses the native components in a way they are not designed to be used. A developer should not have an issue with using a custom object, especially if it's well – and specifically – designed for the platform. It's only going to confuse people if they're using native UIKit components in an environment they weren't meant for. Our UI is not UIKit, and it shouldn't use UIKit components directly. If we want to apply similar principles insofar as they map, without straining them then I'm for that. If our UI architecture diverges too sharply for UIKit (which it may) then I would argue for building a more comprehensible UI system for sdl_ios that maps well to the actual UI architecture of SDL, not to try to force UIKit architecture where it does not map. This is only asking for trouble, as it becomes less comprehensible and increases our maintenance burden. My counter-proposal would look more like this:
This would not directly use any UIKit methods, but it is inspired by them. This hopefully gives developers an easier path to broad reasoning about the basics of the framework, while not reducing the power of it or it's flexibility to be used with other components. They would have to learn SDL-specific UI objects (SDLSoftButtonWrapper and states specifically) but since they have the broad reasoning down and the details are specifically designed to match how SDL works, with documentation and examples, it shouldn't be too difficult to learn. I also believe this architecture can and should map in its essentials between Android and iOS. |
I'm sorry about that. I tried to separate the concept of the enhanced framework into smaller pieces but it never turned out well without compromises to the concept and the resulting developer experience. Furthermore if the concept would be divided many (or even all) proposals would need to be reivewed still as changes to one proposal affects another proposal (as happened to remote control). It would make much more sense to review the concept of enhanced framework and branch out features that can be separated from the foundation during workshops.
I fully disagree to call it "overengineered". The effort spend already on android covers many use cases and app conditions. For some people any foreign code might look complicated or "overengineered" but after reviewing or trying out the code people see that propblems they didn't know it's required to cover are properly solved.
Isn't that what we are trying to do here? Adding another layer using managers or similar to simplify the use of complicated APIs? Didn't iOS already start to that with the managers? I honestly don't know how other code does not increase burden by the same (or higher) amount.
I think your judgement is made without seriously reviewing and trying out the concept of the Android code. It makes it so much easier for app developers to integrate SDL as it provides well known APIs (context and activity based). It covers pretty much all the proposal describes and what it wants to acheive not by using original Android classes but by acting like them in classes like SdlActivity (not inherited from Activity). I'm not saying we should accept it as such and release a new Android version. It should be considered as a candidate implementation of an "enhanced framework" and reviewed by all members of the steering committee. SDL Android is far behind the iOS implementation and there's so much code provided on a silver plate. We should not just refuse to use it. It's going to be much more complicated to start from scratch and repeat the conceptional and development phase compared to use the provided implementation as a basis and start from there. PS: I'm pretty sure no one knew about the existence of the provided code. Therefore I propose that members of the steering committee review the implementation to decide if it should be be the basis for an enhanced Anroid framework. |
I fully agree. We should not use UIKit but use the idea and build new classes that developers easily understands as they are experienced with UIKit.
An SDLViewController makes a lot of sense but I'm afraid of a bunch of subclasses for each template. The set of templates varies per head unit which might cause problems. Instead of template based subclasses and view related properties directly on the view controller classes we should add a couple view classes that manage UI related behavior.
A hierarchy of the view controllers would also make sense allowing the app to stack view controllers. Allowing to subclass the View controller class for modal UI e.g. Alert and (probably the most challenging) interactions. See attached picture: |
@kshala-ford I think your proposal both skews too far toward UIKit and is too complex. My proposal is fairly simple and maps fairly well to how SDL UI works, and while the criticism that some head units don't implement all templates is a good one, it's not insurmountable. The number of subclasses necessary is another good criticism, but I don't think that it's more classes than you are proposing, it's relatively easy to reason about, and each class is rather simple and easy to maintain. Certainly easier and simpler to my mind than allowing the developer to assemble their own UI and then attempting to guess which template most closely matches that, which is what your proposal seems to be doing. The Show manager proposal is also currently under review, so I would highly recommend that you read and review that one as well. |
@joeljfischer Creating subclasses is a quite static approach for the variable set of templates which is not clearly defined by sdl. You’re proposing >22 subclasses covering any potential template out there. Imagine a developer uses a template that’s not supported on a head unit but another template would also be fine. Your approach does not allow the flexibility. It just fails. The question is “how” should it fail. Exception? Crash? Unload? Fallback? The developer cannot reuse code for another template unless everything extracted and aggregated. Otherwise it won’t be possible to just move to another template. Bottom line I believe the amount of classes and the loss of flexibility is less of an issue of using a template view (ish) way. I don’t agree to say it’s too close to UIKit. This concept requires a minimum effort for a developer as the whole concept is already well known. That’s at least the feedback I gathered from developers (Ford partners and hackathon members). The closer the better with less effort in reading and understanding documentation and faster development. Believe me when I say the concept’s complexity reaches the same level as your approach or the one of the original proposal. Keep in mind that this concept is already a couple steps beyond and covers use cases that you still need to solve. In my point of view your organic growth of an enhanced api causes much slower and requires more effort to us and to developers. We need to solve design problems we don’t see yet and we need to keep the possibility of backward compatibility much more than with my approach. developers need to keep track with every single release to refactor code due to many deprecations. that can cause new bugs and cost to development and testing. At the end of the day the effort will be much higher and take much more time doing such small pieces of enhancement. I’ve seen the other proposals already but have not fully reviewed them. I believe it makes sense to schedule workshops for such enhancements. |
It seems like there has been a lot of discussion, so I don't want to rehash the points that have been made. I do want to point out that I don't see the problem building something on top of UIKit to suit our purposes. I think that is the most straightforward way to build the most friendly interface possible. Both of the mentioned counter-proposals involve many UIKit concepts, for example view controllers. I don't see any technical limitation that would prevent us from using UIViewController for this purpose. If designed correctly this could allow SDL template transitions and app logic to be managed by the native view stack, off screen. I think this would address some common complaints we have heard about managing view state for SDL applications. As far as individual components (buttons, labels, images, etc), I think those need to be evaluated one at a time, but I think regardless of evaluation there is no technical limitation from building interfaces for these on top of UIKit. The most painless integration is obviously to support these directly, plug and play with the native classes (UIControls, UILabels, UIImages, etc). As Joel has indicated this will abstract away some SDL complexities that may be useful to certain implementations. This means more complex/advanced implementations will have to utilize the lower level managers and constructs (which in this context would still be an improvement over current implementations based on Joel' current proposal for a show manager). The pros with this approach is that typical or happy path implementations should have a very quick time to market, but it doesn't help more complicated implementations. A compromise that I think addresses some of the concerns would be to utilize the proposed pattern, but instead of using UIButton, etc directly, create subclasses with the added SDL properties, etc (or modify the existing classes to conform to their UIKit equivalents. In this example perhaps SDLButton could subclass UIButton. The pro of this approach is that it should be able to cover everything that most implementations need, the con is that it is not quite as seamless as the original proposal. I think this approach will let developers build out SDL applications in the way they are accustomed to implementing things, and I am not sure implementing/extending things to conform to UIKit is any more or less burden than trying to emulate UIKits patterns in SDL-only classes. |
The Steering Committee voted to defer this proposal, as they agreed that more detailed discussion should occur in a workshop setting. This proposal will be deferred until a workshop takes place to determine next steps. |
During the workshop, it was determined that there are two options for the UI:
The initial pros and cons for each option are included in the workshop meeting minutes. The attendees at the workshop were in agreement to move forward with the second option. Once a proposal for the second option has been entered, the Steering Committee will vote between this proposal and that one. |
The Steering Committee voted to reject this proposal in favor of SDL 0156 - High level interface: Foundation |
Hello SDL community,
The review of "Enhanced iOS Proxy Interface" begins now and runs through January 30, 2018. The proposal is available here:
https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0133-EnhancediOSProxyInterface.md
Reviews are an important part of the SDL evolution process. All reviews should be sent to the associated Github issue at:
#379
What goes into a review?
The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of SDL. When writing your review, here are some questions you might want to answer in your review:
Please state explicitly whether you believe that the proposal should be accepted into SDL.
More information about the SDL evolution process is available at
https://github.com/smartdevicelink/sdl_evolution/blob/master/process.md
Thank you,
Theresa Lech
Program Manager - Livio
theresa@livio.io
The text was updated successfully, but these errors were encountered: