locked
how to include LS project into other project? RRS feed

  • Question

  • I have created a lightswitch project that needs to be part of all other LS projects. It has a small data model and a few screens. 
    Is there a way to include this project into other projects? i'm Not sure if i crate this project as a shell proj would that work and how to do this.
    Idea anybody
    Wednesday, June 11, 2014 5:04 PM

Answers

  • There is no way of including one LS app in another or of copying models and screens from one LS app to another.

    The possible extension points are Custom Controls, Themes, Shells, and screen templates. None of these seem to fit with what you want.

    The community has been asking for modular development features for a while now but the requirement hasn't been addressed yet.


    Simon Jones
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to "Mark as Answer". This will help other people find answers to their problems more quickly.

    • Marked as answer by Angie Xu Friday, June 20, 2014 1:43 AM
    Wednesday, June 11, 2014 8:44 PM

All replies

  • There is no way of including one LS app in another or of copying models and screens from one LS app to another.

    The possible extension points are Custom Controls, Themes, Shells, and screen templates. None of these seem to fit with what you want.

    The community has been asking for modular development features for a while now but the requirement hasn't been addressed yet.


    Simon Jones
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to "Mark as Answer". This will help other people find answers to their problems more quickly.

    • Marked as answer by Angie Xu Friday, June 20, 2014 1:43 AM
    Wednesday, June 11, 2014 8:44 PM
  • Definitely one of the most requested features to be able to do modular development as well as adding multiple HTML clients to the same LS project and so on.

    The recent change where each screen and entity are now defined in their own LSML file makes some of this a little easier as you can now relatively easily copy and paste screens from one LS project to another.

    Some workaround ideas for you for now (that may work):

    1/ Use your existing LS project as a data source only for other LS projects to consume. When publishing a LS project you can publish only the datasource for example. This will provide the re-usable data source.

    2/ For each new project that you create, first import the shared/external data source and then create a dummy blank screen for each of the reusable screens that you have. Then copy and paste the *.lsml and *.js file for each of the reusable screens from your main project to the new project. It would be best to close the target LS project during the copy & paste exercise.

    Not ideal and quite a bit of manual work, but once you've mastered this it you could possibly automate some of this with scripting.

    Hope this gives you some additional options.


    Regards, Xander. My Blog

    Wednesday, June 11, 2014 10:23 PM