Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6224783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:43:44+00:00 2026-05-24T08:43:44+00:00

Assume you have built (coded) your MVC Sencha Touch App with a bunch of

  • 0

Assume you have built (coded) your MVC Sencha Touch App with a bunch of Views, Controllers, Models, Stores, Utils etc…

Whats the best way to “build” the application for production use?

Tasks would be:

  • Concat and minify all JS Source Files
  • Concat and minify Stylesheets (basically running Compass with production environment)
  • Remove not needed folders

Has anyone done this yet with either JSBuilder or Apache Ant? I find the JSBuilder solution integrated with the Sencha Touch lib quite buggy and undocumented. Apache Ant would perfectly fit in with “bigger” build- or CI-systems like Jenkins but I miss a good example how to achive this with a Sencha Touch app.

So the question is, how should a build script for Sencha Touch look like?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:43:46+00:00Added an answer on May 24, 2026 at 8:43 am

    EDIT: Warning: this is an old answer, today there might be better ways to do this. Modern build tools for javascript have come a long way since 2011.

    I actually did just this today.

    First I considered using sprockster, since I liked the c/c++ include style of defining script dependencies.

    I ended up using Apache ant because some of my team members are somewhat afraid of ruby.
    Apache ant also seemed like a more universal and well documented tool.

    I haven’t figured out how to build the sass files automatically just yet, but that shouldn’t be too difficult.

    The process i use is kind of simple:

    1. concatenate all js files and place them in the build folder
    2. minify all js files in the build folder and rename them *-min.js
    3. copy all required files to the dist folder (including images, sencha-touch.js, index file etc)

    This is what i ended up with:

    <project name="ProjectApp" default="dist" basedir=".">
        <description>
            Project Manager build file
            dist-debug is the target that's best for debugging
            Run ant dist-debug to build the project
        </description>
        <!-- set global properties for this build -->
        <property name="src" location="src"/>
        <property name="lib" location="lib"/>
        <property name="build" location="build"/>
        <property name="dist"  location="dist"/>
        <property name="utils"  location="utils"/>
        <property name="img"  location="img"/>
    
        <target name="init">
            <!-- Create the build directory structure used by compile -->
            <mkdir dir="${build}"/>
        </target>
    
        <target name="concatenate" depends="init" description="Concatenate all js files">
            <concat destfile="${build}/application.js" fixlastline="yes">
                <fileset file="${src}/js/app.js" />
                <fileset file="${src}/js/observablize.js" />
                <fileset file="${src}/js/config.js" />
    
                <!-- Models -->
                <fileset file="${src}/js/models/Project.js" />
                <fileset file="${src}/js/models/ProjectInformation.js" />
                <fileset file="${src}/js/models/Picture.js" />
                <fileset file="${src}/js/models/Milestone.js" />
                <fileset file="${src}/js/models/Risk.js" />
                <fileset file="${src}/js/models/data.js" />
                <fileset file="${src}/js/models/Invoice.js" />
                <fileset file="${src}/js/models/Customer.js" />
                <fileset file="${src}/js/models/OpenItem.js" />
                <fileset file="${src}/js/models/favorites.js" />
                <fileset file="${src}/js/models/mockObjects.js" />
    
                <!-- Database -->
                <fileset file="${src}/js/database/createTables.js" />
                <fileset file="${src}/js/database/database.js" />
                <fileset file="${src}/js/database/projectObserver.js" />
    
                <!-- Network -->
                <fileset file="${src}/js/network/network.js" />
                <fileset file="${src}/js/network/queries.js" />
                <fileset file="${src}/js/network/parseProjectServiceProject.js" />
                <fileset file="${src}/js/network/parseQueryEngineProjects.js" />
                <fileset file="${src}/js/network/parseDocArchiveSearchResponse.js" />
                <fileset file="${src}/js/network/parseDocArchiveDataResponse.js" />
                <fileset file="${src}/js/network/parseQueryEngineInvoices.js" />
                <fileset file="${src}/js/network/parseQueryEngineCustomer.js" />
    
                <!-- Views -->
                <fileset file="${src}/js/views/Viewport.js" />
                <fileset file="${src}/js/views/XTemplates.js" />
                <fileset file="${src}/js/views/Login.js" />
                <fileset file="${src}/js/views/ProjectList/ActionSheet.js" />
                <fileset file="${src}/js/views/ProjectList/ProjectView.js" />
                <fileset file="${src}/js/views/ProjectList/ProjectList.js" />
                <fileset file="${src}/js/views/ProjectList/ProjectsLists.js" />
                <fileset file="${src}/js/views/ProjectInfo.js" />
                <fileset file="${src}/js/views/ProjectRisks.js" />
                <fileset file="${src}/js/views/ProjectMilestones.js" />
                <fileset file="${src}/js/views/ProjectDetail.js" />
                <fileset file="${src}/js/views/Overlays.js" />
    
                <!-- Controllers -->
                <fileset file="${src}/js/controllers/login.js" />
                <fileset file="${src}/js/controllers/projects.js" />
            </concat>
        </target>
    
        <target name="compress" depends="concatenate" description="Compress application.js to application-min.js">
            <apply executable="java" parallel="false">
                <filelist dir="${build}" files="application.js" />
                <arg line="-jar" />
                <arg path="${utils}/yuicompressor-2.4.6.jar" />
                <srcfile />
                <arg line="-o" />
                <mapper type="glob" from="*.js" to="${build}/*-min.js" />
                <targetfile />
            </apply>
        </target>
    
        <target name="dist-debug" depends="concatenate" description="generate the distribution">
            <!-- Create the distribution directory -->
            <mkdir dir="${dist}"/>
    
            <!-- copy over the required files -->
    
            <!-- required libraries -->
            <!-- sencha touch -->
            <copy file="${lib}/sencha-touch/sencha-touch.js" todir="${dist}"/>
    
            <!-- stylesheet -->
            <copy file="${build}/application.css" todir="${dist}"/> 
    
            <!-- index file -->
            <copy file="${src}/index.html" todir="${dist}"/>
    
            <!-- manifest file -->
            <copy file="${src}/cache.manifest" todir="${dist}"/>
    
            <!-- app javascript -->
            <copy file="${build}/application.js" tofile="${dist}/application.js"/>
    
            <!-- images -->
            <copy file="${img}/icon.png" todir="${dist}"/>
            <copy file="${img}/startup.png" todir="${dist}"/>
            <copy file="${img}/disclosure.png" todir="${dist}"/>
    
        </target>
    
        <target name="dist" depends="dist-debug,compress" description="generate minified distribution"> 
            <!-- app javascript -->
            <copy file="${build}/application-min.js" tofile="${dist}/application.js"/>  
        </target>   
    
        <target name="clean" description="clean up" >
            <!-- Delete the ${build} and ${dist} directory trees -->
            <delete dir="${build}"/>
            <delete dir="${dist}"/>
        </target>
    
    </project>
    

    As you can see, I specify every single file in my project. This is just to get the order right. If your code is better written than mine, and don’t have any dependencies, you could just include an entire source folder.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Assume I have an ASP.NET MVC app that's not doing anything too fancy (no
I have built a simple rails app with three classes that inherit from ActiveRecord
Assume I have a class foo, and wish to use a std::map to store
Assume I have created a compiled re: x = re.compile('^\d+$') Is there a way
Assume I have a function template like this: template<class T> inline void doStuff(T* arr)
Assume you have some objects which have several fields they can be compared by:
Assume I have 10 Methods and 10 Properties. Is there a way to add
Assume I have a form class SampleClass(forms.Form): name = forms.CharField(max_length=30) age = forms.IntegerField() django_hacker
Assume we have a method like this: public IEnumerable<T> FirstMethod() { var entities =
Assume you have five products, and all of them use one or more of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.