ExtJS 6 MVVM "Hello World" Application

Posted By Vitaliy | June 13, 2017 | ExtJS 6.0.1
0 109
This is minimal html page code to run ExtJS version 6 with MVVM Architecture.
Note: it's recommended to add html DOCTYPE for this version of library.

<!DOCTYPE html>
<html>
	<head>
		<link href="/ext/6.0.1/build/classic/theme-triton/resources/theme-triton-all.css" rel="stylesheet" />
		<script src="/ext/6.0.1/build/ext-all.js"></script>
		<script src="/ext/6.0.1/build/classic/theme-triton/theme-triton.js"></script>
		<script src="/js/apps/6.0.1/mvvm/HelloWorld/app.js"></script>
	</head>
	<body>
	</body>
</html>

ExtJS 6 MVC "Hello World" Application

Posted By Vitaliy | June 12, 2017 | ExtJS 6.0.1
0 97
This is minimal html page code to run ExtJS version 6 with MVC Architecture.
Note: it's recommended to add html DOCTYPE for this version of library.

<!DOCTYPE html>
<html>
	<head>
		<link href="/ext/6.0.1/build/classic/theme-triton/resources/theme-triton-all.css" rel="stylesheet" />
		<script src="/ext/6.0.1/build/ext-all.js"></script>
		<script src="/ext/6.0.1/build/classic/theme-triton/theme-triton.js"></script>
		<script src="/js/apps/6.0.1/HelloWorld/app.js"></script>
	</head>
	<body>
	</body>
</html>

ExtJS 6 "Hello World" Application Using Ext Loader - Modern Toolkit

Posted By Vitaliy | May 06, 2017 | ExtJS 6.0.1
0 284
The idea is to include only the core of ExtJS - ext.js file (293 Kb) instead of ext-all.js file (2032 Kb) and to load only necessary (for your app) classes specified by require statements.
You can find more details here.
To understand how to avoid using of Loader see my another post.

Note: the code of this post doesn't work with ExtJS 6.0.0. Looks like this build is invalid.

<!DOCTYPE html>
<html>
    <head>
        <link  href="/ext/6.0.1/build/modern/theme-triton/resources/theme-triton-all.css" rel="stylesheet" />
        <script src="/ext/6.0.1/build/ext-modern.js"></script>
        <script src="/ext/6.0.1/build/modern/theme-triton/theme-triton.js"></script>
        <script>
            Ext.Loader.setConfig({
                enabled : true,
                paths: {
                    'Ext': '/ext/6.0.1/modern/modern/src',
                    'Ext.overrides': '/ext/6.0.1/modern/modern/overrides'
                }
            });
        </script>
    </head>
    <body>
        <script>
            Ext.require('Ext.overrides.Widget');
            Ext.require('Ext.overrides.app.Application');
            Ext.require('Ext.MessageBox');
            Ext.application({
                name: 'WelcomeApp',
                launch : function() {
                    Ext.Msg.alert('Welcome', 'Hello, World!');
                }
            });
        </script>
    </body>
</html>

Js Code

Ext.require('Ext.overrides.Widget');
Ext.require('Ext.overrides.app.Application');
Ext.require('Ext.MessageBox');
Ext.application({
    name: 'WelcomeApp',
    launch : function() {
        Ext.Msg.alert('Welcome', 'Hello, World!');
    }
});
            

ExtJS 6 "Hello World" Application - Modern Toolkit Theme Triton

Posted By Vitaliy | May 06, 2017 | ExtJS 6.0.1
0 300
This is minimal html page code to run ExtJS version 6 in Modern Toolkit with Triton theme.
Note: that it's recommended to add html DOCTYPE for this version of library.
Also there is a way to avoid including of whole ExtJS library (ext-modern-all.js, 1074Kb). You can find demo in my another post and more details here.
Also be aware that in 6.0.0 there is no triton theme in modern toolkit.

<!DOCTYPE html>
<html>
    <head>
        <link  href="/ext/6.0.1/build/modern/theme-triton/resources/theme-triton-all.css" rel="stylesheet" />
        <script src="/ext/6.0.1/build/ext-modern-all.js"></script>
        <script src="/ext/6.0.1/build/modern/theme-triton/theme-triton.js"></script>
    </head>
    <body>
        <script>
			Ext.application({
				launch : function() {
					Ext.Msg.alert('Welcome', 'Hello, World!');
				}
			});
        </script>
    </body>
</html>

Js Code

Ext.application({
    launch : function() {
        Ext.Msg.alert('Welcome', 'Hello, World!');
    }
});
            

ExtJS 6 "Hello World" Application - Modern Toolkit

Posted By Vitaliy | May 05, 2017 | ExtJS 6.0.0
0 317
This is minimal html page code to run ExtJS version 6 in Modern Toolkit.
Note: that it's recommended to add html DOCTYPE for this version of library.
Also there is a way to avoid including of whole ExtJS library (ext-modern-all.js, 1053Kb). You can find demo in my another post and more details here.
Also be aware that in 6.0.0 there is no triton theme in modern toolkit.

<!DOCTYPE html>
<html>
    <head>
        <link  href="/ext/6.0.0/build/modern/theme-neptune/resources/theme-neptune-all.css" rel="stylesheet" />
        <script src="/ext/6.0.0/build/ext-modern-all.js"></script>
        <script src="/ext/6.0.0/build/modern/theme-neptune/theme-neptune.js"></script>
    </head>
    <body>
        <script>
			Ext.application({
				launch : function() {
					Ext.Msg.alert('Welcome', 'Hello, World!');
				}
			});
        </script>
    </body>
</html>

Js Code

Ext.application({
    launch : function() {
        Ext.Msg.alert('Welcome', 'Hello, World!');
    }
});