DCSIMG
June 2011 - Posts - Life Michael

June 2011 - Posts

Hybrid Applications for Mobile Platforms

I chose to write this post for the benefit of all people who are not familiar with hybrid applications for mobile telephones. This Thursday I will lecture about hybrid applications for mobile telephones in Open Source 2011. I believe this post can be the appetizer for my lecture.

In the past, applications for mobile telephones were developed similarly to applications we install on our personal computer. When the case was iPhone they were developed in Objective-C. When the case was Windows Mobile or Windows Phone they were developed in C#. When the case was Black Berry they were developed in Java using Black Berry SDK. When the case was Android they were developed in Java using Google Android SDK. When the case was Java ME devices they were developed using Java ME. When the case was Symbian they were developed in C++. In addition, the differences between different phone models that use the same platform left us with the inevitable need to develop multiple versions of the same application for different phone models within the same platform group.

The need for so many versions of the same application turned the development of applications for mobile telephones that target most of the market into a very expensive adventure. In my post from 2008 I describe the case with Java ME.

Today there is an alternative that allows us to develop less versions of our application and in a way that the major part of it is shared among all versions for all platforms. Given the fact that nearly all mobile platforms SDKs allow us to develop applications that includes a user interface component based on the internal mobile telephone browser spread over the entire screen we can develop the main part of the application in Java Script and HTML5. We can even keep it on the server allowing the applications installed on the users' devices to fetch their up-to-date version directly from the server.

We can use new emerging JavaScript libraries such as jQueryMobile and SenchTouch in order to create appealing user interface.

We can use JavaScript libraries such as PhoneGap in order to allow the JavaScript code running within the application to access the native part of the mobile telephones doing things that normally only native applications developed the old way can do (accessing the address book, using the phone camera, getting geo location data from the mobile telephone etc.).

Today you can already find lots of mobile telephones apps developed this way. In many case you won't feel the difference. Hereto several links you can follow in order to see samples for hybrid applications for mobile telephones.

Samples for Hybrid Applications for Mobile Platforms that use the PhoneGap library
Samples for Hybrid Applications for Mobile Platforms that use the SenchaTouch Library

Many people get confused when it comes to using libraries as PhoneGap. Using PhoneGap doesn't place any limit regarding the usage of other JavaScript libraries as Sencha Touch and jQuery Mobile in the same app.

Simple Table Query on Azure

The Azure platform allows us to store data through several "no sql" services. One of them is tables. Each table holds entities. Unlike tables on relational databases, these tables don't follow a schema. Each entity they hold can be with a different number of properties (similarly to MongoDB).

The following video clip shows how simple it is to query a table on the azure platform. You can find the source code in my "Azure Basics" on going course. You can find the community version of this available for free personal usage at www.abelski.com.

Posted by life | 1 comment(s)
תגים:,

The Azure Data Explorer

The Azure Storage Explorer is one of many tools that allows you to manage the data you store on the Azure platform. You can download it for free at http://azurestorageexplorer.codeplex.com. The following video clip shows how simple it is to use it.

Posted by life | with no comments

Reflection in PHP

Similarly to software programming languages as Java and C#, PHP also allows us to write code that finds information about objects and classes. Whether the class was already known during the development phase or was created afterwards, using reflection we can get detailed information about the class and even invoke its methods or access its fields.

This capability is of a special interest for those who develop complex server side applications and frameworks that can be extended through code developed by others.

The following video clips overview some of the reflection capabilities in PHP. You can find the source code in my PHP Fundamentals course. Its community version is available for free personal usage at www.abelski.com.

Posted by life | 1 comment(s)
תגים:,

Namespaces in PHP

PHP 5.3 allows us to group the classes, the constants and the functions we define into separated groups, also known as namespaces. Doing so we can cope with possible names collisions. Unlike previous PHP versions that introduced new features their syntax derive from Java (e.g. the extends and implements keywords), this time the developers of the PHP programming language chose to follow the syntax of C#.

The following video clips overview simple code samples that use this new features. The source code is available in my 'PHP Fundamentals' course. The community version of this course is available for free personal usage at www.abelski.com.

Posted by life | 3 comment(s)

Patterns Matching in F#

Patterns matching allows us to check the exact type of a value we hold. Think about writing the code in C# for getting the same outcome. Patterns matching allows us to write shorter programs simpler for maintenance.

You can find the source code in my F# Fundamentals course. You can find its community version available for free personal use at www.abelski.com.

Posted by life | with no comments

F# Object Oriented Capabilities

The F# programming language supports many of the well known object oriented possibilities we know in C#. The following video clips show some of these capabilities. You can find the source code as part of my F# Fundamentals course. Its community version is available for free personal use at www.abelski.com.

Posted by life | with no comments
תגים:,

Modules in F#

Module is a simple container of values, types definition and sub modules. There are two types of modules. Local modules and top level ones. The following video clips show how to define them. You can find the source code as part of my F# Fundamentals course. Its community version is available for free personal usage at www.abelski.com.

Posted by life | with no comments
תגים:,

Developing a Simple HTTP Server in C#

This short video clip shows how to use the HttpListener class in order to develop a simple HTTP server in C#. This video clip was developed as part of the 'C# Fundamentals' course available for free personal usage at www.abelski.com.

More video clips can be found at www.abelski.com and at www.CSharpBook.co.il.

Posted by life | with no comments

Develop WordPress Plugins in PHP

I have recently completed training material that teaches how to develop plugins for WordPress. The following three video clips explain how to develop different types of WordPress plugins. The source code is available in my WordPress Plugins Development new course. You can find its community version available for free personal and academic usage at www.abelski.com

Posted by life | with no comments
תגים:, ,

Working with JSON in PHP

Since the emergence of PHP 5.2, the JSON extension is already compiled into the PHP execution environment. We can use it out of the box without any specific configuration.

The json_encode function receives an array in PHP and encode it into JSON format. The following video clip shows that.

The json_decode function receives a string in JSON format and returns its data as a simple array in PHP. The following video clip shows that.

Posted by life | with no comments

Soap Web Services in PHP

PHP supports a wide range of web services types, including REStful Web Services, WDDX Web Services and SOAP Web Services. The following video clip shows how simple it is to consume a SOAP web service in PHP.

Posted by life | with no comments
תגים:,

The PHP __autoLoad($str) Magic Function

The PHP __autoLoad($str) magic method is been called when a class is required. We can define it in our PHP script and let it handle the inclusion of a separated PHP script source code where the class is defined.

I have just updated the Object Oriented Programming slides in my PHP Fundamentals course with a code sample and an additional explanation. The following video clip explains the purpose of this magic function and explains a code sample that uses it.

Posted by life | 3 comment(s)

Partial Class in C#

The C# programming language allows us to define the very same class in separated files. The C# programming language even allows us to write these two source code files separately allowing us to add additional definitions to a class that was already defined earlier. The following video clip (hebrew) explains how to define a partial class.

More video clips that explain additional fundamental topics in C# can be found at www.CSharpBook.co.il.

Posted by life | with no comments