Showing posts with label Rahul. Show all posts
Showing posts with label Rahul. Show all posts

Wednesday, June 23, 2010

What is WAP?

What is WAP?
WAP is a standard to show internet contents on wireless clients, like mobile phones.
WAP is for handheld devices such as mobile phones
WAP is a protocol designed for micro browsers
WAP enables the creating of web applications for mobile devices.
WAP uses the mark-up language WML (not HTML)
WML is defined as an XML 1.0 application


WAP Micro Browsers

To fit into a small wireless terminal, WAP uses a Micro Browser.

A Micro Browser is a small piece of software that makes minimal demands on hardware, memory and CPU. It can display information written in a restricted mark-up language called WML.

What is WML?

WML stands for Wireless Markup Language. It is a mark-up language inherited from HTML, but WML is based on XML, so it is much stricter than HTML.

WML is used to create pages that can be displayed in a WAP browser. Pages in WML are called DECKS. Decks are constructed as a set of CARDS.

Example WML document:

"http://www.wapforum.org/DTD/wml_1.1.xml">



Our HTML Tutorial is an award winning
tutorial from W3Schools.





In a WAP browser screen only one card is displayed at a time.

WMLScript can apply for client side scripting like JavaScript for HTML and for styling WCSS is used.

Monday, June 21, 2010

Ruby - OOP

Ruby is a 100% object oriented programming language. When i make this statement you may question me "Your now saying the Ruby is a 100% oop language, but you haven't create a even single object in your hello world demo? ". Here is the answer.

puts "Hello World";

When you run the above code a default main object is created on the memory and puts method is invoked with "Hello World" argument.

Now i briefly explain how to create your own class, method and object.

class MyClass
def saysomething
puts("Hello")
end
end

my_class = MyClass.new
puts my_class.class
my_class.saysomething

Not on the code
-----------------
* class declaration started by class MyClass and ends with end.
* methods are declared using def keyword following method name, ends with end.
* Object is created by invoking the new method of the class. new method is inherited from top most parent class.

Sunday, June 20, 2010

Learn Ruby - String Manipulation

Converting to upper case
puts 'Hello, World'.upcase

Getting command line input
print 'Enter your name : '
name = gets
puts "Hello #{name}"

Calculation and Print
# This is a comment
#{This is a comment}
puts("\n\t#{(1+2)*3}")

Wednesday, June 16, 2010

Start learning Ruby- Installation and Introduction

         Ruby is a programming language which were born in Japan and Japanese human language and adopted to English.

Rather than telling about history I'll move to practical stuff now.

Installing Ruby

If your using Windows OS download the setup from http://www.ruby-lang.org/en/downloads/ else if your using Linux OS install using "yum install ruby"
 In Windows you may need to add the RUBY_PATH to classpath enviornment variable.
Once you have installed the rupy you can check it using following command by opening your terminal.
ruby -v

Hello World Program
Here we are going to run our first hello world program
Open your favorite text editor
Here is the butyl, you may remember your first Java/c#/etc Hello World program which having more than 4 lines. See the ruby hello world
Type following code:
puts "Hello World";
Save it as any name you wish(mine is first.rb) with .rb extension.

From your comman prompt/terminal cd to the file location execute using following command,
$> ruby first.rb
This print 'Hello World' on your terminal.
Thats it for the moment in future i'll come up with some more ruby programming.