Sencha Project

Folks,

From prev example in last article. Have some small notes with little more explanation.

31-07-2014 13-11-01

From the above pic initially i created a sample named project in c drive. Prior to that i have copied sencha touch files to c drive and specified the path clearly as shown above.

While creating a registration view:

Sencha generate form Registration “name1:text”,“name2:text” registrationform.

In step4. point2-> replace the code in Registration view with sample code.

In step4.point4-> create a data folder in your project folder and have a file name with Server.json.

Finally folder structure will be like this..

31-07-2014 13-33-38

31-07-2014 13-33-50

Note: Once all the above procedure done and when you run your application you will be shown with the following image

31-07-2014 15-12-43

this will be shown in generally if application get stuck while running. you should find errors in console log. My error is package.json is not loading..for this very simple solution is :

31-07-2014 15-14-09

or try sencha app build

Still if you find the errors? try exploring below sites:

http://www.sencha.com/forum/showthread.php?278822-bootstrap.json-404-(not-found)

http://www.sencha.com/forum/tags.php?tag=bootstrap.json

http://stackoverflow.com/questions/23007986/sencha-touch-2-failed-to-load-bootstrap-json

You can even try this: http://www.sitepoint.com/first-steps-in-sencha-touch/

http://javatechig.com/sencha-touch/getting-started-with-sencha-touch

New Square Reader Accepts EMV Chip-Enabled Credit Cards

Mobile payment company Square introduced on Wednesday a new reader that will accept chip cards, which are already popular outside the U.S. and are expected to hit it big stateside in the next few years.

 

Square

Square allows users (typically small business owners) to accept credit card payments via mobile devices such as the iPhone, iPad and Android smartphones. Now, the new white dongle is readying small businesses for EMV revolution in the U.S.

EMV — which stands for Europay, MasterCard and Visa, a global standard for chip cards — offers more protection than the standard black magnetic strip we’re used to seeing behind credit cards. As the industry shifts to these chip-enabled cards, which is expected to hit the mainstream market in fall 2015, Square will be ready to accept them with the new reader.

One of the major differences is that the new reader requires charging — it comes with a USB port. But considering the heightened benefits of data protection and security, it’s just a small extra step merchants need to take to keep the product powered.

More: http://mashable.com/2014/07/30/square-reader-emv/

Smart Shoes

Lechal_Shoe

The user enters her destination into the Lechal app using Google Maps or a similar navigation app. From this point on, the company claims, she no longer needs to look at her phone. The app connects via Bluetooth to a module that slides into the back of the shoe. The right or left shoe then buzzes depending on which direction the user should turn.

Krispian Lawrence and Anirudh Sharm developed the device primarily as an improvement to the walking and navigation aids currently available to the blind.

More: http://mashable.com/2014/07/29/smart-shoes-directions/

Gmail Extensions – Necessary for every1

1. Canned responses

How many emails do you send that essentially have the same content? Well, then, why are you writing that text from scratch each time? This Mail Labs add-on allows you to write and save responses you use over and over again and then select them from a drop-down (and edit them as need be), no copy-pasting involved. Here’s a good rundown of how it works.

2. Boomerang

You might write emails at 3 a.m., but that doesn’t mean you want to send them during the wee hours. This tool lets you schedule messages to send at a later time or date. Another cool use: You can tell it to bring an email to the top of your inbox in, say, two days if you don’t have the brain space to deal with it now or if no one has responded yet.

3. Rapportive

Especially useful for customer service and HR, this add-on pulls details tied to a sender’s email — like job title, recent tweets, LinkedIn details, and even headshot — into your inbox, allowing you to get the lowdown on anyone reaching out to you without having to do internet stalking of your own.

4. Streak

So robust, this tool! It’s essentially an in-inbox CRM that allows you to associate certain emails and files with pipelines that you create, but some of its buried features are its coolest. We love the fact that you can use it to do a mail merge (more on that here) and to create canned responses — called snippets – that can 1) be used by everyone associated with your team, and 2) can be activated via keyboard shortcuts. Genius.

5. Undo Send

Like a Command-Z button for email, this Mail Labs tool gives you a few seconds to change your mind about sending a message out into the world — very key if you are writing those emails in the middle of the night.

