পৃষ্ঠাসমূহ

Search Your Article

CS

 

Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.

At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.

What We Offer:

  • 📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.

  • 💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.

  • 🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.

  • 🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.

    Latest world News 

     

Our Vision

To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.

Why Choose Us?

✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing

We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.

📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.

Pageviews

Monday, March 13, 2017

Sencha Touch - First Program

This chapter list down the steps to write first Hello World program in Ext JS:

Step 1

Create index.htm page in an editor of our choice. Include the required library files in head section of html page as mentioned below:
index.htm
<!DOCTYPE html>
<html>
   <head>
      <link href="https://cdn.sencha.com/touch/sencha-touch-2.4.2/resources/css/sencha-touch.css" rel="stylesheet" />
      <script type="text/javascript" src="https://cdn.sencha.com/touch/sencha-touch-2.4.2/sencha-touch-all.js"></script>
      <script type="text/javascript">
        Ext.application({
           name: 'Sencha',
           launch: function() {
              Ext.create("Ext.tab.Panel", {
                 fullscreen: true,
                 items: [{
                    title: 'Home',
                    iconCls: 'home',
                    html: 'Welcome to sencha touch'
                 }]
              });
           }
        });
      </script>
   </head>
   <body>
   </body>
</html>

Explanation

  • Ext.application() method is the starting point of sencha touch application.It creates a global variable called 'Sencha' declared with the name property - all the Application's classes such as its Models, Views and Controllers will reside under this single namespace, which reduces the chances of colliding global variables and file names.
  • launch() method is called once the page is ready and all the javascript files are loaded.
  • Ext.create() method is used to create object in sencha touch here we are creating an object of simple panel class Ext.tab.Panel.
  • Ext.tab.Panel is the predefined class in sencha touch for creating a panel.
  • Every sencha touch class has different properties to perform some basic functionalities.
Ext.Panel class has various properties as:
  • fullscreen property is to make use of complete screen so panel will take fullscreen space.
  • items property is the container for various items.
  • iconCls is the class used for displaying different icons, we will be reading different icon value in the next chapters
  • title property is to provide the title to the panel.
  • html property is the html content to be shown in the panel.

Step 2

Open index.htm file in a standard browser and you will get the following output on browser.

No comments:

Post a Comment