Results 1 to 4 of 4

Thread: Add existing app as a dependency to a new one to reuse the code

  1. #1
    Sencha User
    Join Date
    Aug 2017
    Location
    Berlin, Germany
    Posts
    2

    Default Add existing app as a dependency to a new one to reuse the code

    Hello Everybody,

    I tackle the following problem. We have a ready product from which want to create a little-modified version for a customer.
    The goal is NOT to copy the code from the product and modify it. We want to add the existing app to some kind of
    a dependency to the new one and only overwrite the specific new behavior. Until now I tried to add the existing app to the
    classpath of the app.json from the new one. But then it turns out that it's NOT possible to serve the dependencies from the app
    in the right way.

    I really don't have any idea if I go there the right way. I tried to google but doesn't find any case where some one had the same issue. Maybe you guys have any ideas how to solve this problem without just copy the code from the old app? Or if this is even possible in sencha?

    Thank you a lot,

    Jan

    By the way, i use:

    - Sencha cmd: Sencha Cmd v6.5.1.240
    - ExtJS: ext-6.5.1

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Ideally you would create code that both applications would use. Are you using Cmd to build your application? You could organize your code into packages.
    http://docs.sencha.com/cmd/guides/cm..._packages.html

  3. #3
    Sencha User
    Join Date
    Aug 2017
    Location
    Berlin, Germany
    Posts
    2

    Default

    Hi Gary,

    thank you for your answer. Yes, I use Sencha CMD and yes I already use packages now. I have the scenario I need running with the starter apps, so basically it is working. Now I have the problem that when I try it with the real application that I run into an error. Maybe do you have an idea why the app behaves differently when I run it from a package? It is working when I start the app normally :/. You can see the error in the screenshot.Bildschirmfoto 2017-08-17 um 10.02.21.jpg

  4. #4
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    I personally can't identify the issue from those errors, and I couldn't find any matching reports. Are you certain that all of your classes are included in 'requires' configs of the classes that use them?

Similar Threads

  1. Problem using abstract classes for code reuse
    By Link_ in forum Ext JS 6.x Q&A
    Replies: 6
    Last Post: 23 Feb 2017, 11:43 AM
  2. Code reuse across Web (Ext JS) and Mobile (Touch) applications?
    By misterblinky in forum Community Discussion
    Replies: 7
    Last Post: 25 Jul 2013, 10:23 PM
  3. Can I reuse Java code with Sencha touch?
    By nkhedkar in forum Sencha Touch 2.x: Q&A
    Replies: 1
    Last Post: 20 Mar 2013, 11:05 AM
  4. [Solved] How to reuse a same GridPanel code in application
    By buntyindia in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 5 Jan 2009, 10:34 PM
  5. Very Stupid code reuse question
    By Cyberangel67 in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 16 Mar 2008, 1:02 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •