ExtJS: Difference between revisions
Jump to navigation
Jump to search
(34 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Sencha CMD== | |||
<syntaxhighlight lang="bash"> | |||
unzip SenchaCmd-7.5.1.20-linux-amd64.sh.zip | |||
sudo sh SenchaCmd-7.5.1.20-linux-amd64.sh | |||
export SENCHA_CMD='/opt/cli/sencha/cmd' | |||
export OPENSSL_CONF='/etc/ssl' | |||
export PATH=$PATH:$SENCHA_CMD | |||
mkdir -p ~/.sencha/cmd | |||
cat << EOF > $HOME/.sencha/cmd/sencha.cfg | |||
#------------------------------------------------------------------------------ | |||
# The folder for the local package repository. By default, this folder is shared | |||
# by all versions of Sencha Cmd. In other words, upgrading Sencha Cmd does not | |||
# affect the local repository. | |||
repo.local.dir=${HOME}/.sencha/cmd/repo | |||
EOF | |||
sencha diag show | |||
</syntaxhighlight> | |||
==Optionally== | ==Optionally== | ||
< | <syntaxhighlight lang="bash"> | ||
# using classic toolkit for web application | # using classic toolkit for web application | ||
sencha -sdk=$HOME/.chorke/academia/sdk/ext-6.2.0 generate app Web -classic ui.web | sencha -sdk=$HOME/.chorke/academia/sdk/ext-6.2.0 generate app Web -classic ui.web | ||
Line 6: | Line 28: | ||
cd ui.web;sencha app build | cd ui.web;sencha app build | ||
sencha web start | sencha web start | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="bash"> | ||
# using modern toolkit for mobile application | # using modern toolkit for mobile application | ||
sencha -sdk=$HOME/.chorke/academia/sdk/ext-6.2.0 generate app Mob -modern ui.mob | sencha -sdk=$HOME/.chorke/academia/sdk/ext-6.2.0 generate app Mob -modern ui.mob | ||
Line 14: | Line 36: | ||
cd ui.mob;sencha app build | cd ui.mob;sencha app build | ||
sencha web start | sencha web start | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="bash"> | ||
if [ ! -f 'workspace.json' ]&&[ ! -d 'ext' ];then \ | if [ ! -f 'workspace.json' ]&&[ ! -d 'ext' ];then \ | ||
sencha -sdk=$HOME/.chorke/academia/sdk/ext-6.2.0 generate workspace .;\ | sencha -sdk=$HOME/.chorke/academia/sdk/ext-6.2.0 generate workspace .;\ | ||
fi | fi | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="bash"> | ||
if [ ! -d 'ext' ];then \ | if [ ! -d 'ext' ];then \ | ||
sencha app install $HOME/.chorke/academia/sdk/ext-6.2.0;\ | sencha app install $HOME/.chorke/academia/sdk/ext-6.2.0;\ | ||
fi | fi | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="bash"> | ||
sencha app build --clean --dev | sencha app build --clean --dev | ||
sencha app build --clean --pro | sencha app build --clean --pro | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="bash"> | ||
sencha package upgrade | sencha package upgrade | ||
sencha app upgrade | sencha app upgrade | ||
sencha app refresh | sencha app refresh | ||
sencha app watch | sencha app watch | ||
</ | </syntaxhighlight> | ||
==Simplified== | ==Simplified== | ||
< | <syntaxhighlight lang="bash"> | ||
# using classic toolkit for web application | # using classic toolkit for web application | ||
sencha -sdk $HOME/.chorke/academia/sdk/ext-6.2.0 generate app -classic Web ./ui.web;\ | sencha -sdk $HOME/.chorke/academia/sdk/ext-6.2.0 generate app -classic Web ./ui.web;\ | ||
Line 52: | Line 74: | ||
cd ui.mob;sencha app build;\ | cd ui.mob;sencha app build;\ | ||
sencha web start | sencha web start | ||
</ | </syntaxhighlight> | ||
==Remote REST== | ==Remote REST== | ||
< | <syntaxhighlight lang="js"> | ||
Ext.define( 'CKo.store.m00.sm.M00SM00X00', { | Ext.define( 'CKo.store.m00.sm.M00SM00X00', { | ||
extend: 'Ext.data.Store', | extend: 'Ext.data.Store', | ||
Line 88: | Line 110: | ||
} | } | ||
}); | }); | ||
</ | </syntaxhighlight> | ||
==ExtJS Hacks== | ==ExtJS Hacks== | ||
< | <syntaxhighlight lang="properties"> | ||
;ExtJS 6.2 GPL Example KitchenSink | ;ExtJS 6.2 GPL Example KitchenSink | ||
KitchenSink : 677~ 857 | KitchenSink : 677~ 857 | ||
Line 105: | Line 127: | ||
Cookies : 243,788~243,827 | Cookies : 243,788~243,827 | ||
prettyPrint : 243,828~245,738 | prettyPrint : 243,828~245,738 | ||
</ | </syntaxhighlight> | ||
==Bootstrap== | ==Bootstrap== | ||
{| | {| | ||
| valign="top" | | | valign="top" | | ||
< | <syntaxhighlight lang="js"> | ||
CKi.app.load.lib.init(); | CKi.app.load.lib.init(); | ||
CKi.app.load.dbs.init(); | CKi.app.load.dbs.init(); | ||
CKi.app.load.gui.init(); | CKi.app.load.gui.init(); | ||
</ | </syntaxhighlight> | ||
| valign="top" | | | valign="top" | | ||
< | <syntaxhighlight lang="js"> | ||
CKi.app.load.lib.done(); | CKi.app.load.lib.done(); | ||
CKi.app.load.dbs.done(); | CKi.app.load.dbs.done(); | ||
CKi.app.load.gui.done(); | CKi.app.load.gui.done(); | ||
</ | </syntaxhighlight> | ||
| valign="top" | | | valign="top" | | ||
< | <syntaxhighlight lang="js"> | ||
CKi.app.load.init(); | CKi.app.load.init(); | ||
CKi.app.load.done(); | CKi.app.load.done(); | ||
</ | </syntaxhighlight> | ||
|} | |} | ||
Line 133: | Line 155: | ||
ssh -L 1841:localhost:1841 [email protected] | ssh -L 1841:localhost:1841 [email protected] | ||
< | <syntaxhighlight lang="bash"> | ||
export app='PWa';\ | export app='PWa';\ | ||
export SDK_VERSION='6.2.0';\ | export SDK_VERSION='6.2.0';\ | ||
Line 143: | Line 165: | ||
cd $dir;sencha app build --clean --pro;sencha app build -clean --dev;\ | cd $dir;sencha app build --clean --pro;sencha app build -clean --dev;\ | ||
sencha app watch | sencha app watch | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="bash"> | ||
mvn clean install;\ | mvn clean install;\ | ||
export pwa=academia-apps-ui.pwa;\ | export pwa=academia-apps-ui.pwa;\ | ||
Line 159: | Line 181: | ||
pwd | pwd | ||
EOF | EOF | ||
</ | </syntaxhighlight> | ||
==Deploy Icons== | ==Deploy Icons== | ||
< | <syntaxhighlight lang="bash"> | ||
t='green_dark';\ | t='green_dark';\ | ||
z=appicon_$t.zip;\ | z=appicon_$t.zip;\ | ||
Line 171: | Line 193: | ||
cp $t/$d/round/*.png icons/pwa/$d/;done;rm -rf $t;zip -r $z .;\ | cp $t/$d/round/*.png icons/pwa/$d/;done;rm -rf $t;zip -r $z .;\ | ||
scp $z [email protected]:/var/chorke/www/repo/cmd/sencha/pwa/;rm -rf $z | scp $z [email protected]:/var/chorke/www/repo/cmd/sencha/pwa/;rm -rf $z | ||
</ | </syntaxhighlight> | ||
==Component== | ==Component== | ||
Line 199: | Line 221: | ||
* [https://www.sencha.com/blog/top-10-ext-js-development-practices-to-avoid-2/ Top 10 Ext JS Development Practices to Avoid] | * [https://www.sencha.com/blog/top-10-ext-js-development-practices-to-avoid-2/ Top 10 Ext JS Development Practices to Avoid] | ||
* [https://stackoverflow.com/questions/37199369 React Routing with Spring MVC] | * [https://stackoverflow.com/questions/37199369 React Routing with Spring MVC] | ||
* [https:// | * [https://examples.sencha.com/ExtReact/7.0.0/kitchensink/frame-index.html#/ Kitchen Sink » ExtReact 7.0.0] | ||
* [https://examples.sencha.com/ | * [https://examples.sencha.com/extjs/7.4.0/examples/kitchensink/frame-index.html?classic#all Kitchen Sink » Ext JS 7.4.0] | ||
* [ | * [https://examples.sencha.com/extjs/7.3.0/examples/kitchensink/frame-index.html?classic#all Kitchen Sink » Ext JS 7.3.0] | ||
* [https://examples.sencha.com/extjs/7.1.0/examples/kitchensink/frame-index.html?classic#all Ext JS | * [https://examples.sencha.com/extjs/7.1.0/examples/kitchensink/frame-index.html?classic#all Kitchen Sink » Ext JS 7.1.0] | ||
* [https://examples.sencha.com/extjs/7.0.0/examples/kitchensink/frame-index.html?profile=triton Ext JS | * [https://examples.sencha.com/extjs/7.0.0/examples/kitchensink/frame-index.html?profile=triton Kitchen Sink » Ext JS 7.0.0] | ||
* [http://examples.sencha.com/extjs/6.6.0/examples/kitchensink/frame-index.html?classic Ext JS | * [http://examples.sencha.com/extjs/6.6.0/examples/kitchensink/frame-index.html?classic Kitchen Sink » Ext JS 6.6.0] | ||
* [http://examples.sencha.com/extjs/6.2.0/examples/kitchensink/frame-index.html?profile=crisp Ext JS | * [http://examples.sencha.com/extjs/6.2.0/examples/kitchensink/frame-index.html?profile=crisp Kitchen Sink » Ext JS 6.2.0] | ||
* [http://cdn.medisys.com.my/docs/ext-6.0.0/build/examples/kitchensink/?profile=crisp Ext JS | * [http://cdn.medisys.com.my/docs/ext-6.0.0/build/examples/kitchensink/?profile=crisp Kitchen Sink » Ext JS 6.0.0] | ||
| valign="top" | | | valign="top" | | ||
Line 213: | Line 235: | ||
* [https://docs.sencha.com/extjs/6.2.0/guides/components/introduction_to_charting.html Introduction to Charting] | * [https://docs.sencha.com/extjs/6.2.0/guides/components/introduction_to_charting.html Introduction to Charting] | ||
* [https://docs.sencha.com/extjs/6.6.0-CE Ext JS Docs 6.6.0-CE] | * [https://docs.sencha.com/extjs/6.6.0-CE Ext JS Docs 6.6.0-CE] | ||
* [https://www.sencha.com/blog/graphql-with-extjs-a-tutorial GraphQL with Ext JS] | |||
* [http://cdn.medisys.com.my/docs/ext-6.0.0/docs Ext JS Docs 6.2.0] | * [http://cdn.medisys.com.my/docs/ext-6.0.0/docs Ext JS Docs 6.2.0] | ||
* [http://examples.sencha.com/extjs/ EXT JS Examples] | * [http://examples.sencha.com/extjs/ EXT JS Examples] | ||
Line 218: | Line 241: | ||
* [https://sencha.myget.org/feed/Packages/community Sencha MyGet] | * [https://sencha.myget.org/feed/Packages/community Sencha MyGet] | ||
* [https://docs.sencha.com/cmd/guides/extjs/cmd_app.html Sencha CMD] | * [https://docs.sencha.com/cmd/guides/extjs/cmd_app.html Sencha CMD] | ||
| valign="top" | | | valign="top" | | ||
* [https://docs.sencha.com/extjs/6.6.0-CE/guides/getting_started/open_tooling.html Getting Started with Ext JS Using Open Tooling] | * [https://docs.sencha.com/extjs/6.6.0-CE/guides/getting_started/open_tooling.html Getting Started with Ext JS Using Open Tooling] | ||
* [https://www.sencha.com/blog/creating-progressive-web-applications-using-sencha-ext-js/ Creating Progressive Web Applications (<code>PWA</code>)] | * [https://www.sencha.com/blog/creating-progressive-web-applications-using-sencha-ext-js/ Creating Progressive Web Applications (<code>PWA</code>)] | ||
* [https://stackoverflow.com/questions/61817778 Remove Trial watermark from ExtJS 7 GPL] | |||
* [https://www.brighttalk.com/webcast/11505/464307 <code>React</code> Capabilities to a Sencha Ext JS] | |||
* [https://fontawesome.com/cheatsheet?from=io Font Awesome Free's Cheatsheet] | |||
* [https://glyphicons.bootstrapcheatsheets.com/ Bootstrap Glyphicons for ExtJS] | |||
* [https://sencha.myget.org/profile/Me#!/AccessTokens Sencha MyGet Access Tokens] | * [https://sencha.myget.org/profile/Me#!/AccessTokens Sencha MyGet Access Tokens] | ||
* [https://docs.sencha.com/extjs/6.0.2/guides/core_concepts/font_ext.html Sencha Font Packages] | |||
* [https://gist.github.com/havvg/3925800d1657c53e8df1 ExtJS 6 OAuth2 Impl] | * [https://gist.github.com/havvg/3925800d1657c53e8df1 ExtJS 6 OAuth2 Impl] | ||
* [[Progressive Web App]] | * [[Progressive Web App]] | ||
|- | |||
| colspan="3" | | |||
---- | |||
|- | |||
| valign="top" | | |||
* [https://www.sencha.com/blog/sencha-2021-roadmap-update/ Sencha ExtJS 2021 Roadmap Update] | |||
* [https://www.sencha.com/blog/graphql-with-extjs-a-tutorial/ How to use GraphQL with ExtJS] | |||
* [https://www.baeldung.com/linux/solve-shared-object-error Solving Shared Object Error] | |||
* [https://github.com/Coniglioz/extjs-graphql-app Sencha ExtJS GraphQL App] | |||
* [http://cdn.sencha.com/ext/gpl/ext-7.0.0-gpl.zip Ext-7.0.0-gpl.zip Download] | |||
* [http://cdn.sencha.com/ext/gpl/ext-6.2.0-gpl.zip Ext-6.2.0-gpl.zip Download] | |||
* [https://dev.chorke.org/ui.web Academia Official Theme] | |||
* [https://stackoverflow.com/questions/28981112/ Close a frozen SSH] | |||
* [https://examples.ext.net/ Ext.NET Examples] | |||
* [https://design.ubuntu.com/font/ Ubuntu font] | |||
| valign="top" | | |||
* [https://www.sencha.com/blog/15-best-automation-testing-tools-for-web-applications 15 Best Test Automation Tools For Web App] | |||
* [[How to build Proprietary JavaScript Library]] | |||
* [[JavaScript Proprietary Library Example]] | |||
* [[JavaScript Ali Express Discounted Cart]] | |||
* [https://www.sencha.com/blog/how-to-create-react-app-typescript How to Create React App Typescript] | |||
* [https://stackoverflow.com/questions/939326/ Execute JavaScript without Eval] | |||
* [[Google Closure Compiler]] | |||
* [[React Native]] | |||
* [[PrimeFaces]] | |||
* [[ReactJS]] | |||
| valign="top" | | |||
* [https://examples.sencha.com/ExtAngular/7.5.0/kitchensink/frame-index.html#/ Kitchen Sink » ExtAngular 7.5.0] | |||
* [https://examples.sencha.com/ExtReact/7.5.0/kitchensink/frame-index.html#/ Kitchen Sink » ExtReact 7.5.0] | |||
* [https://examples.sencha.com/extjs/7.6.0/examples/kitchensink/frame-index.html?modern#all Kitchen Sink » Ext JS 7.6.0] | |||
* [https://examples.sencha.com/extjs/7.7.0/examples/kitchensink/frame-index.html?modern#all Kitchen Sink » Ext JS 7.7.0] | |||
* [https://examples.sencha.com/extjs/7.8.0/examples/kitchensink/frame-index.html?modern#all Kitchen Sink » Ext JS 7.8.0] | |||
* [https://examples.sencha.com/gxt-examples/index.html GXT Examples] | |||
|} | |} |
Latest revision as of 02:50, 24 May 2024
Sencha CMD
unzip SenchaCmd-7.5.1.20-linux-amd64.sh.zip
sudo sh SenchaCmd-7.5.1.20-linux-amd64.sh
export SENCHA_CMD='/opt/cli/sencha/cmd'
export OPENSSL_CONF='/etc/ssl'
export PATH=$PATH:$SENCHA_CMD
mkdir -p ~/.sencha/cmd
cat << EOF > $HOME/.sencha/cmd/sencha.cfg
#------------------------------------------------------------------------------
# The folder for the local package repository. By default, this folder is shared
# by all versions of Sencha Cmd. In other words, upgrading Sencha Cmd does not
# affect the local repository.
repo.local.dir=${HOME}/.sencha/cmd/repo
EOF
sencha diag show
Optionally
# using classic toolkit for web application
sencha -sdk=$HOME/.chorke/academia/sdk/ext-6.2.0 generate app Web -classic ui.web
sed -i 's/"theme": "theme-triton"/"theme": "theme-crisp"/g' ./ui.web/app.json
cd ui.web;sencha app build
sencha web start
# using modern toolkit for mobile application
sencha -sdk=$HOME/.chorke/academia/sdk/ext-6.2.0 generate app Mob -modern ui.mob
sed -i 's/"theme": "theme-triton"/"theme": "theme-ios"/g' ./ui.mob/app.json
cd ui.mob;sencha app build
sencha web start
if [ ! -f 'workspace.json' ]&&[ ! -d 'ext' ];then \
sencha -sdk=$HOME/.chorke/academia/sdk/ext-6.2.0 generate workspace .;\
fi
if [ ! -d 'ext' ];then \
sencha app install $HOME/.chorke/academia/sdk/ext-6.2.0;\
fi
sencha app build --clean --dev
sencha app build --clean --pro
sencha package upgrade
sencha app upgrade
sencha app refresh
sencha app watch
Simplified
# using classic toolkit for web application
sencha -sdk $HOME/.chorke/academia/sdk/ext-6.2.0 generate app -classic Web ./ui.web;\
cd ui.web;sencha app build;\
sencha web start
# using modern toolkit for mobile application
sencha -sdk $HOME/.chorke/academia/sdk/ext-6.2.0 generate app -modern Mob ./ui.mob;\
sed -i 's/"theme": "theme-triton"/"theme": "theme-ios"/g' ./ui.mob/app.json;\
cd ui.mob;sencha app build;\
sencha web start
Remote REST
Ext.define( 'CKo.store.m00.sm.M00SM00X00', {
extend: 'Ext.data.Store',
model : 'CKo.model.m00.mm.M00MM00X00',
autoLoad : false,
remoteSort : true,
remoteFilter: true,
autoSync : true,
proxy : {
type: 'rest',
api : {
create : 'https://dev.chorke.org/m/00/cm/00/x/00', //M00CM00X00
read : 'https://dev.chorke.org/m/00/cm/00/x/00', //M00CM00X00
update : 'https://dev.chorke.org/m/00/cm/00/x/00', //M00CM00X00
destroy: 'https://dev.chorke.org/m/00/cm/00/x/00' //M00CM00X00
},
actionMethods: {
create : 'POST',
read : 'GET',
update : 'PUT',
destroy: 'DELETE'
},
reader: {
type: 'json',
root: 'data',
successProperty: 'success'
},
writer: {
type: 'json',
root: 'data'
}
}
});
ExtJS Hacks
;ExtJS 6.2 GPL Example KitchenSink
KitchenSink : 677~ 857
MZ/pivot : 848~ 882
KitchenSink/Component : 8,922~ 8,991
KitchenSink/VTypes : 37,500~ 37,531
Ext/pivot : 142,902~149,705
Ext/d3 : 172,125~176,035
Ext/calender : 176,036~182,218
Ext/d3 : 182,219~182,588
KitchenSink : 182,589~243,760
Ext.example : 243,761~243,787
Cookies : 243,788~243,827
prettyPrint : 243,828~245,738
Bootstrap
CKi.app.load.lib.init();
CKi.app.load.dbs.init();
CKi.app.load.gui.init();
|
CKi.app.load.lib.done();
CKi.app.load.dbs.done();
CKi.app.load.gui.done();
|
CKi.app.load.init();
CKi.app.load.done();
|
Deploy Apps
ssh -L 1841:localhost:1841 [email protected]
export app='PWa';\
export SDK_VERSION='6.2.0';\
export dir='academia-apps-ui.pwa';rm -rf $dir;\
bash <(curl -s 'https://cdn.chorke.org/repo/cmd/sencha/new.sh.txt')
export app='PWa';export dir='academia-apps-ui.pwa';\
bash <(curl -s 'https://cdn.chorke.org/repo/cmd/sencha/mavenify.sh.txt');\
cd $dir;sencha app build --clean --pro;sencha app build -clean --dev;\
sencha app watch
mvn clean install;\
export pwa=academia-apps-ui.pwa;\
scp target/$pwa.jar [email protected]:~;\
ssh [email protected] 'bash -s' cat<<EOF
sudo su
cd /var/chorke/www/cdn.chorke.org/html/
mv /home/pi/$pwa.jar .;rm -rf *.json *.ico index.html *.js static
unzip -q -o $pwa.jar;mv META-INF/resources/* .;rm -rf META-INF *.jar
curl -s https://cdn.chorke.org/repo/web/sencha/CKi.css>static/CKi.css
curl -s https://cdn.chorke.org/repo/web/sencha/CKi.js>static/CKi.js
ls -lah
pwd
EOF
Deploy Icons
t='green_dark';\
z=appicon_$t.zip;\
rm -rf icons/pwa/*;\
unzip $HOME/Downloads/$t.zip;\
mkdir -p icons/pwa/{android,apple,favicon,ms};\
for d in android apple favicon ms;do \
cp $t/$d/round/*.png icons/pwa/$d/;done;rm -rf $t;zip -r $z .;\
scp $z [email protected]:/var/chorke/www/repo/cmd/sencha/pwa/;rm -rf $z
Component
|
|