Super-Fast Battery Pack

ultrpk098707087

UNU’s Ultrapak is a battery pack for smartphones and tablets that can deliver a full charge to devices after just 15 minutes of charging itself up. This means that as long as users are carrying their Ultrapak, and can spare at least a quarter of an hour, they’ll never have to worry about running out of power again.

un098707adf

UNU said the Ultrapak’s super-fast charging is due to “Ultra-X” charging technology, a special type of A+ lithium polymer battery that uses proprietary additives, which increases the normal battery charging speed by 8 times. This makes the device “the world’s fastest self-charging battery pack,” according to UNU.

Each Ultrapak features an LED screen that displays both a percentage number and battery graphic representing how much juice users have left. The chargers, housed in sturdy rubberized material, even have an embedded flashlight, presumably for those times when users need to search for a hidden electrical socket in a darkened corner.

More: http://mashable.com/2014/07/30/ultrapak-battery-pack/

http://www.myunu.com/products/ultrapak-fast-charging-batteries.html

Sencha – Part 2

Folks,

Hope you went thru the first article on sencha i.e., create hello world app. Now we will go in deeper to understand the code clearly.You should maintain the following structure of files for better understanding and structure.

The following listing provides a short description of each file and directory, the complete list of the generated files can be found in the Sencha Cmddocumentation:

  • app – The directory containing the Models, Views, Controllers, and Stores for your app.
  • app.js – The main JavaScript entry point for your app.
  • app.json – The configuration file for your app.
  • index.html – The HTML file for your app.
  • packager.json – The configuration file used by Sencha Cmd for creating native packages for your application.
  • resources – The directory containing the CSS and the images for your app

Open app.js, the main entry point for your app, in your editor.

The launch function is the entry point to your application. In the default application, hide the application loading indicator, and create an instance of our Main view and add it to the Viewport.

The Viewport is a Card layout to which you can add application components. The default app adds the Main view to the viewport so it becomes visible on the screen.

Coming to the code part in app.js..

Ext is the global namespace for the whole Sencha Touch framework. Every class, function and configuration for the whole framework exists under this single global variable. The Ext singleton itself contains a set of useful helper functions (like apply, min and others), but most of the framework that you use day to day exists in specialized classes (for example Ext.Panel, Ext.Carousel and others).

A method that is crucial to beginning your application is Ext.setup. Please refer to it’s documentation,

as a reference on beginning your application.

Ext.setup({
    onReady: function() {
        Ext.Viewport.add({
            xtype: 'component',
            html: 'Hello world!'
        });
    }
});

For properties and methods(prefer to check) : http://docs.sencha.com/touch/2.3.1/#!/api/Ext

Quick reference of above link:

Properties

A reusable empty function

An array containing extra enumerables for old browsers.

This indicate the start timestamp of current cycle. …

The version of the framework

Defined By

Methods

( config )

Loads Ext.app.Application class and starts it up with given configuration after the page is ready. …

( object, config, [defaults] ) : Object

Copies all the properties of config to the specified object. …

( object, config ) : Object

Copies all the properties of config to object if they don’t already exist. …

( fn, [scope], [args], [appendArgs] ) : Function

Create a new function from the provided fn, change this to the provided scope, optionally overrides arguments for the…

( callback, [scope], [args], [delay] )

Calls function after specified delay, or right away when delay == 0. …

( item ) : Object

Clone almost any type of variable including array, object, DOM nodes and Date without keeping the old reference. …

( dest, source, names, [usePrototypeKeys] ) : Object

Copies a set of named properties from the source object to the destination object. …

( name, args ) : Object

Instantiate a class by either full name, alias or alternate name. …

( alias, args ) : Object

Convenient shorthand, see Ext.ClassManager.instantiateByAlias. …

( json, [safe] ) : Object/null

Shorthand for Ext.JSON.decode. …

( fn, millis, [scope], [args], [appendArgs] ) : Number

Calls this function after the number of milliseconds specified, optionally in a specific scope. …

( className, data, [createdFn] ) : Ext.Base

Defines a class or override. …

( args )

