Saturday, December 12, 2009

WPF an Introduction


ShareThis
WPF is Microsoft's unified presentation subsystem for Windows and is
exposed through .NET Framework v3.0, Windows Vista's managed-code
programming model.

Windows Presentation Foundation (WPF) consists of a display engine that
takes full advantage of modern graphics hardware and an extensible set of
managed classes that development teams can use to create rich, visually
stunning applications. WPF also introduces Extensible Application Markup
Language (XAML), which enables developers and designers to use an XML-based
model to declaratively specify the desired user interface (UI) behavior.

Windows Presentation Foundation provides a unified approach to user
interface, 2D and 3D graphics, animation, documents and media. It allows
designers to be an integral part of the application development process.

Since the initial release of the .NET Framework, many applications have
been created using Windows Forms. Even with the arrival of WPF, some
applications will continue to use Windows Forms. For example, anything that
must run on systems where WPF isn't available, such as older versions of
Windows, will most likely choose Windows Forms for its user interface. New
applications might also choose Windows Forms over WPF for other reasons,
such as the broad set of controls available for Windows Forms.

Letting WPF applications use these existing controls can make sense in some
cases. Conversely, WPF offers many things that Windows Forms does not, such
as 3D graphics and animations. Allowing an existing Windows Forms
application to incorporate parts of WPF's functionality also makes sense.

Both of these things are possible. A WPF application can host Windows Forms
controls, and a Windows Forms application can host WPF controls. A user can
interact with WPF dialogs and Windows Forms dialogs in the same
application, typically without being aware that there's any difference.

To host Windows Forms controls, a WPF application relies on WPF's
WindowsFormsHost control. Similarly, a Windows Forms application uses
ElementHost, a Windows Forms control that's capable of hosting WPF
controls, panels, and other elements.

The tools for each technology can also work with software written for the
other. WPF's Visual Designer can be used to position Windows Forms
controls, while the Windows Forms designer can be used to position WPF
controls.

Using WPF and Windows Forms together does have some restrictions. Layering
a WPF control on top of a Windows Forms control won't work, for example;
the Windows Forms control will always be on top. WPF's transparency effects
also won't work well with Windows Forms controls, nor will WPF
transformations. And because the WindowsFormsHost and ElementHost controls
require full trust, a WPF application that uses them can't run as an XBAP.
Still, a large percentage of Windows applications can use both WPF and
Windows Forms to create their user interface.

This Text is an extract from this post written by Linda Liu.

Thursday, December 10, 2009

WPF, Webservices and Cross-Domain Issue


ShareThis
Today I faced an issue in a Silverlight web app.
While accessing a Web-service from Silverlight that was within the same Solution in the VS.

The error i got says like :

‘http://localhost:4522/MyService’. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. Please see the inner exception for more details.

By placing a Cross-Domain policy file at the root of the web app solved my problem.
I found a suitable solution that describes about the problem in details and a complete solution.


The crossdomain.xml looks like this:

Silverlight is interesting


ShareThis
During last couple of days I have started to work on Silverlight. From last year onwards many times I tried to start on Silverlight but could not due to time constraint. But I am enjoying it now.

Silverlight is interesting. Though Visual Studio has not up till now full support for designing Silverlight apps and you have to go back and forth to Expression Studio and VS but I liked it.

Today almost all of the work that Silverliht can do can also be done using Java Script and Ajax but there are few advantages of Silverlight, like its platform independent, cross-browser full support, consumes less resources on the browser side. That means it loads fast.

I have seen few web application completely built on Silverlight. No other things no AJAX . only html and Silverlight.


For developing Silverlight apps you only need to know WPF, its basic Class libraries and any of the dot net Compatible language - like C# or VB.net.

In the coming days I will share my learning curve and exploration in Silvetlight.

Enjoy programing !!!


Tuesday, November 17, 2009

What i am reading these days..


ShareThis
I have not posted an entry in my blog from a long time, SO thought to share what I am reading these days...

These days I am much interested in reading about the researches going around in the Computer Sciences.

Thease are the few links of the articles I have recent read:

Research Projects Gong on in MS Research Silicon Valley:


Bundling Features for Large Scale Partial-DuplicateWeb Image Search







Sunday, October 25, 2009

My Drawings


ShareThis

Monday, October 19, 2009

Add Speech recognition in your web pages


ShareThis
WAMI is a simple way to add speech recognition capabilities to any web page. Actually its a MIT research project.
I tried its working !. Further development is underway. One can try few live samples linked at homepage.

Read a tutorial here:



JQuery plugin to animates over distance instead of time.


ShareThis
Approach is a jQuery plugin that allows you to animate style properties based on the cursor’s proximity to an object. It works in a very similar manner to jQuery animate, however it animates over distance instead of time.


See a working sample and demonstration here:

GPS.net and Geographic Framework for .NET got Open Sourced


ShareThis
GPS.net and geoFramework got Open Sourced.
GPS.NET is a formerly commercial .NET component maintained by GeoFrameworks.

These two set of Open Sourced projects /code-base can accelerate your GPS / LBS development.

Check out these links



Sunday, October 11, 2009

Open Source, Java Script and PHP


ShareThis
I am fond of reading about new technologies and happenings in the software development world.
I am sharing about the new things I find on the web now and then...


Open Source:

Open Source is the buzz-word today ! Even Microsoft is going the "Open Source" way.
Microsoft has introduced full support for PHP in its Web Server Product called IIS. MS now help you install and configure PHP in your IIS by its Web Platform Installer.

Microsoft is promoting Open Source community and products on its site also.
Check out these Ope Source projects in PHP and Dot Net on Microsoft website.


Microsoft has earlier included JQuery (a open source Java Script Framework/ library)

In Dot net platform Open Source projects are increasing day by day.
Here are few Open Source projects developed in Dot Net platform:



Java Script

Java Script is really exciting, but was not earlier when there were no Java Script frameworks available out there.
JQuery has increased lot of interest of programers in JS.

Few useful JS frameworks, libraries and toolkits I have recently found are listed below:

I checked, its really awesome.

  • Check out this Java Script Tooltip Library that provides you very easy methods to bring up fully customizable tool-tips for any HTML element.

  • I found a good JS code snippet to show Client Side Time in the browser. Check it out here


PHP

  • Have you ever required to read from EXcel, PDF, HTML and other Data Sources in PHP ?
Try out this PHPExcel library for reading and writing data from Excel and otehr data files. You can create Excel2007 documents in PHP.
Check out all features here.


Will be righting again soon.

Good Java Script Libraray for Drag Drop & resize


ShareThis
Good Java Script Libraray for Drag Drop & resize

http://www.walterzorn.com/dragdrop/demos/demos.htm

Exciting JS Tooltip Libraray


ShareThis
Exciting JS Tooltip Libraray

Check out this exciting Java Script tool-tip library. There are a number of customization option.
Usage is very easy.



Free JQuery Animation library for ASP.net


ShareThis
Today I got a free JQuery Animation library for ASP.net

I tested, the performance is good with Intellisence support in Visual Studio.

Compatible versions for dot net F/W 2.0 and 3.5 are available. Although the help system is not woking corectly but one can acquaint with it soon.

Its worth a try.

Thursday, September 17, 2009

Web Security - A Report by Websense for first half of 2009


ShareThis
WebSense (websense.com) is a leading web security research company.
They have released report of web-security for the first 2 quarters of year 2009.
Its worth reading. Here is the summary:

Web Security
• Websense Security Labs identified a 233 percent growth in the number of malicious Web sites in the last six months
and a 671 percent growth during the last year.
• 77 percent of Web sites with malicious code are legitimate sites that have been compromised. This remains
unchanged from the last six-month period.
• 61 percent of the top 100 sites either hosted malicious content or contained a masked redirect to lure unsuspecting
victims from legitimate sites to malicious sites.
• 95 percent of user-generated comments to blogs, chat rooms and message boards are spam or malicious.
• 50 percent of Web pages linked to Web sites categorized as “Sex” also served malicious content.
• 69 percent of all Web pages with any objectionable content (e.g. Sex, Adult Content, Gambling, Drugs) also had at
least one malicious link.
• 78 percent of new Web pages discovered in the first half of 2009 with any objectionable content had at least one
malicious link.

Email Security
• 87.7 percent of email messages were spam. This represents a three percent increase over the last six months.
• 85.6 percent of all unwanted emails in circulation during this period contained links to spam sites and/or malicious
Web sites.
• Shopping remained the leading topic of spam (28 percent), followed closely by cosmetics (18.4 percent), medical
(11.9 percent) and education (9.5 percent). Education themed spam has nearly doubled over the previous period
and may be related to the recession as spammers seek to exploit people looking to gain new skills or obtain fake
qualifications to help their job prospects.

Data Security
• 37 percent of malicious Web/HTTP attacks included data-stealing code. This remains unchanged from the last
six-month period.
• 57 percent of data-stealing attacks are conducted over the Web. This number has stayed consistent over the
six-month period.

Read more here:




Few interesting facts:

More than 47 percent of the top 100 sites support user-generated content.
• Not surprisingly, sites that allow user-generated content comprise the majority of the top 50 most
active distributors of malicious content. Blog hosting sites that offer free hosting and good reputations
provide malware authors with the perfect combination to compromise unsuspecting users.
• 61 percent of the top 100 sites either hosted malicious content or contained a masked redirect to
lure unsuspecting victims from legitimate sites to malicious sites. In many cases these redirects
appeared as the actual Web site, when in fact the content served on that page was being hosted
elsewhere.
• Websense Defensio technology enabled Websense Security Labs to identify a significant and
alarming trend regarding the ease with which Web 2.0 sites can be compromised: 95 percent
of user generated comments

Microformats- the buzz word


ShareThis
Microformats are simple, open design patterns based on existing standards that you use to describe and add meaning to common web content, such as that about people, places, events and links. These structured data patterns allow machines like computers, user agents and applications to extract that content for a wide range of uses.

Sites already using microformats, includs Google, Yahoo!, Facebook, Twitter, Flickr, and LinkedIn. But these are just some of the more well-known names..

...How pervasive microformats are. For example, according to Yahoo! SearchMonkey, there are 1,450,000,000 web pages that publish hCard and 36,200,000 pages marked up with hCalendar.

Few good links to get set go:

Privacy guideliance from Microsoft


ShareThis

Privacy guideliance from Microsoft


This document provides basic criteria to consider when building privacy into software releases.

Ten Things You Must Do to Protect Privacy

  • Collect user data only if you have a compelling business and user value proposition. Collect data only if you can clearly explain the net benefit to the user. If you are hesitant to tell users what you plan to do, then don’t collect their data.

  • Collect the smallest amount of data for the shortest period of time. Collect personal data only if you absolutely must, and delete it as soon as possible. If there exists a need to retain personal data, ensure that there is business justification for the added cost and risk. Do not collect data for undefined future use.

  • Collect the least sensitive form of data. If you must collect data, collect it anonymously if possible. Collect personal data only if you are absolutely certain you need it. If you must include an ID, use one that has a short life span (for example, lasting a single session). Use less sensitive forms of data (for example, telephone area code rather than full phone number). Whenever possible, aggregate personal data from many individuals.

  • Provide a prominent notice and obtain explicit consent before transferring personal data from the user's computer. Before you transfer any personal data, you must tell the user what data will be transferred, how it will be used, and who will have access to it. Important aspects of the transfer must be visible to the user in the user interface.

  • Prevent unauthorized access to personal data. If you store or transfer personal data you must help protect it from unauthorized access, including blocking access to other users on the same system, using technologies that help protect data sent over the Internet, and limiting access to stored data.

  • Get parental consent before collecting and transferring a child's personal data. Special rules for interacting with children apply any time you know the user is a child (because you know the child’s age) or when the content is targeted at or attractive to a child.

  • Provide administrators with a way to prevent transfers. In an organization, the administrator must have the authority to say whether any data is transferred outside the organization's firewall. You must identify or provide a mechanism that allows the administrator to suppress such transfers. This control must supersede any user preferences.

  • Honor the terms that were in place when the data was originally collected. If your team decides to use data, its use must be subject to the disclosure terms that were presented to the user when it was collected.

  • Provide users access to their stored personal data. Users have a right to inspect the personal data you collect from them and correct it if it is inaccurate—especially contact information and preferences. You also need to ensure that the user is authenticated before he or she is allowed to inspect or change the information.

  • Respond promptly to user questions about privacy. Inevitably, some users will have questions about your practices. It is essential that you respond quickly to such concerns. Unanswered questions cause a loss of trust. Be sure a member of your staff is ready to respond whenever a user asks about a privacy issue.

Saturday, September 12, 2009

JSON is fun- JSON is for masses


ShareThis
JSON is fun- JSON is for masses
Really a interesting and great post / article on JSON

Tuesday, August 18, 2009

The geeks


ShareThis
HEIGHT OF ISOLATION:
Two persons sitting side by side using emails to communicate with each other.

HEIGHT OF COWARDICE:
Two persons fighting through emails.

HEIGHT OF HELPLESSNESS:
Receiving no emails for a week.

HEIGHT OF FRUSTRATION:
The email server being down.

HEIGHT OF CARELESSNESS:
Writing a love mail and doing a 'Send All.'

HEIGHT OF TIMEPASS:
A person sending email to himself

HEIGHT OF EXPECTATION:
Sending Indian cricket team an e-mail, wishing them to win a match

HEIGHT OF REPETITION:
Forwarding an email to someone and receiving the same email forwarded back to you By some one in the receiving chain.

HEIGHT OF BROWSING:
U r swimming in the water tank and shout 'F1 F1 F1 ' instead of shouting 'HELP' when u are unable to swim...

The Google reality and business model


ShareThis
I came to read really a god article. It's all about the Google business strategies and business model. It describes why Google is succeeding. There are many negative aspects associated with the Google business model. Really a beautiful article but author may be biased sometimes...
----

Galen Ward: Google is supposed to be an unbiased search engine, but they are hurting consumers by using their dominance to become a king maker for their own, increasingly inferior products.

Google's search results are the ultimate world flattener: a website that creates fantastic content where consumers can zoom past name brands and websites with enormous marketing budgets in the search results. In the post-Google world, traditional marketing is dead and content is king.

Startups can flourish -- growing on ideas and content alone instead of through expensive TV commercials.

But Google is eroding the meritocracy they helped create, and the search giant abuses its power when they promote their often inferior services outside or above search results.

From removing map options to aggressively inserting YouTube clips into search results, from giving websites with Google CheckOut special designations to pushing their mediocre real estate search, Google is using their ostensibly open, egalitarian system to aggressively promote their own in-house products.

And the more aggressively they do it, the more it hurts the startup ecosystem and consumers alike.

Some case studies:

Google Maps is a fantastic product that blew away techies and had no technical rivals when it launched. But no one used it.

When maps were included in the Google search results, they included links to the most popular mapping sites on the web - Yahoo Maps and MapQuest.

Just two years ago, MapQuest still had twice Google's traffic. Google shut them off and only Google maps links appeared in search results. Today Google Maps dominates.

Google maps is clearly a superior product. But unlike a lot of other superior products, it got outside-the-search-results treatment.

YouTube is another example. Until recently, other sites had vastly superior video quality and featured longer videos. While YouTube dominated the market for user submitted videos, Google pushed it overly aggressively in search results.

Google Checkout offers more evidence.

Checkout solves a problem that consumers never had: it lets you give Google your credit card and shipping information and confusingly lets you then instruct Google (a search engine?) to pay for stuff at participating online stores, instead of just typing in your credit card number. After trying to win market share by paying consumers to sign up, it withered.

So Google inserted an ever-growing icon next to advertisers who accepted Google Checkout (the only icon allowed in paid search results).

As with Microsoft (see: Active Desktop, MS Bob), even Google's monopoly couldn't guarantee success on initiatives that no one actually wants: Paypal is growing at a faster rate than checkout.

And then there's Google Real Estate.

Google has had real estate search for a couple of years now (and they've pushed it at the top of the search results). But with the recent update, they've introduced another special "Google Box" above search and paid results on Google Maps.

Google real estate is the king of inferior products. It has around 50 percent of the homes for sale at any given time. Some of the data is out of date. And they pass you off to random sites to get details about any given house. (Disclaimer: I know a lot about this because it competes directly with the company I founded, Estately).

So why should you give a shit?

Even the antitrust suit against Microsoft was "misguided," right? Wrong.

Without the fear of another DOJ suit, Microsoft would have snuffed Google out faster than you can say "Netscape." And Google can snuff out competitors with their dominance too.

But like Microsoft in the 90s, Google's dominance hurts competition and consumers in a less obvious, but much more significant way.

It makes it hard for startups to make long-term investments in areas of the web that Google may one day tackle: Google can kill a comparable or superior product overnight (or nearly cut traffic in half) through otherwise unattainable and unbuyable search results.

And Google doesn't have to win every battle to hurt consumers. It only takes a veiled threat of Google entering a market (Microsoft's infamous "vaporware") to give entrepreneurs pause.

Google says that "competition is a click away," but that response is very similar to Microsoft's old stance on browser competition - "A new browser is only two clicks away."

I'm not sure what the best solution is.

Google is innovative and any court-ordered limitation on cross-promoting Google products would probably leave consumers worse-off.

But (sorry Microsoft) out-innovating Google probably won't either. As with Windows, Google search is so familiar and trusted that consumers won't switch for comparable or slightly better results from somewhere else.

Galen Ward is co-founder of Estately, an online real estate search company based in Seattle. Opinions expressed in guest posts are those of their authors, and don't necessarily reflect the views of TechFlash or its staff.

Tuesday, August 4, 2009

You Must Obey: The Unwritten Laws of Technology


ShareThis
"Fix a computer for a friend or family member, and you'll be tech support for life."

For every fix that a Windows Update patches, the update will break two more things on your PC.

he likelihood that Windows will automatically install time-sucking critical updates is directly proportional to your need to get your PC started.

The hard drive always fails just before you were going to back it up

Your data will get corrupted just before you plug in your new backup external drive

The number of USB ports on your Mac will always be one less than you need at any given time.

If you close the PC case with screws before testing, it won't work; If you test before closing, it will.

Read some more interesting laws here.

Friday, January 9, 2009

Getting Query-String Values From Javascript


ShareThis

script type="text/javascript">
function GetQueryStrValFor(key)
{
var retVal="";
var query = window.location.search.substring(1);
var parms = query.split('&');
for(var i=0 to parms.length)

{ var pos = parms[i].indexOf('=');
if (pos > 0)
{
if(key==parms[i].substring(0,pos))
{
retVal= parms[i].substring(pos+1);
}
}
}
return
retVal;
}

script>