gApps
  • Home
  • Directory
  • Articles
  • News
  • Resources
  • Services
  • Advertise
  • Search
  • Menu Menu
  • Link to X
  • Link to LinkedIn

How to install, use and build Sencha Touch 2.1 apps on Windows

5 Comments

Sencha Touch is a Javascript Framework used for building high performance cross platform mobile apps. My experience with installing Sencha Touch was horrible. The docs are severely lacking with outdated and conflicting information. With much experimentation, web searching and thanks to some help on the Sencha forum I managed, finally to get it installed. This post deals with installing Sencha Touch, generating your first app and ‘building’ it so it’s ready for production web use. It doesn’t cover coding a Touch app or packaging your app for iOS and Android which I expect to cover in another post.

This was a piecemeal process and very much a learning experience. There may be errors in my recommendations or assumptions but the end result works for me. If I were to do it again I’d most likely choose a more ordered folder structure for the various installations just for the sake of good housekeeping.

Briefly, if like me you struggled to cut through the marketing hype, these are the core Sencha Products and what they do:

  • Ext JS – Javascript framework for developing desktop apps.
  • Touch – Javascript framework for developing mobile apps.
  • Architect – Standalone product for developing Ext JS or Touch apps using a GUI (as oppose to hand coding)

For the record, I am only concerned with Touch. I tried Architect but found the documentation so lacking that I gave up and decided to just use Touch instead. Unless you are an OEM, Touch is free to use. Architect is a paid product.

Installing and using Sencha Touch 2.1

What you need – I provide specific download links in the instructions below:

  • Sencha Touch 2.1
  • Sencha Command 3.0
  • Ruby
  • SASS
  • Compass
  • JRE
  • Ant
  • Apache (or similar local web server)

1. Apache

First up, if you don’t have a local webserver installed, do it now. Because I’ve used it before, I chose Uniform Server, a WAMP server (Windows Apache MySQL PHP). Uniform Server downloads as an exe (Coral_8_7_2.exe in my case). Run the exe and point it to the folder you want to work from. I chose:

C:\Users\Gareth\Documents\Sencha

So the path to my web root is:

C:\Users\Gareth\Documents\Sencha\UniServer\www

Next we need to allow other devices on your network to access the new Apache installation. This assumes the IP address used by your network is 192.168.1.X. If it’s different, you will need to change the input below accordingly. In the above folder there should be an .htaccess file. Open it in a text editor and change line 9 from:

Allow from 127.0.0.1

To

Allow from 127.0.0.1 192.168.1.0/24

192.168.1.0/24 allows any device using an IP in 192.168.1.X range to access your server.

Click Start_as_program.exe form C:\Users\Gareth\Documents\Sencha\UniServer folder. Don’t worry about passwords if prompted. From the interface click ‘Start Apache’ and it should open a browser window with the Uniform Server homepage.

To access your server from another device (i.e. your mobile or tablet) you need to enter the IP address of the machine you installed Uniform Server on in the web browser. To find your IP Address, open a command prompt (start > type ‘cmd’in the search box and press enter) and type ipconfig. In the first few entries you will see a line that says IPv4 address. Make a note and type this in your mobile browser address bar and you should see the Uniform Server homepage.

Note: Your IP Address could change every time you restart your machine so you will need to know it to be able to see it from your mobile or tablet.

2. JRE

Next install JRE – Java Runtime Environment. Download from:

http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html

I chose Windows x64 ( jre-7u10-windows-x64.exe at the time), you should choose the correct version for your system. I left the default install options which made the install path:

C:\Program Files\Java

3. Ant

Install Ant. Download from:

http://ant.apache.org/bindownload.cgi

Ant is a library used by other tools when building applications. Download, unzip and move the files to the folder of your choice. I chose c:\ant because that what’s mentioned in the install guide. Assuming you used c:\ant, you should have the folders C:\ant\bin, C:\ant\etc and so on.

Now, open a command prompt. At the prompt type:

set ANT_HOME=c:\ant
set PATH=%PATH%;%ANT_HOME%\bin

Close the command prompt window.

4. Ruby

Install Ruby. Download from:
http://rubyinstaller.org/downloads/

I used the defaults which installed to C:\Ruby193 and checked all 3 options:

Once Ruby is installed, open a command prompt. Type:

ruby -v

This should display a line which looks similar to:

Ruby 1.9.3p362 (2012-12-25) [i386-mingw32]

5. Compass and SASS

