Microsoft joins the open-source Eclipse Foundation

microsoft-eclipse

Microsoft has made an announcement regarding its association with Eclipse foundation, which is an open source group known for its Eclipse IDE offering. The foundation also offers many other Developer tools. The association implies that Microsoft will now shake hands with other Eclipse sponsors like Google, Novell, IBM, Debeka and Oracle.

Known that Microsoft offers its own IDE i.e. Visual Studio, this announcement has given a surprise to the world of Computers.

Microsoft, however, is actually active in the Eclipse Ecosystem. The company offers an Azure toolkit for Eclipse.

This announcement clearly states that Microsoft is now trying to strengthen its role in the open source ecosystem.

According to Microsoft General Manager, Shanku Niyogi, “We have worked with eclipse foundation for many years to improve java experience across the portfolio of application platform and development services, including Visual Studio Team Services and Microsoft Azure.”

Microsoft-join-in-Eclipse-Foundation-open-source-community

NoSQL

nosql_logo_0

Over the last few years we have seen the rise of a new type of databases, known as NoSQL databases, that are challenging the dominance of relational databases. Relational databases have dominated the software industry for a long time providing mechanisms to store data persistently.

A NoSQL database provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases.

NoSQL what it means ?

NoSQL means Not Only SQL, implying that when designing a software solution or product, there are more than one storage mechanism that could be used based on the needs. NoSQL was a hashtag (#nosql) choosen for a meetup to discuss these new databases. The most important result of the rise of NoSQL is Polyglot Persistence. NoSQL does not have a prescriptive definition but we can make a set of common observations, such as:

  • Not using the relational model
  • Running well on clusters
  • Mostly open-source
  • Built for the 21st century web estates
  • Schema-less

NoSQL databases are increasingly used in big data and real-time web applications. NoSQL systems are also called “Not only SQL” to emphasize that they may also support SQL-like query languages.

Types of NoSQL Databases:

NoSQL databases can broadly be categorized in four types.

  • Document databases pair each key with a complex data structure known as a document. Documents can contain many different key-value pairs, or key-array pairs, or even nested documents.
  • Graph stores are used to store information about networks, such as social connections. Graph stores include Neo4J and HyperGraphDB.
  • Key-value stores are the simplest NoSQL databases. Every single item in the database is stored as an attribute name (or “key”), together with its value. Examples of key-value stores are Riak and Voldemort. Some key-value stores, such as Redis, allow each value to have a type, such as “integer”, which adds functionality.
  • Wide-column stores such as Cassandra and HBase are optimized for queries over large datasets, and store columns of data together, instead of rows.

Facebook Laws in India

Facebook Laws in India

Think before you post
Before posting on Facebook,
Ask yourself one question.
If this comment were about my family, or me,
Would I be offended?
If your answer is yes,
DO NOT post.

 

Is it legal to ridicule a Government official or Minister on Facebook?

ü No

Ridiculing a Government official or Minister on Facebook could be illegal under the following laws:

  • Sedition
  • Defamation
  • Sending offensive electronic messages

Plus, if the Minister or official is a woman, it could also be covered under indecent representation of women.

Offence Max Jail Time Arrest Warrant needed? Bailable?
Sedition Life ImprisonmentUnlimited Fine No No
Defamation 2 YearsUnlimited fine Yes Yes
Sending offensiveelectronic messages 3 YearsUnlimited fine No Yes
Indecent representation

  • of women
2 yearsRs. 2,000 Yes Yes

 

 

 

 

 

 

Some Cases

  • Two Air India cabin crew members were arrested and jailed for 12 days for posting “derogatory” remarks against the Prime Minister’s Office, the national flag and the Supreme Court, while commenting on a strike by Air India pilots. (India, May 2012).
  • Ahmad Shuman was arrested for creating a Facebook page criticizing Lebanese President Michel Sleiman. (Beirut, July 2010).
  • Vikas Mavhudzi was arrested for “subverting a constitutional government” when he posted a facebook message in support of the protests in Egypt. (Zimbabwe, April 2011)
  • Vikas Mavhudzi was arrested for “subverting a constitutional government” when he posted a facebook message in support of the protests in Egypt. (Zimbabwe, April 2011)
  • Ambikesh Mahapatra, a Chemistry professor at Jadavpur University, was arrested for forwarding a cartoon featuring the West Bengal CM MamataBanerjee. (April 2012, India)
  • Jaya Vindyala, a lawyer and president of the Andhra Pradesh unit of People’s Union for Civil Liberties, was arrested for her comments against A Krishnamohan, a Congress MLA from Chirala in Prakasam district. Ms Vindyala had accused the MLA of being involved in child trafficking, ganja mafia, sand mafia and land mafia. (Hyderabad, India, May 2013)

 

Is it legal to ridicule a Celebrity or even an ordinary Person on Facebook?

ü      No

Ridiculing a celebrity or even an ordinary person on Facebook could be illegal under the following laws:

  • Defamation
  • Sending offensive electronic messages

Plus, if the victim is a woman, it could also be covered under indecent representation of women.

Offence Max Jail Time Arrest Warrant needed? Bailable?
Defamation 2 YearsUnlimited fine Yes Yes
Sending offensiveelectronic messages 3 YearsUnlimited fine No Yes
Indecent representation

  • of women
2 yearsRs. 2,000 Yes Yes

 

 

 

 

 

Some Cases

  • Adam Mann murdered his ex-wife, Lisa Beverley because she taunted him on Facebook by calling him “a joke”. (USA, 2009)
  • Brian Lewis killed his wife, Hayley Jones after she changed her Facebook profile from “married” to “single”. (USA, 2009)
  • Ms. Phoebe Prince, a school student committed suicide due to excessive cyberbullying that went on for months. She had been receiving abusive text messages and was being harassed on her Facebook wall. (Massachusetts, USA, 2010)

 

Is it legal to ridicule a religion on Facebook?

ü     No

This is a serious offence and could get someone in jail for upto 3 years! Ridiculing a religion on Facebook could be illegal under the following laws:

  • Promoting enmity on grounds of religion8
  • Outraging religious feelings9
  • Wounding religious feelings10
  • Sending offensive electronic messages11
  • Imputations, assertions prejudicial to national-integration

 

Offence Max Jail Time Arrest Warrant needed? Bailable?
Promoting enmity on religious grounds 3 YearsUnlimited fine No No
Outraging religious feelings 3 YearsUnlimited fine No No
Wounding religious feelings 1 YearsUnlimited fine Yes Yes
Sending offensiveelectronic messages 3 YearsUnlimited fine No Yes
Imputations, assertions prejudicial to national integration 3 YearsUnlimited fine No no

 

 

 

 

 

 

 

Case

  • Atul Mehta, a property dealer, was arrested for circulating jokes on Sikhs. He was booked for “hurting religious sentiments” and for sending “offensive electronic messages”. (Amritsar, India, September, 2013)

 

Is it legal to refer a politician as “corrupt” on Facebook?

ü     No

No, unless the politician has been found guilty of corruption by a court of law. This is a serious offence and could get someone in jail for upto 3 years!

If the politician has not been found guilty of corruption, by a court of law, then calling him corrupt is punishable under following laws:

  • Defamation
  • Sending offensive electronic messages

 

Offence Max Jail Time Arrest Warrant needed? Bailable?
Defamation 2 YearsUnlimited fine Yes Yes
Sending offensiveelectronic messages 3 YearsUnlimited fine No Yes

 

 

 

 

 Is it legal to call someone an “idiot” on Facebook?

ü     No

This is a serious offence and could get someone in jail for upto 3 years!

The dictionary meaning of “idiot” is a “person of low intelligence” or a “mentally deficient person”.

Since it is impossible to prove that a person is actually an “idiot”, calling someone an idiot would amount to defamation and would be punishable under two laws:

  • Defamation
  • Sending offensive electronic messages
Offence Max Jail Time Arrest Warrant needed? Bailable?
Defamation 2 YearsUnlimited fine Yes Yes
Sending offensiveelectronic messages 3 YearsUnlimited fine No Yes

 

 

 

 

Is it legal to call someone an “fat pig” on Facebook?

ü     No

This is a serious offence and could get someone in jail for upto 3 years!

In a normal Indian context, referring to someone as a “fat pig” may cause it to be believed that the person’s body is in a loathsome or disgraceful state.

This would be punishable under two laws:

  • Defamation
  • Sending offensive electronic messages

 

Offence Max Jail Time Arrest Warrant needed? Bailable?
Defamation 2 YearsUnlimited fine Yes Yes
Sending offensiveelectronic messages 3 YearsUnlimited fine No Yes

 

 

 

 

A related case

Farah NurArafah, an 18-year-old, was given a 75-day suspended jail sentence for calling her friend a “promiscuous, overweight pig” on Facebook. (Indonesia, February 2010)

 

Is it legal to call someone an “ugly pimples” on Facebook?

ü     No

This is a serious offence and could get someone in jail for upto 3 years!

In a normal Indian context, referring to someone as a “ugly pimples” may cause it to be believed that the person’s body is in a loathsome or disgraceful state.

This would be punishable under two laws:

  • Defamation
  • Sending offensive electronic messages

 

Offence Max Jail Time Arrest Warrant needed? Bailable?
Defamation 2 YearsUnlimited fine Yes Yes
Sending offensiveelectronic messages 3 YearsUnlimited fine No Yes

 

 

 

WINDOWS AZURE

 

What is Windows Azure?

Windows Azure is a cloud services operating system that serves as the development, service hosting and service management environment for the Windows Azure platform. Windows Azure provides developers with on-demand compute and storage to host, scale, and manage web applications on the internet through Microsoft datacenters.

Windows Azure is a flexible platform that supports multiple languages and integrates with your existing on-premises environment. To build applications and services on Windows Azure, developers can use their existing Microsoft Visual Studio expertise. In addition, Windows Azure supports popular standards, protocols and languages including SOAP, REST, XML, Java, PHP and Ruby. Windows Azure is now commercially available in 40 countries.

Windows Azure is a Microsoft Cloud Computing Platform to build, deploy, manage applications through a global network of Microsoft. You can build a application in any platform, and you can integrate your public cloud applications with your existing IT environment. It allows you to build applications in different languages, tools or frameworks.

Features:

•           Windows Azure is an open and flexible cloud platform

•           Windows Azure delivers a 99.95% monthly SLA

•           Enables you to use any language, framework, or tool to build applications.

•           Unlimited servers. Unlimited storage.

•           Powerful Capabilities.

Windows Azure Platform

“The Windows Azure platform is a flexible cloud–computing platform that lets you focus on solving business problems and addressing customer needs. Learn more about the Windows Azure Platform.”

The windows Azure platform makes it easy for startups to get a production ready solution up and running quickly so you can pursue the things that matter. Windows Azure offers a simple, comprehensive, and powerful platform for the creation of web applications and services. Windows Azure enables Start-ups to focus on their business logic, as opposed to operational hurdles, in creating compelling products. Windows Azure platform frees up time required for deploying, configuring, maintaining, updating and fixing systems by automating a bulk of these asks and providing solution to historically painful issues like:

      Geo location of hosting servers

Real time backup and failover for databases

Deploying from staging to production environments

Shared memory caches

         Windows Azure improves productivity and lowers up-front capital costs while providing a scalable infrastructure to start up your business quickly and efficiently. Windows Azure based cloud services costs are driven by compute hours, data transfers, service bus connections, access control transactions and database storage.

 

Microsoft Silverlight – A next Gen RIA Technology

Before we ahead with this topic. Let me tell you that this is with the reference to my earlier post. As i had mention Silverlight as a RIA technology to develop Applications. If you have not read that article do read What is RIA ?

Microsoft Silverlight is a free web-browser plug-in that enables interactive media experiences, rich business applications and immerse mobile apps.

Windows? Check. Mac? Check. Linux? Check. Silverlight works on all major OS’s plus all major browsers, including Firefox, Google Chrome, Safari, and yes, how can we forget the very own Microsoft browser Internet Explorer.

Microsoft_Silverlight_logo

 

What is Microsoft Silverlight?

Microsoft Silverlight is a powerful tool for creating and delivering rich Internet applications and media experiences on the Web. Silverlight 5 builds on the foundation of Silverlight  4 for building business applications and premium media experiences. Silverlight 5 introduces more than 40 new features, including dramatic video quality and performance improvements as well as features that improve developer productivity.

While early versions of Silverlight focused on streaming media, current versions support multimedia, graphics and animation, and give developers support for CLI languages and development tools. Silverlight is also one of the two application development platforms for Windows Phone.

It is combination of different technologies into a single development platform that allows you to select tools and the programming language you want to use. Silverlight integrates seamlessly with your existing JavaScript and ASP.NET AJAX code to complement functionality which you have already created.

Microsoft Silverlight aims to compete with Adobe Flash and the presentation components of Ajax. It also competes with Sun Microsystems’ Java FX, which was launched a few days after Silverlight.

Silverlight has upto now have had 5 versions. I am only mentioning the features of the current version Silverlight 5 (5.0.61118.0)

 

Features of Silverlight 5 (5.0.61118.0)

  • Improved media support.
  • Improved Text support.
  • Silverlight 5 performance improvements.
  • Silverlight 5 performance improvements.
  • Silverlight 5 extends features of the “Trusted Application” model.
  • Tools improvements
  • Building next-generation business applications.

 

To get to know more in detail about these features you may visit the following link :

http://go.microsoft.com/fwlink?linkid=229308

 

How Silverlight has change the Web?

 

  •  Highest Quality Video Experience
  •  Cross-Platform, Cross-Browser
  •  Developers and Graphic Designers can play together!
  •   Cheaper
  •  Support for 3rd Party Languages Cross-Platform, Cross-Browser Remote Debugging
  •  The best development environment on the planet
  •  Silverlight offers copy protection
  • Extreme Speed

 

Supported Platforms

Desktop computers

Silverlight requires a processor with Streaming SIMD Extensions (SSE) support. Supported processors include the Intel Pentium III and up, and the AMD Athlon XP and up.

This image below will show you the wide support of Silverlight.

Silverlighht support

Mobile devices

Silverlight is the primary development environment for Windows Phone and is based on Silverlight 4.

Now that you have read about Silverlight and its various other aspects. You must be tempted to start using and develop application using this Microsoft Technology.

Here below is some prerequisite software and tools you need to begin with the application development.

 

Getting Started With Silverlight

In order to start with following tools required.

Microsoft Silverlight Runtime:

The runtime required to view Silverlight applications created with .NET Microsoft. The current version on is Silverlight 5 (5.0.61118.0). To download it click Here

Developer Tools:

If you don’t have a preferred development tool installed already, install

Microsoft Visual Studio 2010 Web Express

 

The next thing you require is Add on for Visual Studio and i.e.  Silverlight 5 Tools for Visual Studio . This is required to create Silverlight application with Visual Studio 2010.

Designer Tools

Expression Studio 4.0

The latest offering from Microsoft to create Silverlight content

 

Software Development Kits (SDK’s)

Microsoft Silverlight Software Development Kit: Download this SDK to create Silverlight Web experiences that target Silverlight 5.0. The SDK contains documentation, tools, Silverlight ASP.NET controls and the libraries needed to build Silverlight applications.

 

For those who need to verify the version of Silverlight plug-in installed on their browser click here Verify Install.

For other download related to Silverlight Visit the Download Centre of Silverlight Website for other useful tools, toolkits, and SDKs related to Silverlight 5.

So what are you waiting for …?

Get Silverlight 5

 

LINKS:

You must be thinking any further reference links.

As you review Microsoft Silverlight, please feel free to consult any of the many additional resources provided. More information can be found at the following locations:

 

Courtesy:

Image: – Wikipedia, Microsoft

Content: – Wikipedia, Microsoft

Happy Silverlight Development.

Regards

Akrati Gupta

Win Free .Com Domains & Hosting For One Year [Giveaway]

Seobloggingtips.com organized one cool giveaway few days ago and gave away domain name to winners, well guess what, its even bigger now. This year end they are giving away 2 domain names (.com) for free and a Free Hosting Account from them for one full year.

How To Win .Com Domains & Free Hosting

Well, This post is really meant for bloggers without commercial domain name or any other blogger who wants an extra domain name for free. So conditions are simply put together in a really cool contest box below

 

For the other details please visit seobloggingtips.com

Hope you win the contest and get the prize !!

 

Happy Blogging,

Regards

Akrati Gupta

Introduction to Next Generation Applications – RIA

The web application development is more than just reaching or providing users with the desired information. Present day customers are more demanding and they have high expectations from applications they access on the web.
The customers want to move from just reading the text from the web to writing and contributing information on it. They want the web applications to be more intutive, fast and to have all the features possible in the desktop application. They also want these applictions to be highly interactive with respect to User Interface (UI). All these requirements are fullfilled by the next genereation applications, named Rich Internet Applications (RIAs). RIAs can be developed using Microsoft WPF and Silverlight Technologies.

Introduction to RIAs
RIAs provide the look and feel of a desktop application. Unlike traditional Web applications that allow users to only read information, RIAs allow users to contribute information, such as knowledge articles, pictures, music, videos, and much more. In addition, the web has become an integral part of business organizations to interact with customers, peers, and suppliers and manage their business more effectively and efficiently.

Features of RIA
A Rich UX (Rich User eXperience) is achieved through:

  • Rich user interface: Information on the Web pages is presented with a rich, attractive, and intuitive look and feel.
  • Highly interactive websites: Websites contain sliders to change data, calendar gadgets to schedule tasks, and media players to watch videos and slide shows.
  • Dynamically responsive Web applications: Websites provide quick response to users actions.
  • Wide reach: Web applications can be accessed by desktops, Web browsers, and mobile devices.

Benefits of RIAs
RIA-based applications provide the following benefits to the users:

  • RIA is rich: It contains interactive components.
  • RIA is quick: It is more responsive than a traditional Web application.
  • RIA reduces network traffic: It provides reduced network traffic because the data is processed at the client-end.
  • RIA is asynchronous: It provides asynchronous communication with server that enables the continuous interaction of user with the Web application.
  • RIA is cross-browser and cross-platform: It can run on multiple Web browsers and on different operating system platforms.

The following table explains the differences between a traditional Web application and RIA.

Comparison Criteria

Traditional Web Application

RIA

Request It makes a single HTTP request to the server at one time. The request may contain the information about the user, such as login details and user’s contact details. RIA has multiple components that independently communicate with the server and make asynchronous requests to the server at different times.
Response The response from the server contains the HTML code necessary to refresh the entire page. The formatting of the page is performed at the server. Each response to the request made by different components of RIA contains the data obtained from the server. The client engine performs most of the data processing and renders the processed data as a response. These components are refreshed independently and at different times.
Comparison Criteria Traditional Web Application RIA
Reach This application can run only in the Web browsers. RIAs can run on desktops, Web browser, and mobile devices.
Push/Pull technique The information is pulled by the users from these applications. The information is pulled by the users as well as pushed to the users by RIA through RSS feeds.

Developing RIA
Rich Internet Applications are getting more popularity compare to traditional HTML based internet applications due to enhanced user experience. Although they run in any browser, on any platform and they have features and functionalities of a desktop application.

Technologies used to develop RIAs are:

  • Microsoft WPF
  • Silverlight

Tools available to develop the WPF and Silverlight applications are:

  • Microsoft Visual Studio 2008 : It allows you to write the functional (programming) part for the WPF and the Silverlight applications.
  • Expression Blend: It is an interactive What You See Is What You Get (WYSIWYG) front-end tool for designing eXtended Application Markup Language (XAML) based interfaces for the WPF and the Silverlight applications.

In My next post I will be coming up with “Building a Simple RIA Application…..

Windows Phone 7 Development

Before heading for the title i suppose you are aware about the topic and WP7. If no then you first read the post Windows Phone 7 and then turn back here to read this.

Windows Mobile 7 development is done using the .NET framework. The .NET framework is a software framework created by Microsoft for use in creating Windows applications. Programmers write applications using one of the several languages supported by the .NET framework, like C#, and the applications then execute inside of a runtime environment called the Common Language Runtime. For Windows Phone 7, there are two distinct development approaches you can take when creating your application.

The first approach is to use Silverlight for Windows Phone. Silverlight was originally envisioned as a way for developers to create rich internet applications. It has seen a sharp increase in market adoption in recent years, driven mostly by the fact that Netflix uses Silverlight to stream videos and NBC used Silverlight for its online broadcast of the Olympic games. A Silverlight application combines declarative markup (called XAML) to construct the user interface and code written in a .NET framework language to control an application’s behavior. If you’re developing a data driven application for Windows Phone 7, you should probably use Silverlight.

Alternatively, you can use the XNA framework to develop your Windows Phone 7 app. XNA is Microsoft’s game development framework and has been used in recent years to create both Windows and Xbox 360 applications. If you’re creating a game for Windows Phone 7, you’ll likely use the XNA framework. The XNA framework is quite powerful, but that power comes with a considerable learning curve and longer development cycles.

Scroll to the bottom of the page and download the file named VM_BOOTvm_web.exe. Once the file has downloaded, double click on it to install the complete Windows Phone Developer Tools package. The package includes:

  • Visual Studio 2010 Express for Windows Phone
  • Windows Phone Emulator
  • Silverlight for Windows Phone
  • XNA 4.0 Game Studio

Your computer will likely restart at least once while the tools are being installed. After you’ve installed the developer tools on your system, you are ready to get started.

Opening Visual Studio

The application you’ll create in this tutorial is a simple one. It displays a simple button that you can tap. When you tap it, the button rotates around the phone’s interface. We’ll develop this application using Silverlight for Windows Phone. It should take less than 10 minutes to create.

To begin, open Microsoft Visual Studio 2010 Express for Windows Phone. The easiest way to find it is to open the Start menu and begin typing “Visual Studio.” The application should show up in your search result list, similar to the following:

Click on the Visual Studio 2010 item to open up the development environment. If this is your first time opening the application, it may take a few minutes to start as Visual Studio will initialize some settings for you.

 

Creating Your Project

When you open Visual Studio, you’ll be greeted with the application’s start page. There is a lot of content on this page, including development tips, recent news, and project related actions. It is sometimes helpful to browse the content here to learn more about the platform, but for now just click on the “New Project…” link in the left sidebar.

A dialog box will pop up that guides you through creating your new project. Make sure the “Windows Phone Application” item is selected as your project template. Then, give your project a name. For this tutorial, I recommend calling your project “Rotating_Button.” Finally, confirm that the “Create directory for solution” checkbox is selected. This helps to organize your development efforts. Your settings should match mine:

Click “OK” to create your new project.

Navigating the UI Editor

The template that you’ve selected provides you with a completely working application. To see it in action, simply press CTRL+F5 to compile the application and launch it in the Windows Phone Emulator. The emulator launches with a single page containing an application title and a page title.

That default UI just won’t do for our application, so let’s make some modifications. Visual Studio should have opened the file MainPage.xaml for editing when you created the project. If not, double click the file’s name in the Solution Explorer to open it.

You should see a split screen view. On one side of the development environment you can see how the current file will look when your application is run. This is design mode. On the other side you have the XAML markup that declares how your interface should look. Any changes you make on one side will be represented on the other. This is similar to a WYSIWYG HTML editor like Dreamweaver.

The first thing we want to do is delete everything inside of the layout grid so we can provide our own markup. You should see a Grid tag named LayoutRoot. Delete everything inside this tag. You’ll end up with the following code:

  1. <Grid x:Name=”LayoutRoot” Background=”{StaticResource PhoneBackgroundBrush}”>
  2.   </Grid>

The design mode view should show a blank screen at this point.

 

Creating Your Application’s Layout

You now need to add the UI for your application. Our application consists of a single button that will rotate around a grid. The grid is 2×2, so let’s go ahead and declare that the layout grid should have two rows and two columns. Change your layout grid markup to the following:

                <Grid x:Name=”LayoutRoot” Background=”{StaticResource PhoneBackgroundBrush}”>

                    <Grid.ColumnDefinitions>

                        <ColumnDefinition Width=”*” />

                        <ColumnDefinition Width=”*” />

                    </Grid.ColumnDefinitions>

                    <Grid.RowDefinitions>

                        <RowDefinition Height=”*” />

                        <RowDefinition Height=”*” />

                    </Grid.RowDefinitions>

                </Grid>

Adding the Button

After you’ve defined your layout grid, it is time to create the button that will be tapped by your users. You want the button to start in the upper left box of the grid, so you’ll declare that it goes in Row 0 and Column 0.

In XAML, you tell an element to place itself within a grid by declaring the element and then assigning it the appropriate row and column indices. Inside of your layout grid, add a button using the following markup:

                <Button

                    Grid.Column=”0″

                    Grid.Row=”0″

                    Content=”Tap Me!”

                    HorizontalAlignment=”Stretch”

                    VerticalAlignment=”Stretch” />

This markup says the button should position itself in column and row 0, should stretch both horizontally and vertically within the grid cell it occupies, and that it should have the text “Tap Me!”

Your application’s UI code should now resemble the following:

                <Grid x:Name=”LayoutRoot” Background=”{StaticResource PhoneBackgroundBrush}”>

                    <Grid.ColumnDefinitions>

                        <ColumnDefinition Width=”*” />

                        <ColumnDefinition Width=”*” />

                    </Grid.ColumnDefinitions>

                    <Grid.RowDefinitions>

                        <RowDefinition Height=”*” />

                        <RowDefinition Height=”*” />

                    </Grid.RowDefinitions>

                    <Button

                        Grid.Column=”0″

                        Grid.Row=”0″

                        Content=”Tap Me!”

                        HorizontalAlignment=”Stretch”

                        VerticalAlignment=”Stretch”  />

                </Grid>

At this point, you can fire up your application and see that your UI is in place. Just like earlier, press CTRL+F5 to compile and launch your application in the Win

The first thing we want to do is delete everything inside of the layout grid so we can provide our own markup. You should see a Grid tag named LayoutRoot. Delete everything inside this tag. You’ll end up with the following code:

  1. <Grid x:Name=”LayoutRoot” Background=”{StaticResource PhoneBackgroundBrush}”>
  2.   </Grid>

The design mode view should show a blank screen at this point.

 

Creating Your Application’s Layout

You now need to add the UI for your application. Our application consists of a single button that will rotate around a grid. The grid is 2×2, so let’s go ahead and declare that the layout grid should have two rows and two columns. Change your layout grid markup to the following:

                <Grid x:Name=”LayoutRoot” Background=”{StaticResource PhoneBackgroundBrush}”>

                    <Grid.ColumnDefinitions>

                        <ColumnDefinition Width=”*” />

                        <ColumnDefinition Width=”*” />

                    </Grid.ColumnDefinitions>

                    <Grid.RowDefinitions>

                        <RowDefinition Height=”*” />

                        <RowDefinition Height=”*” />

                    </Grid.RowDefinitions>

                </Grid>

Adding the Button

After you’ve defined your layout grid, it is time to create the button that will be tapped by your users. You want the button to start in the upper left box of the grid, so you’ll declare that it goes in Row 0 and Column 0.

In XAML, you tell an element to place itself within a grid by declaring the element and then assigning it the appropriate row and column indices. Inside of your layout grid, add a button using the following markup:

                <Button

                    Grid.Column=”0″

                    Grid.Row=”0″

                    Content=”Tap Me!”

                    HorizontalAlignment=”Stretch”

                    VerticalAlignment=”Stretch”

                    />

This markup says the button should position itself in column and row 0, should stretch both horizontally and vertically within the grid cell it occupies, and that it should have the text “Tap Me!”

Your application’s UI code should now resemble the following:

                <Grid x:Name=”LayoutRoot” Background=”{StaticResource PhoneBackgroundBrush}”>

                    <Grid.ColumnDefinitions>

                        <ColumnDefinition Width=”*” />

                        <ColumnDefinition Width=”*” />

                    </Grid.ColumnDefinitions>

                    <Grid.RowDefinitions>

                        <RowDefinition Height=”*” />

                        <RowDefinition Height=”*” />

                    </Grid.RowDefinitions>

                    <Button

                        Grid.Column=”0″

                        Grid.Row=”0″

                        Content=”Tap Me!”

                        HorizontalAlignment=”Stretch”

                        VerticalAlignment=”Stretch”

                        />

                </Grid>

At this point, you can fire up your application and see that your UI is in place. Just like earlier, press CTRL+F5 to compile and launch your application in the Windows Phone emulator. If you’ve done everything correctly, you’ll see a button in your emulator nested firmly in the top left corner.

You can tap the button by clicking it with your mouse, but nothing will happen. We’ll remedy that next by adding some event handling code.


Adding Event Handling

Go back to Visual Studio and make sure that you’ve got MainPage.xaml open in design/code mode. You need to add an event handling attribute to the button that you’ve created. Modify the button declaration, adding a ManipulationStarted attribute. Make sure you allow Visual Studio to create an event handling function for you. Your button markup should now look like this:

                <Button

                    Grid.Column=”0″

                    Grid.Row=”0″

                    Content=”Click Me!”

                    HorizontalAlignment=”Stretch”

                    VerticalAlignment=”Stretch”

                    ManipulationStarted=”Button_ManipulationStarted” />

Now, open the code behind file for MainPage.xaml. It is named MainPage.xaml.cs and you can find it in the Solution Explorer by clicking the arrow next to MainPage.xaml.

Inside of MainPage.xaml.cs you’ll see the event handler that Visual Studio created. Visual Studio has most likely named it Button_ManipulationStarted and, for the purposes of this application, that should be just fine. Change your function declaration to the following:

                private void Button_ManipulationStarted(object sender, ManipulationStartedEventArgs e)

                {

                    Button b = sender as Button;

                    int col = Grid.GetColumn(b);

                    int row = Grid.GetRow(b);

                    if (col == row)

                    {

                        Grid.SetColumn(b, ++col % 2);

                    }

                    else

                    {

                        Grid.SetRow(b, ++row % 2);

                    }

                }

The first thing this method does is create a new variable of type Button and assigns it a reference to the sender variable. This is important because Button derives from UIElement and the next few operations require a UIElement object as the parameter. Next, the method gets the current column and row index by using a static method of the Grid class. Finally, the method uses a simple algorithm to determine where to move the button and change the row or column index as appropriate. You know that if the row and column indices are the same, then the column needs to change. If the row and column indices are different then the row needs to changes. In either case you use another static method of the Grid class to set the button’s row or column. The appropriate index is determined using some simple math.

At this point, we’re done with the sample application. Press CTRL+F5 to compile and launch your application and then try clicking your button. You’ll see it move around the grid each time you click. Try using the emulator’s controls to change the phone’s orientation and you’ll see that the application adapts with no problems at all.

Here is a video which would help you understand more about WP7 development.

So Happy Programming on WP 7.

Regards

Akrati Gupta

 

Windows Phone 7

WINDOWS PHONE 7 also known as WP7.Windows Phone is a mobile operating system developed by Microsoft, and is the successor to its Windows Mobile platform, although incompatible with it. Unlike its predecessor, it is primarily aimed at the consumer market rather than the enterprise market. It was launched in Europe, Singapore, Australia, New Zealand, the US, Canada, Mexico, and the EPAL region in the second half of 2010, and Asia in early 2011. With Windows Phone, Microsoft offers a new user interface with its design language named Metro, integrates the operating system with third party and other Microsoft services, and controls the hardware it runs on.

Timeline of Windows Phone related events

The name ‘Windows Phone’ is a re branding of Microsoft’s old mobile OS called ‘Windows Mobile’. Before the official announcement of ‘Windows Phone 7’, Microsoft began to refer to devices running Windows Mobile as “Windows Phones”. Microsoft at first announced its new platform as “Windows Phone 7 Series” which initially came under criticism as being too wordy and difficult to say casually. Responding to this, on April 2, 2010 Microsoft announced that the “Series” would be dropped from the name, leaving the platform named Windows Phone 7. The official statement on the matter was:

“Customers want a simpler way to say and use the name consistently. The important thing is keeping the focus on the Windows Phone brand, which we introduced in October and will continue investing in through Windows Phone 7 and beyond.”

 

Features

  • User interface

Windows Phone features a new user interface, based upon Microsoft’s Windows Phone design system, codenamed Metro. Several features of Windows Phone are organized into “hubs“, which combine local and online content via Windows Phone’s integration with popular social networks such as Facebook, Windows Live, and Twitter. From the Hub, users can directly comment and ‘like’ on social network updates. The other built-in hubs are Music and Video (which integrates with Zune), Games (which integrates with Xbox Live), Windows Phone Marketplace, and Microsoft Office

Windows Phone uses multi-touch technology. The default Windows Phone user interface has a dark theme that prolongs battery life on OLED screens as fully black pixels don’t emit light.

  • Text input

Users input text by using an on-screen virtual keyboard, which has a dedicated key for inserting emoticons, and features spell checking and word prediction. Users may change a word after it has been typed by tapping the word, which will invoke a list of similar words. Pressing and holding certain keys will reveal similar characters. The keys are somewhat larger and spaced farther apart when in landscape mode. Phones may also be made with a hardware keyboard for text input.

  • Messaging

Windows Phone combined messaging through “threads”. Threads allow the Windows Phone user to engage with their contacts through Windows Live Messenger and Facebook Chat as well as traditional text messages. Text message can also be composed through voice recognition. Voice recognition allows speech to be converted to text message and also allows text message to be converted to speech which can be read aloud.

  • Web browser

Windows Phone 7.5 features a version of Internet Explorer Mobile with a rendering engine that is based on Internet Explorer 9.Internet Explorer on Windows Phone allows the user to maintain a list of favorite web pages and tiles linking to web pages on the Start screen. The browser supports up to 6 tabs, which can all load in parallel

  • Contacts

Contacts are organized via the “People hub“. Contacts can be manually entered into contacts or imported from Facebook, Windows Live Contacts, Twitter, and LinkedIn. A “What’s New” section show news feed and a “Pictures” section show pictures from those social networks made by the contacts. A “Me” section show the phone user’s own social networks status and wall, allow the user to update his status, and check-in to Bing and Facebook Places. Contacts can be added to the home screen by pinning them to the start. The contact’s “Live Tile” displays his social network status and profile picture on the homescreen and the contact’s hub displays his Facebook wall as well as all of the rest of his contact information and information from his other social networks.

  • E-mail

Windows Phone supports Hotmail, Exchange, Yahoo! Mail, and Gmail natively and supports many other services via the POP and IMAP protocols. For the native account types, contacts and calendars may be synced as well. Users can also search through their e-mail by searching in the subject, body, senders, and receivers. Emails are shown in threading view and multiple e-mail inboxes can be combined or kept separate.

  • Multimedia

Zune for Windows Phone is an application providing entertainment and synchronization capabilities between PC and Phone. Windows Phone multimedia experience is divided in to two distinct hubs, Music + Videos hub and Pictures hub, both of which are similar in appearance and functionality to that of the Zune HD.

The “Pictures hub” displays the user’s Facebook and Windows Live photo albums alongside photos taken with the phone’s camera. Users can also tag and upload photos to social networks and comment on online photos directly from the Pictures hub. Multi-touch gestures permit zooming in and out of photos.

  • Games

Xbox Live on Windows Phone provides some Xbox 360 features on Windows Phone devices by displaying the user’s avatar in a 3D fashion. Via “Games hub“, the users are able to interact with the avatar, view gamer score and leader boards, message Xbox Live friends, and Spotlight. Multiplayer (turn-based) gaming with live multiplayer is also released. Some key features of Xbox Live on Windows Phone include ability to be signed in simultaneously on the console and phone, send and receive messages between Console and Phone, unlock unique gamer points only available by purchasing the gaming title on the phone, etc.

  • Search

Microsoft’s hardware requirements stipulate that every Windows Phone must have a dedicated Search button on the front of the device that performs different actions. Pressing the search button while an application is open will allow users to search within applications that take advantage of this feature.

Windows Phone also has a voice recognition function, powered by TellMe, which allows the user to perform a Bing search, call contacts or launch applications by speaking. This can be activated by pressing and holding the phone’s Start button.

Bing is the default search engine on Windows Phone handsets due to its deep integration of functions into the OS (which also include the utilization of its map service for location-based searches and queries).

  • Office suite

 

Microsoft Office Mobile on Windows Phone

The “Office hub” organizes all Microsoft Office apps and documents. Microsoft Office Mobile provides interoperability between Windows Phone and the desktop version of Microsoft Office. Word Mobile, Excel Mobile, PowerPoint Mobile, OneNote Mobile, and SharePoint Workspace Mobile allow most Microsoft Office file formats to be viewed and edited directly on a Windows Phone device.

Microsoft Office files from SkyDrive and Office 365, as well as files stored locally on the phone, can be accessed through the Office Hub. Office files are sorted by tiles: Word documents (blue tile), Excel spreadsheets (green tile), PowerPoint presentations (red tile), and OneNote documents (purple tile).

  • Multitasking

In Windows Phone 7, multitasking is limited to bundled apps. Starting with Windows Phone 7.5, a card-based task switcher can be accessed by pressing and holding the back button. The screenshot of last five open app are shown as cards. Apps can be kept running even when out of view through “Live Agents”. In other cases, apps are suspended and can be quickly resumed.

  • Sync

Zune Software manages the contents on Windows Phone devices and Windows Phone can wirelessly sync with Zune Software. In addition to accessing on the Windows Phone devices, Zune software can also access the Zune Marketplace to purchase music, videos, and all apps for Windows Phone. While music and videos are both stored locally on the PC and on the phone, apps are only stored on the phone even if purchased from the Zune Software. Zune Software can also be used to update all Windows Phone devices. Although Zune Software is unavailable on Mac OS X operating system, Microsoft has released Windows Phone Connector which allow Windows Phone devices to sync with iTunes for Mac and iPhoto.

  • Advertising platform

Microsoft has also launched an advertising platform for the Windows Phone platform. Microsoft’s General Manager for Strategy and Business Development, Kostas Mallios, said that Windows Phone will be an “ad-serving machine”, pushing advertising and brand-related content to the user. The platform will feature advertising tiles near applications and toast notifications, which will bring updating advertising notifications. Mallios said that Windows Phone will be able to “preserve the brand experience by going directly from the web site right to the application”, and that Windows Phone “enables advertisers to connect with consumers over time”.Mallios continued: “you’re now able to push information as an advertiser, and stay in touch with your customer. It’s a dynamic relationship that is created and provides for an ongoing dialog with the consumer.”

 

  • Bluetooth

Windows Phone supports the following Bluetooth profiles:

  1. Advanced Audio Distribution Profile (A2DP 1.3)
  2. Audio/Video Remote Control Profile (AVRCP 1.0)
  3. Hands Free Profile (HFP 1.5)
  4. Headset Profile (HSP 1.1)
  5. Phone Book Access Profile (PBAP 1.0)

 

So I suppose now you must have got familiar with Windows Phone 7 OS. If you like to see which Handsets Supports the OS, just check out the Links section below the post to view the Handsets. Stay tuned as in my next post i would be discussing about WP 7 Development and some Hands on Lab for WP 7.

 

Links :-

Buy the Phone – http://www.microsoft.com/windowsphone/en-us/buy/7/default.aspx

ASP.NET MVC

The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model, the view, and the controller. The ASP.NET MVC framework provides an alternative to the ASP.NET Web Forms pattern for creating Web applications. The ASP.NET MVC framework is a lightweight, highly testable presentation framework that (as with Web Forms-based applications) is integrated with existing ASP.NET features, such as master pages and membership-based authentication. The MVC framework is defined in the System.Web.Mvc assembly.

MVC design pattern

MVC is a standard design pattern that many developers are familiar with. Some types of Web applications will benefit from the MVC framework. Others will continue to use the traditional ASP.NET application pattern that is based on Web Forms and postbacks. Other types of Web applications will combine the two approaches; neither approach excludes the other.

The MVC framework includes the following components:

  • Models. Model objects are the parts of the application that implement the logic for the application’s data domain. Often, model objects retrieve and store model state in a database. For example, a Product object might retrieve information from a database, operate on it, and then write updated information back to a Products table in a SQL Server database.

In small applications, the model is often a conceptual separation instead of a physical one. For example, if the application only reads a dataset and sends it to the view, the application does not have a physical model layer and associated classes. In that case, the dataset takes on the role of a model object.

  • Views. Views are the components that display the application’s user interface (UI). Typically, this UI is created from the model data. An example would be an edit view of a Products table that displays text boxes, drop-down lists, and check boxes based on the current state of a Product object.
  • Controllers. Controllers are the components that handle user interaction, work with the model, and ultimately select a view to render that displays UI. In an MVC application, the view only displays information; the controller handles and responds to user input and interaction. For example, the controller handles query-string values, and passes these values to the model, which in turn might use these values to query the database.

The MVC pattern helps you create applications that separate the different aspects of the application (input logic, business logic, and UI logic), while providing a loose coupling between these elements. The pattern specifies where each kind of logic should be located in the application. The UI logic belongs in the view. Input logic belongs in the controller. Business logic belongs in the model. This separation helps you manage complexity when you build an application, because it enables you to focus on one aspect of the implementation at a time. For example, you can focus on the view without depending on the business logic.

The loose coupling between the three main components of an MVC application also promotes parallel development. For example, one developer can work on the view, a second developer can work on the controller logic, and a third developer can focus on the business logic in the model.

Support for Test-Driven Development


In addition to managing complexity, the MVC pattern makes it easier to test applications than it is to test a Web Forms-based ASP.NET Web application. For example, in a Web Forms-based ASP.NET Web application, a single class is used both to display output and to respond to user input. Writing automated tests for Web Forms-based ASP.NET applications can be complex, because to test an individual page, you must instantiate the page class, all its child controls, and additional dependent classes in the application. Because so many classes are instantiated to run the page, it can be hard to write tests that focus exclusively on individual parts of the application. Tests for Web Forms-based ASP.NET applications can therefore be more difficult to implement than tests in an MVC application. Moreover, tests in a Web Forms-based ASP.NET application require a Web server. The MVC framework decouples the components and makes heavy use of interfaces, which makes it possible to test individual components in isolation from the rest of the framework.

 

When to Create an MVC Application


You must consider carefully whether to implement a Web application by using either the ASP.NET MVC framework or the ASP.NET Web Forms model. The MVC framework does not replace the Web Forms model; you can use either framework for Web applications. (If you have existing Web Forms-based applications, these continue to work exactly as they always have.)

Before you decide to use the MVC framework or the Web Forms model for a specific Web site, weigh the advantages of each approach.

 

Advantages of an MVC-Based Web Application

The ASP.NET MVC framework offers the following advantages:

  • It makes it easier to manage complexity by dividing an application into the model, the view, and the controller.
  • It does not use view state or server-based forms. This makes the MVC framework ideal for developers who want full control over the behavior of an application.
  • It uses a Front Controller pattern that processes Web application requests through a single controller. This enables you to design an application that supports a rich routing infrastructure. For more information, see Front Controller.
  • It provides better support for test-driven development (TDD).
  • It works well for Web applications that are supported by large teams of developers and for Web designers who need a high degree of control over the application behavior.

Advantages of a Web Forms-Based Web Application

The Web Forms-based framework offers the following advantages:

  • It supports an event model that preserves state over HTTP, which benefits line-of-business Web application development. The Web Forms-based application provides dozens of events that are supported in hundreds of server controls.
  • It uses a Page Controller pattern that adds functionality to individual pages. For more information, see Page Controller.
  • It uses view state on server-based forms, which can make managing state information easier.
  • It works well for small teams of Web developers and designers who want to take advantage of the large number of components available for rapid application development.
  • In general, it is less complex for application development, because the components (the Page class, controls, and so on) are tightly integrated and usually require less code than the MVC model.

Features of the ASP.NET MVC Framework


The ASP.NET MVC framework provides the following features:

  • Separation of application tasks (input logic, business logic, and UI logic), testability, and test-driven development (TDD). All core contracts in the MVC framework are interface-based and can be tested by using mock objects, which are simulated objects that imitate the behavior of actual objects in the application. You can unit-test the application without having to run the controllers in an ASP.NET process, which makes unit testing fast and flexible. You can use any unit-testing framework that is compatible with the .NET Framework.
  • An extensible and pluggable framework. The components of the ASP.NET MVC framework are designed so that they can be easily replaced or customized. You can plug in your own view engine, URL routing policy, action-method parameter serialization, and other components. The ASP.NET MVC framework also supports the use of Dependency Injection (DI) and Inversion of Control (IOC) container models. DI enables you to inject objects into a class, instead of relying on the class to create the object itself. IOC specifies that if an object requires another object, the first objects should get the second object from an outside source such as a configuration file. This makes testing easier.
  • Extensive support for ASP.NET routing, which is a powerful URL-mapping component that lets you build applications that have comprehensible and searchable URLs. URLs do not have to include file-name extensions, and are designed to support URL naming patterns that work well for search engine optimization (SEO) and representational state transfer (REST) addressing.
  • Support for using the markup in existing ASP.NET page (.aspx files), user control (.ascx files), and master page (.master files) markup files as view templates. You can use existing ASP.NET features with the ASP.NET MVC framework, such as nested master pages, in-line expressions (<%= %>), declarative server controls, templates, data-binding, localization, and so on.
  • Support for existing ASP.NET features. ASP.NET MVC lets you use features such as forms authentication and Windows authentication, URL authorization, membership and roles, output and data caching, session and profile state management, health monitoring, the configuration system, and the provider architecture.

 

By default you get MVC 2 in VS 2010 (All Versions)

To get MVC 3 you require Microsoft Web Platform Installer. Click  Here

Courtesy :- MSDN

Regards
Akrati Gupta