Guest User

Untitled

a guest
Oct 19th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.95 KB | None | 0 0
  1. * Getting Started
  2. 1. Prerequisites
  3. 1. Download and Install Sencha Cmd 6.5.1
  4. 2. Download the Ext JS 6.5 SDK
  5. #recomanded
  6. C:\Users\Me\sencha-sdks # Windows
  7. /Users/Me/sencha-sdks # Mac OS X
  8. /home/me/sencha-sdks # Linux
  9.  
  10. 2. Create New Project
  11. a. sencha -sdk /path/to/ext6 generate app MyApp /path/to/my-app
  12. b. sencha generate app -ext MyApp /path/to/my-app
  13. c. sencha app build
  14. d. sencha app watch
  15. e. sencha app build development >command only updates the JavaScript portion of the bootstrap.
  16. f. sencha app refresh > command will perform a refresh but will also compile your styling to generate a fresh CSS file.
  17. 3. Generate
  18. a. sencha generate model User id:int,name,email >Model
  19. b. sencha generate view -base Ext.tab.Panel foo.Thing >View
  20. c. sencha generate controller Central >Controller
  21.  
  22. *Core Concepts
  23. 1. Class System
  24. a. Naming Conventions
  25. a.1. Classes
  26. names
  27. - only contain alphanumeric characters.
  28. - Do not use underscores, hyphens, or any other non-alphanumeric character
  29. - should be grouped into packages when appropriate and properly namespaced using object property dot-notation (.).
  30.  
  31. a.2. Source File
  32. The names of the classes map directly to the file paths in which they are stored. As a result, there must only be one class per file.
  33.  
  34. b. Methods and Variables
  35. names
  36. Method and variable names should always be in camelCased
  37.  
  38. c. Declaration
  39. use a single method for class creation: Ext.define
  40. Ext.define(className, members, onClassCreated);
  41. . className: The class name
  42. . members is an object that represents a collection of class members in key-value pairs
  43. . onClassCreated is an optional function callback that is invoked when all dependencies of the defined class are ready and the class itself is fully created
  44. d. Configuration
  45. config property that gets processed by the powerful Ext.Class pre-processors before the class is created.
  46.  
  47. 2. Layouts and Containers
  48. It handles the sizing and positioning of every Component in your application
  49.  
  50. a. Layouts
  51. Every container has a layout that manages the sizing and positioning of its child Components.
  52. a.1 Using Layouts
  53. a.2 How the layout system works
  54. - A Container's Layout is responsible for the initial positioning and sizing of all of the Container's children
  55. width: 400,
  56. height: 200,
  57. title: 'Container Panel',
  58. layout: 'column',
  59. suspendLayout: true // Suspend automatic layouts while we do several different things that could trigger a layout on their own
  60. b. Component Layout
  61. ust like a Container's Layout defines how a Container sizes and positions its Component items,
  62. a Component also has a Layout which defines how it sizes and positions its internal child items.
  63. Component layouts are configured using the componentLayout config option
  64.  
  65. c. Components
  66. c.1. The Component Hierarchy
  67. - A typical application's Component hierarchy starts with a Viewport at the top
  68. - A Container is a special type of Component that can contain other Components.
  69. - A typical application is made up of many nested Components in a tree-like structure that is referred to as the Component hierarchy.
  70. c.2. XTypes and Lazy Instantiation
  71. - Every Component has a symbolic name called an xtype.
  72. c.3. Showing and Hiding
  73. - All Components have built in show and hide methods. The default CSS method used to hide the Component is "display: none".
  74. c.4. Floating Components
  75. - Floating Component are positioned outside of the document flow using CSS absolute positioning, and do not participate in their Containers' layout
  76. - draggable - enables dragging of a floating Component around the screen.
  77. - shadow - customizes the look of a floating Component's shadow.
  78. - alignTo() - aligns a floating Component to a specific element.
  79. - center() - centers a floating Component in its Container.
  80.  
  81. d. Creating Custom Components
  82. e. Template Methods
  83. f. Which Class To Extend
Add Comment
Please, Sign In to add comment