Get App-ing with Google App Inventor

| No Comments
Finally! Google opened up the AppInventor to the general public.Armaghan Chaudhary-Google Ap Invetor.jpg
 Fresh off from Google Labs, the App Inventor lets a user create an Android App pronto! Think of it as the Form Designer of Android. It lets you create your own apps and saves the files online. Its a drag and drop interface with custom properties for each item displayed in a separate view. The components available for the apps include social, media, animation, maps and sensor widgets etc.  Once your app has been created, you are able to download it to your phone for a final round of testing. Thats it! Its that easy!

Here are a few links to get your hands dirty:

  • Get your own account today: Link
  • Quick intro on App Inventor : Link 
  • Learn what you can do with Google App Inventor: Link
The App Inventor comes with a tons of online tutorials and instructional videos on how to use it correctly. Its a Beta release at the moment and all you need is a Google account, some coffee and a Google phone ( it comes with an emulator in case you don't have one).

What are you waiting for ? Get App-ing! 
Even your 2 year old can make Google Apps now :)


(Disclaimer.. My personal journey = my personal comments, I don't want you to whine about how Apple is evil and Google stands for all the good stuff...it's my personal story)

So...when I was given the choice between an Apple (iPhone4) and an Android phone (HTC Desire), the choice for me was obvious. Being a hardcore Google user (Gmail, Google Maps, Google Docs to name a few), I was extremely pumped to get my hands on a Google Phone. 

Finally the day came when my shiny brand new HTC arrived at my desk. After asking me to enter my Google ID , my journey started with complete awe at what Google had done. It had brought together the great hardware of HTC and the flashy awesomeness of the Google software. The phone had great features; free apps, Google Navigation ( bye bye TomTom) a great camera and ofcourse my favorite Google resources...Gmail and Google docs. All of my contacts came seamlessly into the phone as well and I didn't have to sync anything to get me going . I was able to download and run multilple apps at the same time in the background without any issues. Overall it was a great experience.

HTC_Desire10-420-90.jpg
By the time I got home, an email had arrived from my work that I had to answer right away. For the love of God, I was not able to make the screen go horizontal on me. The only way for me to write the long email was to hold it vertically and write the email. On top of that, it seemed like I had forgotten how to type as I was making spelling mistakes as I have never made before in my life. After all was said and done, I sang great tales of the phone to my wife and told her that the phone might be broken since it doesn't switch its view when its moved horizontally. It was at that time when my wife asked "Did you try it the other way"? That got me thinking. I, being left handed, was turning the phone to the right as any normal left handed person would do since they would be holding the phone in their right hand and naturally would turn the phone to their right. As soon as I turned the phone to the left, the view on the screen flipped and I was able to read stuff in the horizontal direction. Bottom line...the HTC was not designed for left handed ppl ( It got fixed when the Froyo update was released later on in the month). That kinda ticked me off. Oh well, I was sure it would be fixed in the next release of the OS which turned out to be true ( a bit too late for me ).
One of the most popular apps out there is Jutin.tv. My brother (in Scotland) and I decided to check it out and within 3 mins of its use, I felt the phone heating up at the bottom. I didn't pay any attention to it but after 13 mins, I was having a hard time even holding it . That rang all kinds of alarm bells in my head since the phone`s battery is no where close to the part that was heating up. I noticed the same issue when I was using the Google Navigation application and after a few mins, I was unable to hold the phone in my hand anymore. Now picture an app like that running in the background while the phone is in your pocket ...your manhood can be fried after prolonged exposure...I'm just saying...it's not going to happen..I hope...
So with all it's perfection, the heating issue killed it for me. I spoke to a friend of mine at RIM about it and he mentioned that it might be the antenna generating the heat (Radiation therapy anyone ?). I also noticed that with the passage of time, the battery life of the HTC kept going down. Possible reason: all those back-end services running quietly do take their toll on the battery life of the phone. 
I decided to look at the iPhone as a replacement for the HTC. Keeping my basic requirements in mind, I started reading up on the iPhone. Even though Gmail and Google docs are available on the iPhone, the docs can only be opened up in read only mode. That was a point of concern for me until Gavin shared a link with me which outlined that doc editing was coming soon to the iPhone. Since I have never heard of any heating issues with the iPhone, I decided to take a leap of faith ( Sarah had a part in this with the peer pressure).


iphone-4-uk-price6.jpg
Finally, I got my iPhone yesterday.After carefully setting it up, I decided to send a test
email.To my surprise, I had NOT lost my typing skills at all; they apparently came back with the iPhone4 as I was not making any typing mistakes using the soft keyboard of the iPhone at all. With a phenomenal keyboard and no heating issues during my preliminary testing (not to mention the awesome sleek design and the UI of the iPhone), my leap of faith was turning out to be a great choice. I tried the Justin.tv application on the iPhone as a test and I had no issues what so ever. I tried running multiple applications at the same time and did not see any issues ( partly because Apple handles the way applications run differently than the HTC... I can write a whole blog entry about that ).  

Bottom line, my journey from the good to the dark side has been awesome. Even though some people will still hold a grudge against the new iPhone, I absolutely love it and will not recommend an HTC phone to anyone.


 