Attempts to destroy any objects passed to it by removing all event listeners, removing them from the DOM (if applicab…

( iterable, fn, [scope], [reverse] ) : Boolean

Iterates an array or an iterable value and invoke the given callback function for each item. …

Shorthand for Ext.JSON.encode. …

( excludes ) : Object

Convenient shortcut to Ext.Loader.exclude. …

( config, classReference, [instance], [aliasNamespace] )

A global factory method to instantiate a class from a config object. …

( element, [named] ) : Ext.dom.Element

Gets the globally shared flyweight Element, with the passed node as the active element. …

( element ) : Ext.dom.Element

Retrieves Ext.dom.Element objects. …

Returns the current document body as an Ext.Element. …

Convenient shorthand, see Ext.ClassManager.getClass. …

( object ) : String

Convenient shorthand for Ext.ClassManager.getName. …

This is shorthand reference to Ext.ComponentMgr.get. …

( [object] ) : String

Returns the display name for object. …

Returns the current HTML document object as an Ext.Element. …

( el ) : HTMLElement

Return the dom node for the passed String (id), dom node, or Ext.Element. …

Returns the current document head as an Ext.Element. …

Shortcut to Ext.data.StoreManager.lookup. …

( [el], [prefix] ) : String

Generates unique ids. …

( target ) : Boolean

Returns true if the passed value is a JavaScript Array, false otherwise. …

( value ) : Boolean

Returns true if the passed value is a Boolean. …

( object ) : Boolean

Returns true if the passed value is a JavaScript Date object, false otherwise. …

( value ) : Boolean

Returns true if the passed value is defined. …

( value ) : Boolean

Returns true if the passed value is an HTMLElement. …

( value, [allowEmptyString] ) : Boolean

Returns true if the passed value is empty, false otherwise. …

( value ) : Boolean

Returns true if the passed value is a JavaScript Function, false otherwise. …

( value ) : Boolean

Returns true if the passed value is iterable, false otherwise. …

( value ) : Boolean

Returns ‘true’ if the passed value is a String that matches the MS Date JSON encoding format …

( value ) : Boolean

Returns true if the passed value is a number. …

( value ) : Boolean

Validates that a value is numeric. …

( value ) : Boolean

Returns true if the passed value is a JavaScript Object, false otherwise. …

Returns true if the passed value is a JavaScript ‘primitive’, a string, number or Boolean. …

( value ) : Boolean

Returns true if the passed value is a string. …

( value ) : Boolean

Returns true if the passed value is a TextNode. …

( object, fn, [scope] )

Iterates either an array or an object. …

A convenient alias method for Ext.Object.merge. …

( namespace1, namespace2, etc ) : Object

Creates namespaces to be used for scoping variables and classes so that they are not global. …

( )

Convenient alias for Ext.namespace. …

( fn, [scope], [options] )

Adds a listener to be notified when the document is ready and all dependencies are loaded. …

( fn, args, [scope] ) : Function

Create a new function from the provided fn, the arguments of which are pre-set to args. …

( selector, [root] ) : HTMLElement[]

Shorthand of Ext.dom.Query.select …

( id, config )

Creates a new store for the given id and config, then registers it with the Store Manager. …

( node )

Removes this element from the document, removes all DOM event listeners, and deletes the cache reference. …

Repaints the whole page. …

( expressions, [fn], [scope], [excludes] )

Convenient alias of Ext.Loader.require. …

Selects elements based on the passed CSS selector to enable Element methods to be applied to many related elements in…

( config )

Ext.setup() is the entry-point to initialize a Sencha Touch application. …

( expressions, [fn], [scope], [excludes] )

Synchronous version of require, convenient alias of Ext.Loader.syncRequire. …

( iterable, [start], [end] ) : Array

Converts any iterable (numeric indices and a length property) into a true array. …

( value ) : String

Returns the type of the given variable in string format. …

( value, defaultValue, [allowBlank] ) : Object

Returns the given value itself if it’s not empty, as described in isEmpty; returns the default value (second argument…

( name ) : Object

Convenient shorthand to create a widget by its xtype, also see Ext.ClassManager.instantiateByAlias var button = Ext….
Example Projects: http://docs.sencha.com/architect/3/tutorials/example_projects.html