{"id":20282224,"url":"https://github.com/teqneers/ext-application","last_synced_at":"2025-05-07T18:31:14.487Z","repository":{"id":57066776,"uuid":"39444497","full_name":"teqneers/ext-application","owner":"teqneers","description":"A base component to integrate Sencha Ext JS into a PHP application","archived":false,"fork":false,"pushed_at":"2022-07-25T08:21:41.000Z","size":146,"stargazers_count":7,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-09T03:52:54.913Z","etag":null,"topics":["extjs","php","php-library","sencha"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teqneers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-21T12:39:10.000Z","updated_at":"2022-03-23T08:01:48.000Z","dependencies_parsed_at":"2022-08-24T14:23:42.393Z","dependency_job_id":null,"html_url":"https://github.com/teqneers/ext-application","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teqneers%2Fext-application","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teqneers%2Fext-application/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teqneers%2Fext-application/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teqneers%2Fext-application/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teqneers","download_url":"https://codeload.github.com/teqneers/ext-application/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224632820,"owners_count":17343925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["extjs","php","php-library","sencha"],"created_at":"2024-11-14T14:08:35.952Z","updated_at":"2024-11-14T14:08:36.688Z","avatar_url":"https://github.com/teqneers.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ext-application\n\nA base component to integrate Sencha Ext JS into a PHP application\n\n[![Build Status](https://github.com/teqneers/ext-application/actions/workflows/php.yml/badge.svg)](https://github.com/teqneers/ext-application/actions/workflows/php.yml)\n\n## Introduction\n\nThis library provides a simple abstraction around the different requirements when running Sencha Ext JS 6\n(even though 5 should work as well) applications from a development and a production context using server generated\npages. Development and production builds use different source trees to serve application files from. This process is\nbased on a so-called [manifest and a Javascript micro-loader](http://docs.sencha.com/cmd/6.x/microloader.html). To make\nsure this process works seamlessly with server generated pages and routing, the library hooks into the manifest\ngeneration and dynamically modifies the manifest based on the required environment and context.\n\nCurrently this library is only used as the foundation\nof [teqneers/ext-application-bundle](https://github.com/teqneers/ext-application-bundle), a Symfony bundle that\nintegrates Ext JS into a Symfony based application. We have not tried to use the library as a stand-alone component or\nin any other context than a Symfony environment, so the following is only how it should work theoretically without the\nbundle. We'd appreciate any help and contribution to make the library more useful outside the bundle.\n\n## Installation\n\nYou can install this library using composer\n\n    composer require teqneers/ext-application\n\nor add the package to your composer.json file directly.\n\n## Example\n\nGiven the following directory structure of a fictitious application\n\n    ./\n    |-- src/            Application source code\n    |-- htdocs/         Public web-facing directory (document root)\n    |   |-- index.php   PHP front controller\n    |   |-- app/        Root folder for Ext JS application production build\n    |-- my-app/         The Ext JS application source folder (sencha generate app -ext MyApp ./my-app)\n\nyou should configure your application (e.g. from index.php)\n\n```php\n$config = \\TQ\\ExtJS\\Application\\Configuration\\ApplicationConfiguration(\n    __DIR__ . '/../my-app',     // the absolute path to the Ext JS application workspace\n    '../my-app',                // the relative path from the public web-facing directory to the Ext JS application workspace\n    __DIR__,                    // the absolute path to the public web-facing directory\n    '/'                         // the relative path from the  public web-facing directory to the root directory used for production build artifacts (usually /)\n);\n\n// add a default build\n$config-\u003eaddBuild(\n    'default',          // the build name (just for referencing the build)\n    '/',                // the application path relative to the Ext JS application workspace (usually / unless you have multiple applications and/or packages in a single workspace)\n    'app',              // the application path relative to the root directory used for production build artifacts\n    'manifest.json',    // the build manifest filename for development builds\n    'bootstrap.js',     // the micro-loader filename for development builds\n    null,               // the application cache manifest filename for development builds (usually NULL)\n    'bootstrap.json',   // the build manifest filename for production builds\n    'bootstrap.js',     // the micro-loader filename for production builds\n    'cache.appcache'    // the application cache manifest filename fro production builds\n);\n\n$application = new \\TQ\\ExtJS\\Application\\Application(\n    $config,\n    new \\TQ\\ExtJS\\Application\\Manifest\\ManifestLoader(),\n    'dev' // dev or prod depending on wether you want to run from development or drom production build\n);\n\n$microLoader = $application-\u003egetMicroLoaderFile(); // returns a \\SplFileInfo for the configured micro-loader\n$hasAppCache = $application-\u003ehasAppCache();\nif ($hasAppCache) {\n    $appCache = $application-\u003egetAppCacheFile(); // returns a \\SplFileInfo for the configured application cache manifest\n}\n$manifest    = $application-\u003egetManifest('/htdocs'); // returns a \\TQ\\ExtJS\\Application\\Manifest\\Manifest configured correctly when running document root on your application base path\n\necho $manifest; // outputs the manifest\n```\n\nWhen running the application in development mode, you have to make sure that your web server's document root is one\nlevel up from the (regular) public web-facing directory so that the web server can serve files from the Ext JS\napplication workspace as well.\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2021 TEQneers GmbH \u0026 Co. KG\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit\npersons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the\nSoftware.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE\nWARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteqneers%2Fext-application","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteqneers%2Fext-application","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteqneers%2Fext-application/lists"}