Migrating an ES application into ES2

| No Comments

I have performed a few ES to ES2 Migrations and there isn't too much information out there on what is involved in the process. Here is an outline based on my personal experience:

The following link gives you the ability to step over the first few manual steps to the migration process: Adobe Labs

Have a look at the following blog post as well as the captivate video that gives an overview of the migration process if its done from scratch :  LiveCycle Expresso

lc_appicon.gif

This should serve as a starting point to your migration process.A few things to look out for: 

  1. XfaForm variables are no longer supported in ES2. However, you will be able to run such processes in deprecated mode but not for too long. 
  2. The concept of application based projects has been introduced in ES2. 
  3. The concept of a repository is no longer there in ES2. The applications refer to their own local resources in the applications or you can create an application that contains all the resources/ Assets etc. You must export all your assets from the repository manually and import them into a new application in ES2. 
  4. You must configure all the paths to the assets in the repository to the application containing your artifacts. 
  5. If you have an assembler service in your process, you must re-configure it to use a document variable instead of a string (this has not been document anywhere and is a bug).
  6. If you have any custom components, you must export them manually from the ES server and import them into ES2 before you migrate the processes. 
  7. Finally, you must remove all the deprecated services and replace them with the ES2 versions. 
  8. I won't recommend the approach of creating an ES LCA and importing into ES2. This has caused a lot of issues for me in the past. 

Thats just my 2 cents. If you have any questions, or require assistance, please leave a comment on my blog.

Useful SQL Queries

| No Comments

You might find the following queries quite handy for your day to day SQL operations:

1. Get the total number of records in a table:

SELECT COUNT(*) FROM TABLE_NAME;

SQL User queries in Oracle

| No Comments

Here are a few  useful user SQL code snippets in Oracle:

1. To create a user

CREATE USER username
IDENTIFIED BY password
DEFAULT TABLESPACE USERS
TEMPORARY TABLESPACE TEMP;

2. Grant user privileges:

GRANT CONNECT, RESOURCE, CREATE SESSION, CREATE VIEW TO username;


3. Grant all privileges:

GRANT all privileges TO username;

4. Delete a user or to delete a user and the associated user schema

drop user username cascade;

This SQL Snippet get a list of all the tables under a user:

select * from user_objects where object_type = 'TABLE';

This SQL Snippet will get you a list of all the sequences in a DB Schema for the user tables

select * from user_sequences


This SQL Snippet will get you a list of all the view in a DB Schema for the user tables

select * from user_views;

Happy Coding :)

Finding out the Oracle Version using SQL

| No Comments
If you ever have to find out the version of Oracle using SQL, use the following SQL command and it will spit out all the details.

SQL
 SELECT * FROM V$VERSION;

OUTPUT

BANNER                                                          
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production                          
CORE    10.2.0.1.0    Production                                        
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production         
NLSRTL Version 10.2.0.1.0 - Production
----------------------------------------------------------------

Happy Coding :)

Changing the default port number in Apache Tomcat

| No Comments

I had to run two webservers on my machine at the same time. Since both of them used port 8080 , the easiest way to run the two servers at the same time was to modify the port number on one of them. tomcat.gif
Here is how we can change the port number in Apache Tomcat:

1. Navigate to : Apache Software Foundation\Tomcat X.X\conf
2. Modify the Server.xml file:

<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="8080" ... />

Modify this to another non-conflicting port ( I changed it to 8888).

Happy Coding



XML Manipulation in Flex and ActionScript

| No Comments
There are lots of crazy ways of manipulating XML in ActionScript.Here are a few simple tips and tricks on manipulating XML in Actionscript.

  1. Declaring an XML Variable: An XML variable can be created in ActionScript as follows :
                 var tempSearchXML:XML =     <searchCriteria>
                                                                <branchName>023</branchName>
                                                                <contfirstname></contfirstname>
                                                                 <contlastname></contlastname>
                                                                 <contmailsort></contmailsort>
                                                                 <contphone></contphone>
                                                             </searchCriteria>
                                         
2.  Preview an XML Variable : An XML variable can be previewed in an Alert Box by converting the XML to a string object
       
            Alert.show(tempSearchXML.toString());
           
3.  Getting the value of a Node in the XML:

           Alert.show(tempSearchXML.branchName.toString());

4.  Setting the Value of Node in the XML : The following code sets the value of a node 'contfirstname '.
 
            tempSearchXML.contfirstname ="Armaghan";

5.  Setting / Changing / Updating the Node Attribute in the XML: The following code snippet changes the name of a Node from 'contlastname' to 'lastname'.

            tempSearchXML.contlastname.setName("lastname") ;
           
5.  Delete a Node in the XML: The following code snippet deletes a Node called 'contphone' in the XML.

            delete tempSearchXML.contphone;

6.  Adding a Node in the XML: The following code snippet adds a Node called 'text' in the XML and sets its value at the same time.

            tempSearchXML.text ="Taylor" ;

Happy Coding :)

Dump the Ant build information to a log file

| No Comments

If you ever need to dump the build information from the command prompt console into a log file, just add a -logfile <filename>.log parameter after your build file call in the command prompt console and you're good to go.

Happy Coding :)