Skip to content
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

Example app with ExtJS 5 #351

Open
chrismayer opened this issue Apr 17, 2015 · 5 comments
Open

Example app with ExtJS 5 #351

chrismayer opened this issue Apr 17, 2015 · 5 comments

Comments

@chrismayer
Copy link
Contributor

Hi all,

today I started creating a new example app with ExtJS 5 and an MVVM architecture approach. My goal was to get an app like the one we have (http://geoext.github.io/geoext2/examples/app/simple/simple.html) but with the before mentioned new techniques. So far so good the app is more or less ready. Due to the fact the app is build with Sencha Cmd I am not sure what I really need to commit. Several questions or concerns:

  • are folders like build/development necessary?
  • how to solve the GeoExt package dependency? As far as I understood the whole GeoExt project needs to be placed in packages/GeoExt which would end in an ugly recursion, or not?
  • I think the app example is not just about having an online example, also the source code should be available in the repository, so just just committing the compiled files isn't a good option or?
  • Maybe we don't care about the size of the raw project and just add it to the GeoExt repo?

I wanted to hear what the Sencha Cmd specialists @KaiVolland and @bentrm say to this before opening a PR (and of course any other opinion).

@KaiVolland
Copy link
Contributor

Hi,
i also did some work on "geoext3". https://github.com/kaivolland/geoext3 For now i ported the code of the pullrequest in geoext2 from @bartvde. Everything i did there was more or less in consultation with @marcjansen.
Obviously we should improve our communication. My bad i guess...
In my local repository i even tried to use ExtJS 6 but i couldn't get sench cmd to build my package...
Kind Regards,
Kai

@bentrm
Copy link
Member

bentrm commented Apr 17, 2015

are folders like build/development necessary?

I think it is best to only commit raw source in master and commit builds in gh-pages?

how to solve the GeoExt package dependency?

I think packages have a notion of "examples" which may be applicable here but kind of conflict with the fact that ExtJS lives outside of the package directory. In fact, generating a package via sencha generate package will also create an examples directory inside that package directory. Also, within an ExtJS workspace the Cmd tool seems to be pretty good at resolving dependencies walking up the directory structure to the root folder (no need to have packages folder inside example app). I have the following right now:

workspace/
    .sencha/                        -- workspace specific configuration
    ext/                                -- ExtJS framework
    build/                             -- builds of all apps, example apps etc. end up here
    packages/
        GeoExt/                     -- clone of geoext/geoext2 repository
            examples/
                simpleApp/
                    app.json
                    app/               -- example app source files
                    .sencha/        -- app specific configuration
            src/

By running sencha app build inside simpleApp/ the build actually ends up outside of the scope of the the GeoExt directory as pictured above. It is possible to change the output directory of an apps build in app.json like this:

{
    "name": "simpleApp",
    "output": "../../build",
    "requires": [
        "GeoExt"
    ]
}

@marcjansen
Copy link
Member

@KaiVolland: I don't think that @chrismayer's work was the same you did. If I get him right, he wants to build an example application using ExtJS 5.1, OpenLayers 2.13.1 and GeoExt 2.1. This would eventually end up in Geoext 2.1.

@chrismayer
Copy link
Contributor Author

Hi all,
thanks for your replies. Unfortunately I did not receive any notification mail, so sorry for my late response.

If I get him right, he wants to build an example application using ExtJS 5.1, OpenLayers 2.13.1 and GeoExt 2.1. This would eventually end up in Geoext 2.1.
Jip, right. Just an example MVVM app as a possible further example for GeoExt 2.1

@bentrm

are folders like build/development necessary?

I think it is best to only commit raw source in master and commit builds in gh-pages?

Sounds good to me.
I will also have a look to get your approach running with the package dependency within the next days.

So, I guess I will provide a PR which then can be checked by you, so we can iterate towards a good solution for the lib.

@bentrm
Copy link
Member

bentrm commented Apr 24, 2015

I just noticed the Readme.md that is generated for new packages in the package/examples. I think this explains it even better and demonstrates how to deal with potential builds:

This folder contains example applications demonstrating this package. Each of
these applications will be built as part of the package build:

    cd /path/to/package
    sencha package build

As applications, they can also be built individually:

    cd /path/to/package/examples/example-app
    sencha app build

Or you can build all examples as a group:

    cd /path/to/package
    sencha ant examples

The ideal location for the example builds to reside is the `"./build"` folder:

    /path/to/package/
        src/
        resources/
        ...
        examples/
            example-app/
            other-example/
        ...
        build/
            resources/
            examples/
                example-app/
                other-example/

This can be specified in the `".sencha/app/build.properties"` file for the
example applications:

    build.dir=${package.build.dir}/examples/${app.name}

For GeoExt I removed the required build files build.xml etc. in #350 to cut down on cruft that would not be needed for simply using GeoExt as a package. Maybe it's desired to add some of this functionality?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants