Wednesday, June 9, 2010

Understanding JSON:

What does it stand for?
JavaScript Object Notation.

And what does that mean?

JSON is a syntax for passing around objects that contain name/value pairs, arrays and other objects.

Here's a example of JSON:



and we will compare this by a XML so this will loo like this



and if you want to access these values as a object form

var result = (Country.State[0].name)
so by this we will get the result "U.P"


quiggles, Squares, Colons and Commas

1. Squiggly brackets act as 'containers'
2. Square brackets holds arrays
3. Names and values are separated by a colon.
4. Array elements are separated by commas

Comparison with an array object

Object literals are created with curly brackets:

var Beatles = {
"Country" : "England",
"YearFormed" : 1959,
"Style" : "Rock'n'Roll"
}

This is the equivalent of:

var Beatles = new Object();
Beatles.Country = "England";
Beatles.YearFormed = 1959;
Beatles.Style = "Rock'n'Roll";

Tuesday, June 8, 2010

Google Custom Search

Now Google is providing the code and API for the custom search.

http://code.google.com/apis/customsearch/docs/ui.html

you can use this this API after changing little bit as per your requirement.

Monday, May 31, 2010

Tools and Utilities for the .NET Developer

Please follow this link..

http://geekswithblogs.net/mbcrump/archive/2010/05/25/tools-and-utilities-for-the-.net-developer.aspx

Sunday, May 23, 2010

Implementation of MVC



This is new and effective design pattern for designing the Code structure.
This is defining my these three type
1.Model
2.View
3.Controller

MODEL: Model is responsible for data processing, like database connection, querying database, implementing business rules and other resposibilities related to the database.Model responds to the request made by controllers and notifies the registered views to update their display with new data.




VIEW: View basically related to the logical part of the structure this will having the logic of processing the data from the contoller ---> Model and after that processing the data from the Model --> Controller.



CONTROLLER:
Controller is responsible for Notice of action. Controller responds to the mouse or keyboard input to command model and view to change. Controllers are associated with views. User interaction triggers the events to change the model, which in turn calls some methods of model to update its state to notify other registered views to refresh their display.

Benefits:
#Since MVC handles the multiple views using the same enterprise model it is easier to maintain, test and upgrade the multiple system.
#It will be easier to add new clients just by adding their views and controllers.
#It is possible to have development process in parallel for model, view and controller.
Drawbacks:
#Requires high skilled experienced professionals who can identify the requirements
#It requires the significant amount of time to analyze and design.

Tuesday, May 11, 2010

New feature in .NET 4.0 called the Task Parallel Library

A new feature in .NET 4.0 called the Task Parallel Library. With this library, it is much easier to write code in a managed language that makes use of multiple cores where available. This gives us the option to write code as parallel tasks that are run concurrently across available processors; generally resulting in significantly speeded up code.



using System;
using System.Threading.Tasks;

namespace ParallelForSample
{
public class Multi
{
public static void Calculate(int val)
{
Utility util = new Utility();
util.Start();

int[,] G = new int[val, val];

Parallel.For(0, val,
delegate(int k)
{
Parallel.For(0, val, delegate(int i)
{
for (int j = 0; j < val; j++)
G[i, j] = Math.Min(G[i, j], G[i, k] + G[k, j]);
});
}
);

util.Stop();
}
}
}

Wednesday, February 24, 2010

" Slip Don’t Fall "

One of the most important things to know on your journey to success is that you will occasionally slip up. It’s how you respond to these slip ups that will determine if and when you achieve your goals.


Even the most disciplined, motivated people in the world have days when they don’t take action and don’t follow through. The difference between those who succeed and those who fail is that successful people slip but they don’t fall.


Here’s a graph that shows how successful people progress towards achieving a goal:




As you can see from this graph, successful people DO slip up, but they always recover quickly. Compare this with the graph of people who fail:




Instead of recovering after a slip up, an unsuccessful person allows a slip to become a Fall.


Option 1: You can start thinking negative thoughts and criticizing yourself by saying things like, "I don’t have any will power" or "I’m just hopeless – I never follow through".

This is the approach of those who fail. Self criticism leads them into a downward spiral that inevitably ends in failure.

OR

Option 2: You can accept that you slipped up and simply say:

"OK, I slipped, but I will not fall!"

When you take this approach, you quickly overcome your slip up and get back on track towards achieving your goals.

So today, I’d like to encourage you to change your approach to dealing with slip ups. Instead of criticizing yourself, just accept the situation and make the decision that even when you slip, you will get back on track quickly and will not allow a slip to become a fall.

Until Next Time,

Dare To Dream

Monday, February 15, 2010

Create an iPhone Web App

This is where iWebKit comes in. iWebKit is a free framework package for creating websites and applications that are optimized for the iPod Touch, iPhone & iPad. The bulk of the framework is CSS3 which can work its magic to makeover any dreadful site and make it look fresh.

When designing for the iPhone OS, you should use the iPhone simulator available in the SDK to get an idea of where your design is heading. You can also use Safari to get a pretty close representation, but nothing beats using a real physical device. It’s amazing how cool it feels and you really do get the impression it’s a native application.

you can also follow the this link...good article..
http://theappleblog.com/2010/02/12/how-to-create-an-iphone-web-app/