Assuming the above works, in the same command prompt or a new one, enter the following 4 commands, waiting for each to complete before typing the next. These commands install items, including Compass and SASS which Sencha relies on when building apps:

  1. gem install haml
  2. gem install haml-edge
  3. gem install compass
  4. gem install sass

6. Sencha Touch

Install Sencha Touch. Download from:

http://www.sencha.com/products/touch/download/

At certain points in their documentation, Sencha refer to this is the Sencha Touch SDK (not to be confused with the obsolete Sencha Touch SDK Tools). I downloaded the GPL version sencha-touch-2.1.0-gpl.zip and extracted the contents to:

C:\Users\Gareth\Documents\Sencha\UniServer\www\sencha-touch-2.1.0-gpl

So I have the following example folders:

C:\Users\Gareth\Documents\Sencha\UniServer\www\sencha-touch-2.1.0-gpl\builds

C:\Users\Gareth\Documents\Sencha\UniServer\www\sencha-touch-2.1.0-gpl\cmd

C:\Users\Gareth\Documents\Sencha\UniServer\www\sencha-touch-2.1.0-gpl\docs

Etc

7. Sencha Command

Install Sencha Command. Download from:

http://www.sencha.com/products/sencha-cmd/download

(SenchaCmd-3.0.0.250-windows.exe.zip for me). I used the default install directory which was C:\Users\Gareth\bin so ended up with the following example directories:

C:\Users\Gareth\bin\Sencha\Cmd\3.0.0.250\ant

C:\Users\Gareth\bin\Sencha\Cmd\3.0.0.250\lib

C:\Users\Gareth\bin\Sencha\Cmd\3.0.0.250\phantomjs

Etc

That should be it. Close all command prompts and then open a new one and type the following. You will need to change the paths to the correct ones. The first path is the path to where you installed Sencha Touch, the second is where you want your app folder:

sencha –skd C:\Users\Gareth\Documents\Sencha\UniServer\www\sencha-touch-2.1.0-gpl generate app FirstTest C:\Users\Gareth\Documents\Sencha\UniServer\www\FirstTest

This will create a folder in the www directory called FirstTest which contains all the files for a basic Sencha Touch app. If you visit http://localhost/FirstTest (using Chrome) you should see the app:

My local IP Address is 192.168.1.96 so if I visit http://192.168.1.96/FirstTest on my iPhone I see:

Finally, to ‘build’ your app, that is, to export it in a format optimised for a particular environment, open a command prompt, change directory to the one we created for your FirstTest, and type:

sencha app build production

Your output should look like the screen shot below and your FirstTest folder should contain a new folder tree of ‘build/FirstTest/production’. Now, if you navigate to the address below you will be viewing the optimised, production ready version of your app:

http://192.168.1.96/FirstTest/build/FirstTes/production

That’s it. You should be up and running. The following resources where used by me and might help you if you get stuck:

http://www.ladysign-apps.com/developer/sass/installing-sass-compass-for-windows-os-x/ installing compass and sass on windows.

http://ant.apache.org/manual/install.html#windows – installing ant on windows

http://www.sencha.com/forum/showthread.php?252680-Docs-appalling-how-to-actually-get-started – my forum thread where Brice Mason provided a concise list of requirements.

 

Ad-funded drug apps on the rise

The popularity of smartphone app technology within the pharmaceutical industry is growing, and while some prefer to pay to receive services ad-free, an increasing number of US medical professionals are opting for a different business model.

Epocrates, the app that provides information on drug dosage, side effects and interactions, has seen a rise in the uptake of its free ad-funded version.

According to reports, plans for its development include a virtual sales rep for pharmaceutical companies to showcase their new products.

Pharmaceutical giants such as Pfizer have already recognised the importance of putting their products literally ‘in the hand’ of the medical professionals within smart devices. Not only is this a more direct and measurable form of sales, but it can also create a better return on investment long term.

While the marketing messages offered in the free version of Epocrates will need to be refined to become more relevant to the user (as they currently have to be filtered  to get to the information requested), the launch of this type of app  introduces a new business model into the increasing mix of medical apps available.

Medical portal InPharm recently counted a total of 39 apps produced by the 11 largest pharmaceutical companies, across various markets and target groups.

Like Epocrates, the key to the success of smartphone apps will be the extent to which developers meet the needs of the specific medical groups by providing relevant content and timely propositions, so that an ad-funded business model doesn’t hinder their ability to access information they need to help their patients.

FDA to create new guidelines for mobile medical apps

The US Food and Drug Administration (FDA) is set to propose new regulations for smartphone apps.

