Start a new topic

Best way to code with kinvey studio

This wouldn't be a critic, instead it is an opportunity for me to understand better the environment.


I'm trying to understand logics behind kinvey studio, because I have to choose an app creation environment. Initially I've been attracted from Nativescript, and it would be my choise. Then, until I made my experiments, I've seen kinvey studio and its great potential.


What I can't understand is how to proceed in cases where the development environment doesn't allow me to "configure" but I have to move on to write code specifically to do what I need.

An example: I understood how to access data but it is not clear to me how to put a calculated value in a label or in a textbox (I can't code it because I can't change the html file)

I can work on one ts file and one css file, but how can I do if the components available in the environment are not enough to do what I want, since I can't modify the html file in any way?

The components available at the moment seem to be few, compared to what is offered by Nativescript.


Initially I thought it was possible to switch between Kinvey Studio and Nativescript Environment, but I seem to have read that this is not possible, or not raccomended.


My feeling is that Kinvey Studio does not allow me to achieve that degree of customization that almost any software requires. Almost certainly I didn't understand how to best use the environment, but I read the documentation and didn't find a solution.


At last, do you have a scheduled roadmap for Kinvey Studio?


Thank you


Ellis


1 person has this question
1 Comment

Hello Ellis,


Thank you for sharing your experience with Kinvey Studio. We find such feedback very valuable as it help us to identify what is missing in the product or its documentation. I hope the answer provided below contains sufficient information, otherwise, please let me know on which parts you need further details and I'll do my best to share more on the particular subject. 


Kinvey Studio is still a relatively young product and there are still some things that can't be done directly through the client and require custom manipulation of the code. However, as you have mentioned, there are also some limitations that affect the level of customization through editing the custom code. This is the exact thing on which we have been focusing lately - "untie" the hands of the developers and let them modify and customize as much files as possible. For example, at the moment our team is looking for ways to allow the editing of HTML (XML) files, which seems to be the biggest concern for a lot of people, including you.


Here is a list of some of the features that are already available and are intended to unblock the users and let them extend their apps, and accomplish many custom scenarios.

  • by having an expressions for the one-way binding components (e.g. Label has a Text property), which is a combo-box and you can write expressions like `{{ myProp }}` for binding to a custom field from the code behind
  • by adding a Custom XML/HTML component in a view in order to write a custom html inside the auto-generated file
  • by adding additional properties from the Advanced group of each component in the designer in order to add any attribute and value to any Kinvey Studio component
  • by using the custom code .ts/.css files with the `// Write your custom logic` header
  • by using the .config .ts files in order to change the NgModule configuration to override system components or the routing module configuration etc
  • by adding custom code views, which only let KS handle the routing configuration of the view and the users get to write there own html, ts, css files
  • by using the utils service. The `utils.service.tns` is a custom code file which is imported by the auto-generated base class files in each view. It can be used as a quick and easy extensibility point for shared properties of functions. For example in a Label’s Text property, you can add an expression binding to utils by adding something like `{{ utilsService.myProp }}`


For the case with “calculated value”, you could add a get property or a function in the custom code .ts file of the view and reference it in the expression binding of the Label, just by using something like `{{ myProp }}`. The textbox requires a two-way binding that is why the expression binding cannot be used there, but the Text field is a combo-box, which allows custom values so you can bind it to a custom field by just writing `myProp`.


Regarding the option to switch between Kinvey Studio and "pure" NativeScript development, this is not something that we recommend. However, as long as you do not modify the auto-generated files, you should be able to return to Kinvey Studio without losing any changes made to your app outside the client.


For the time being, the Kinvey Studio roadmap is indented only for internal use, but I'll check with our product manager if there is an option to make the whole things (or at least parts) publicly available.


I hope this is of any help.


Regards,

Garo


1 person likes this
Login or Signup to post a comment