Tech News is a blog created by Wasim Akhtar to deliver Technical news with the latest and greatest in the world of technology. We provide content in the form of articles, videos, and product reviews.
America’s businesses are growing. The web is helping.
Over in New York, Roberto Gil designs and builds children’s furniture—loft beds, bunk beds and entire custom rooms. Casa Kids’ furniture is custom designed for the family to grow along with the child. Roberto works out of his Brooklyn workshop and doesn’t sell to large furniture stores, which means the Casa Kids website is an essential tool for him to connect with potential customers. To grow even further, Roberto began using AdWords in 2010. In the first few months traffic to his site went up 30 percent. Today, two-thirds of his new customers come from Google. Meet Roberto and learn more about how he’s making the web work for Casa Kids:
These are just two examples of how the web is working for American businesses. According to a McKinsey study, small businesses that make use of the web are growing twice as fast as those that aren’t on the web. That’s because the web is where we go for information and inspiration—from math games to practice over the summer to someone to design and build that perfect bunk bed for your kids. Ninety-seven percent of American Internet users look online for local products and services. Whether we’re on our smartphones, tablets or computers, the web helps us find what we’re looking for.
Here at Google, we see firsthand how the web is helping American businesses grow and thrive. Through our search and advertising programs, businesses like Casa Kids find customers, publishers like Hooda Math earn money from their content, and nonprofits solicit donations and volunteers. These tools are how we make money, and they’re how millions of other U.S. businesses do, too.
In 2012, Google's search and advertising tools helped provide $94 billion of economic activity for more than 1.9 million American businesses—advertisers, publishers and nonprofits. This represents a 17 percent increase from 2011. Check out the impact made in each state, along with stories of local businesses using the web to grow.
Whether it’s building skills or building furniture, Google helps to build businesses. We’re thrilled to be part of such a vibrant industry and are committed to continuing to help make the web work for people and businesses everywhere.
Posted by Allan Thygesen, Vice President, Global SMB Sales
via The Official Google Blog http://googleblog.blogspot.com/2013/06/americas-businesses-are-growing-web-is.html
AngularJS: Introduction and Hello World example
AngularJS, a JavaScript framework developed by a Googler and supported by Google has became quite a buzz word in past few months. More and more developers are using it and thus the community has grown significantly. Not only they love it, but they cant stop praising it
The reason is very simple. AngularJS rocks \m/ !!
If you come from a jQuery background and try to learn Angular, you would be amazed by this framework. How much you can do with few lines of code in Angular is mind boggling. We remember jQuery did the same when it was first released back in 2006. Developers used to write hundreds if not thousands of lines of code in pure javascript just to make the damn works with different browsers. jQuery changed that paradigm with selectors, custom events, animations etc.
But as web grew, so did the web technologies. Browsers are faster and faster day by day. It just dint make any sense to render a full HTML page on server side as browser can do the same. With Ajax picking up the pace it makes more sense to render UI of webapp dynamically. A new wave of Single Page Applications (SPA) started which lead to development of many front-end frameworks like Backbone, Knockout, Ember, Angular.
Coming back to AngularJS, I wanted to start a series of articles which describe Angular in plain vanilla fashion. Any one with basic Javascript, HTML background can start working in AngularJS without any hassle.
Let us dive into the world of AngularJS and see what it is.
Introduction to AngularJS
AngularJS as it says is a Superheroic JavaScript MVW framework. It assists with running single-page applications. Its goal is to augment browser-based applications with model–view–controller (MVC) capability, in an effort to make both development and testing easier.
AngularJS takes declarative programming to whole new level. It adapts and extends traditional HTML to better serve dynamic content through two-way data-binding that allows for the automatic synchronization of models and views.
MVW – Model View Whatever
There are many software architecture pattern which separates the representation of information from the user’s interaction with it. The central ideas behind these patterns are code reusability and separation of concerns. The most famous pattern that is used widely today is MVC or Model-View-Controller. Similar to MVC, there is another pattern called MVP or Model-View-Presenter. The MVP is based on MVC and the presenter assumes the functionality of the “middle-man” (played by the controller in MVC). In MVP, all presentation logic is pushed to the presenter. Eventually, the model becomes strictly a domain model. And then there are other patterns such as MVVM or Model-View-View-Model.
Angular doesn’t care actually what software architecture pattern you want to use in your app. And thus the pattern MVW or Model-View-Whatever. A basic concept of MVW is that all definitions are associated with a named Module. Modules can then be aggregated to form complete web applications. Modules can depend on one another, so that including a single Module in your WebApplication may bring along additional functionality on which that Module depends. Angular JS provides you with rich set of APIs to define these modules and linked them together with dependency injection. We will see this in great detail in next few articles.
Hello World, AngularJS
Before we get into any theory, let us get our hands dirty with some actual Angular code. That way would learn a great deal of whats happening.
In order to write a hello world application in Angular, all we have to do is it include Angular JS javascript in our HTML document.
<script type="text/javascript"
src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
And that’s pretty much it. Now define your HTML page like below.
<!DOCTYPE html>
<html ng-app>
<head>
<title>Hello World, AngularJS - ViralPatel.net</title>
<script type="text/javascript"
src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
</head>
<body>
Write some text in textbox:
<input type="text" ng-model="sometext" />
<h1>Hello {{ sometext }}</h1>
</body>
</html>
Online Demo
If you want to change and play around with code use this JSFiddle: http://jsfiddle.net/viralpatel/vFcZ7/
Just write some text in above demo and see how the value after “Hello” changes.
Note that we didn’t write a single line of JavaScript and still this example works like a charm! Let us go through the demo step by step. There are some Angular related tags we put in our HTML document.
ng-app
First thing that we notice is an attribute ng-app within <html> tag. This attribute tells the Angular to be active in this portion of the page. So in our case entire document. If you want to enable Angular only at specific location in your webpage then you can define ng-app attribute to any DIV or other tag.
ng-model and Two way data binding
We define attribute ng-model in textbox as ng-model=”sometext”. ng-model binds the state of textbox with model value. In our case we define a model sometext. This model value is bound with the value of textbox using ng-model attribute. Thus when the textbox value changes, Angular automatically changes the model sometext with this value. This is called Two way data binding. Similarly, if we change the model value than Angular will change the value of textbox. Two way data binding is the core of Angular’s magical spell. It just works. You’ll get to know about it more once we start adding complexity in our application.
AngularJS two-way data binding is its most notable feature and reduces the amount of code written by relieving the server backend from templating responsibilities.
{{ sometext }}
Note how we wrap our model value in double curly braces. This tell Angular to bind the value of model sometext in place of {{ sometext }}.
Thus any change in sometext model value changes the text inside <h1> tag.
ng-show / ng-hide
Now lets further modify our demo and add one more Angular attribute ng-show. In below code, we added attribute ng-show=”sometext” to <h1> tag.
<script type="text/javascript"
src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
And that’s pretty much it. Now define your HTML page like below.
<!DOCTYPE html>
<html ng-app>
<head>
<title>Hello World, AngularJS - ViralPatel.net</title>
<script type="text/javascript"
src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
</head>
<body>
Write some text in textbox:
<input type="text" ng-model="sometext" />
<h1 ng-show="sometext">Hello {{ sometext }}</h1>
</body>
</html>
Online Demo
If you want to change and play around with code use this JSFiddle: http://jsfiddle.net/viralpatel/ppgsS/
In this demo, the text Hello does not appear unless we type anything in textbox. We added just one small attribute to <H1> tag and see how the functionality changed!.
ng-show attribute conditionally show an element, depending on the value of a boolean expression. Similar to ng-show you can also use ng-hide, which exactly does opposite of ng-show.
Note that until now we have not written any JavaScript code at all. Still our application became so dynamic.
AngularJS Filters
AngularJS provides powerful mechanism to modify the data on the go using Filters. Filters typically transform the data to a new data type, formatting the data in the process. The general syntax for using filter is:
{{ expression | filter }}
You can use more than filter on an expression by chaining them like:
{{ expression | filter1 | filter2 }}
AngularJS by default provide few filters that we can use in our app. It is also possible to define your own custom filters. For now we will just check filters that Angular provide with framework.
Filter uppercase and lowercase
As its name suggest, this filter convert the expression into uppercase letters. Lets check a quick demo. Lets modify few lines from our above example and use uppercase filter.
<!DOCTYPE html>
<html ng-app>
<head>
<title>Hello World, AngularJS - ViralPatel.net</title>
<script type="text/javascript"
src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
</head>
<body>
Write some text in textbox:
<input type="text" ng-model="sometext" />
<h1>Hello {{ sometext }}</h1>
<h4>Uppercase: {{ sometext | uppercase }}</h4>
<h4>Lowercase: {{ sometext | lowercase }}</h4>
</body>
</html>
Online Demo
If you want to change and play around with code use this JSFiddle: http://jsfiddle.net/viralpatel/nZ5sH/
Notice when you type in the textbox, the value is converted to upper and lower case depending on the filter we used.
Similarly, Angular provides some more filters like:
date
Usage:
{{ date_expression | date[:format] }}
Formats date to a string based on the requested format. Read Angular documentation to know more about format.
number
Usage:
{{ number_expression | number[:fractionSize] }}
Formats a number as text. If the input is not a number an empty string is returned.
There are more filters like json, limitTo, filter, orderBy. We will go through them in next few articles as and when we use them. For now you can refer to Filter documentation for more details.
That’s All Folks
We have just scratched the surface of a big ocean. AngularJS offers so much more that we can only touch different aspects once we actually start using it.
In this tutorial we went through an introduction of AngularJS and also learned how to set it up in any webapplication. Also we saw different angular attributes like ng-app, ng-model, ng-show etc and their usage. Then we checked filters in angular. We saw few basic filters like uppercase, lowercase.
Stay tuned for next tutorial where we will see everything about AngularJS Controllers and $scope. I hope you like the series of tutorials on AngularJS.
Related Posts
- Setting opacity of html element using Javascript
- Sum HTML Textbox Values using jQuery / JavaScript
- Introduction to DOJO Toolkit
- jQuery AJAX Tutorial, Example: Simplify Ajax development with jQuery
- Default Text Label in Textbox using JavaScript/jQuery
- Introduction to Google Maps.
- Drag and Drop Example using jQuery JavaScript in HTML
via ViralPatel.net http://feedproxy.google.com/~r/viralpatelnet/~3/OaMjHI1a1Wk/
Microsoft Drop Policies for Xbox One Games
Microsoft has confimed reports that it’s doing a U-turn on its policies surrounding used Xbox games and the “always on” feature of the device. This follows gamers’ anger at the restrictions imposed.
In an official blog post today Don Mattrick, Interactive President of Microsoft, said “Today I am announcing the following changes to Xbox One and how you can play, share, lend, and resell your games exactly as you do today on Xbox 360″. Mr Mattrick said the company had “heard loud and clear” from its customers.
Gamers were angry at Microsoft’s policies
He continued by saying that an internet connection will no longer be required to play offline Xbox One games. A one-time connection is all that is required to setup a new Xbox One, after that gamers can play any disc-based game without going online again.
Trade-Ins
Microsoft are also doing away with their policy to ban certain types of trade-ins of disc-based games.
“There will be no limitations to using and sharing games, it will work just as it does today on Xbox 360,” he wrote.
Originally, Microsoft set up the Xbox One to have a one-time lending policy for disc-based games, that would only be possible if the recipient was a friend on Xbox live for more than 30 days.
This change in policy only applies to disc-based games though and cannot be applied to downloaded titles ,which can’t be shared or resold.
Microsoft has also lifted regional restrictions. They had intended to region-lock games but this would have put importers and travellers outside the Xbox One supported countries.
There is a down-side to all of this though. Microsoft were planning to allow allow customers to trade downloaded games online in exchange for money off new titles but with these new policies in place, that will no longer happen.
Mattrick noted in his blog that consumers like the flexibility they have with disc-based games,along with the freedom to play offline, for any length of time, anywhere in the world.
“Since unveiling our plans for Xbox One, my team and I have heard directly from many of you, read your comments and listened to your feedback. I would like to take the opportunity today to thank you for your assistance in helping us to reshape the future of Xbox One.”
No dount Microsoft felt increased pressure with Sony releasing the PlayStation 4, which is not only slightly cheaper but also does not impose any new restrictions on the use of PS4 game discs.
[Image via plusxp]
SOURCE: http://www.bbc.co.uk/news/technology-22980973
The post Microsoft Drop Policies for Xbox One Games appeared first on TechBeat.
via TechBeat http://techbeat.com/2013/06/microsoft-drop-policies-for-xbox-one-games/?utm_source=rss&utm_medium=rss&utm_campaign=microsoft-drop-policies-for-xbox-one-games
Windows 11 Insider Preview Build 29558.1000 Released to New Canary Channel
UPDATE: Windows 11 Insider Preview build 29558.1000 released to the new Canary channel. Windows Insiders on the refreshed Canary Channel wil...
-
UPDATE: Direct download links added for the latest Mozilla Firefox 131.0.2, 115.16.1 ESR and 128.3.1 ESR offline installers. NOTE: The downl...
-
Newer versions of Windows 11 come with a new security feature called “Windows Protected Print Mode (WPP)“. This article will help you in act...