The regulations affect a small number of medical apps in the States and provide a clue as to how regulation might develop in the UK.

Around 150 medical apps have been produced to date. These include patient diary apps and calculators for those working in the health sector.

The FDA has now launched a three month consultation in order to devise how it will oversee what it calls “mobile medical apps”. It is focusing on the apps that could present a risk to patients if they fail to work as planned.

These types of apps include those which enable doctors to see medical images on an iPad with a view to making a diagnosis from them.

Other apps that could come under the regulations include those which allow doctors to use their smartphone as an electrocardiography (ECG) machine, apps that calculate the maximum dosage of local anaesthesia based on a patient’s weight and age and apps that collect blood glucose readings to help manage diabetes.

The FDA has already approved a small number of apps for use. These include a smartphone-based ultrasound device and a medical iPhone/iPad app that lets doctors view medical images and X-rays.

Bakul Patel, FDA policy advisor, said: “There are advantages to using medical apps, but consumers and health care professionals should have a balanced awareness of the benefits and risks.”

Drug companies increase spend on mobile and online media by nearly 80%

Pharmaceutical companies across the world increased their investments in mobile phone apps and educational websites by nearly 80% last year.

According to a study by Ernst & Young, drug companies including Merck & Co and Novartis AG are leading the way in what seems to be a new wave of enthusiasm towards social media and the online landscape on the part of drug companies.

In total, global pharmaceutical companies started 97 new projects aimed at using IT to improve the quality of patient health. By comparison, 124 project had been started in the four previous years altogether, representing a massive leap forwards for development this year.

Just over 41% of this year’s projects were apps for smartphones – an increase from 11% since 2006.

Experts say that the move is partially due to the increased pressure that pharmaceutical companies are under from governments to prove that their products are worth their prices. Plans exist in the UK to match the prices of products to their benefits starting in 2014. This therefore calls for more involvement from patients throughout the lifecycle of a drug, from initial testing to post market surveillance – all of which can be easily and effectively facilitated via the use of social media.

Carolyn Buck Luce, global pharmaceutical leader at Ernst & Young, told one US website: “Pharma can’t exist the way they have existed; what is surprising is the pace of change.”

“The next big change in health outcomes is behavioural change, where medicines play an important part but not the only part.”

Mobile technology combats drug counterfeit in India

A new pharmaceutical venture between the USA and India has launched an innovative mobile-based anti-counterfeit scheme.

Sproxi, a US-based pharmaceutical company, has launched in India and revealed a product designed to combat any drug counterfeit issues.

Mobile Product Authentication (MPA) enables consumers to check the authenticity of a pharmaceutical product by sending the unique code on the drug as a free text message to the manufacturers in real time.

The service then confirms whether a brand is genuine or not.

India suffers from a huge trade in black market pharmaceuticals.

Ashifi Gogo, CEO of Sproxil, said: “India has one of the largest pharmaceutical markets in the world, but is plagued by counterfeit medicines made elsewhere that tarnish the brands in question.

“Our services enable Indian companies to reduce the presence of counterfeit medicines by connecting companies directly to their consumers in a scalable manner, using mobile phones.”

Spraxil launched the first national mobile-based anti-counterfeit service in Africa and has also sold millions of anti-counterfeit labels that service some of the world’s largest pharmaceutical companies.

Many of these companies are now looking to build on the SMS service by seeing if verification codes and similar authentication methods can be sent by mobile social networking sites.

Mobile platform to ease prescription communication for US doctors

A healthcare communications network in the USA has revealed a new mobile platform for managing prescription plans.

NaviNet, a web-based provider of health messaging systems, will be using a system called Mobile Connect for PBMs (Pharmacy Benefit Managers) to allow pharmaceutical companies to communicate with doctors and insurance providers.

Mobile Connect for PBMs lets doctors check their patients’ insurance plans during check-ups to see which drugs they can and cannot administer according to their plan.

Doctors will also be able to receive information on whether patients are sticking to their medication schedules based on refill data from the pharmaceutical and insurance companies.

This will help them to improve their levels of care for each patient. It also enables them to access this vital information quickly and easily, saving them time on research and administration that can be better devoted to clinical practice.

Although the medical system is slightly different in the USA than it is in the UK, Mobile Connect for PBMs shows how smartphones can be used to improve communication between pharmaceutical companies and their end users and stakeholders in order to improve both sales and service.

Around 80% of doctors in America use smartphones, a figure that is expected to be replicated in the UK within the next couple of years. It’s clear that healthcare companies’ IT and marketing strategies need to embrace the smartphone and all it has to offer.

Mobile search gets bigger share of marketers’ budgets

Marketers are spending more and more money on mobile search. According to a new report producted by marketing insight firm Econsultancy, the proportion of marketing budgets allocated to mobile PCC has increased significantly in 2011.

Out of the 600 digital marketers and agencies surveyed, 16% are using mobile search as part of their marketing strategy. That’s exactly double of those using mobile search last year. A further 45% are planning to involve mobile search in their marketing strategy.

Meanwhile, a third of agencies surveyed report that their clients are involved with mobile search – an increase of 12% from last year.

The links between social networking sites and PPC also appears to be growing stronger. Most of the marketers questioned say that they have increased the amount of money they are spending in PPC investment in The majority of client-side marketers say that, over the last year, their companies have also increased their PPC investment in Facebook (65%), LinkedIn (62%), YouTube (55%) and Twitter (54%).

The survey also revealed an increased focus on local search. Agencies quizzed in the survey said that 22% of their clients’ budgets are spend on locally targeted paid search. The figure was only slightly less amongst the companies surveyed (17%).

The emergence of local search as part of a marekting strategy could be linked to the boom in the smartphone market.

Page 2 of 212

Featured Articles

  • EU MDR postponed to May 2021
    Medical Device Regulation (MDR) is postponed until 2021July 15, 2020 - 1:23 pm
  • Avoiding app store rejection – the importance of using a medical app development specialistMay 5, 2020 - 4:48 pm
  • Tips for designing a medical device
    Tips for designing a medical app – is connectivity on your list?August 2, 2016 - 11:20 am

App Developer Directory

Search or Get Listed
App developer directory

About

gApps is the UK’s leading resource for all things relating to health and medical app development.
About us

Contact us

Write for us

Directory Listing

Featured Article

  • EU MDR postponed to May 2021
    Medical Device Regulation (MDR) is postponed until 2021July 15, 2020 - 1:23 pm

Advertise

Learn more about advertising opportunities and getting listed in our app developers directory

Newsletter Sign-Up

© DGR Enterprises Ltd 2025 | Privacy Policy | Cookie Policy | Legal
  • Link to X
  • Link to LinkedIn
Scroll to top Scroll to top Scroll to top

This website or its third-party tools process personal data (e.g. browsing data or IP addresses) and use cookies or other identifiers, which are necessary for its functioning and required to achieve the purposes illustrated in the cookie policy. By continuing to use this site you agree to our use of cookies.

Close

Cookie and Privacy Settings



How we use cookies

We may request cookies to be set on your device. We use cookies to let us know when you visit our websites, how you interact with us, to enrich your user experience, and to customize your relationship with our website.

Click on the different category headings to find out more. You can also change some of your preferences. Note that blocking some types of cookies may impact your experience on our websites and the services we are able to offer.

Essential Website Cookies

These cookies are strictly necessary to provide you with services available through our website and to use some of its features.

Because these cookies are strictly necessary to deliver the website, refusing them will have impact how our site functions. You always can block or delete cookies by changing your browser settings and force blocking all cookies on this website. But this will always prompt you to accept/refuse cookies when revisiting our site.

We fully respect if you want to refuse cookies but to avoid asking you again and again kindly allow us to store a cookie for that. You are free to opt out any time or opt in for other cookies to get a better experience. If you refuse cookies we will remove all set cookies in our domain.

We provide you with a list of stored cookies on your computer in our domain so you can check what we stored. Due to security reasons we are not able to show or modify cookies from other domains. You can check these in your browser security settings.

Google Analytics Cookies

These cookies collect information that is used either in aggregate form to help us understand how our website is being used or how effective our marketing campaigns are, or to help us customize our website and application for you in order to enhance your experience.

If you do not want that we track your visit to our site you can disable tracking in your browser here:

Other external services

We also use different external services like Google Webfonts, Google Maps, and external Video providers. Since these providers may collect personal data like your IP address we allow you to block them here. Please be aware that this might heavily reduce the functionality and appearance of our site. Changes will take effect once you reload the page.

Google Webfont Settings:

Google Map Settings:

Google reCaptcha Settings:

Vimeo and Youtube video embeds:

Other cookies

The following cookies are also needed - You can choose if you want to allow them:

Privacy Policy

You can read about our cookies and privacy settings in detail on our Privacy Policy Page.

Privacy Policy
Accept AllDecline AllUse Only Selected
Open Message Bar Open Message Bar Open Message Bar