Tuesday, July 8, 2008

Creating application using ExtJs

Ext Js

Ext js is a cross browser JavaScript library for building rich internet application. You can build a high performance user interface with easy to use API. Its object-oriented design patterns influence the relationship and interactions between objects

Creating a application using Ext 2.0

While creating a application there should always be a directory structure. There is a Document Root directory in the server and all other folder relative to it.

Recommended directory structure

./CSS (optionally link)

./ext (link)

./img (link)

./js

Index.html

Link means a link pointing to a real directory where files are stored.

The advantage is that if you have new version of ext or some other files you have to change just the link to point there without changing anything in your application.

  • css will hold all stylesheets.
  • ext link to Ext JS Library tree.
  • img link to your images. It can contain icons subdirectory as well.
  • js will hold all javascript files the application is composed of.
  • index.html HTML file that is an entry point of your application. You can have different name for this file but there is one application entry point/file.
  • optionally you can create a directory or a link for your server side part of the application (like if you are using aspx file it may be ./aspx)

index.html

index.html should link defined in the head sestion for following css and javascript file


./ext/resources/css/ext-all.css

./css/application.css

./ext/adapter/ext/ext-Base.js

./ext/ext-all-debug.js

./application.js

Index.html has all the link defined for css file and javascript file that is required to built a ext application.

ext-all-debug.js include the entire Ext framework. Use ext-all-debug.js for development and ext-all.js for production purpose.

Js/application.js

Ext.BLANK_IMAGE_URL = './ext/resources/images/default/s.gif';

Ext.ns('Application');

// application main entry point

Ext.onReady(function() {

//code here

});

  • Ext.BLANK_IMAGE_URL point to a image file that is used by Ext as an image hoder and if it point to invalid location you can get various rendering problem.
  • You may also need to create a new global object variable for your application (here it is Application).
  • Ext.onReady is the main application point. The place where you write your code for application.

css/application.css

This file will contain all css stylesheet.

Using Pre-configured classes

The best approach to write a Ext application is to write extension classes of Ext component that have all configuration option.You have to just pass the configuration object for that.

An example for creating a panel to be used as an application window.

//application.js

var win = new Ext.Window({

title:'Personnel'

,widht:600

,height:400

,items:{xtype:'personnelgrid'}

});

win.show();

Organizing pre-configured calsses

The above code create a javascript object .It should be written in a seprate file(/js/filename.js) and included in index.html as

Production system

For production purpose you do not require debug version of Ext library.

Include

  • ext-all.js
  • app-all.js and
  • application.js (your javascript file application code)

Grid pane demo using ExtJs

Files that has been used from ExtJs site for creating demo

· Js/ext-all.js

· Js/ext-base.js

· Css/ext-all.css

  • Div which contain the grid is defined in css file ext-all.css in downloaded folder from ExtJS web site .

Creating a ExtJs Grid Demo

Steps and method that to create Grid Demo define in js/Paging.js are following:

1. First we need to create a Datastore from which the grid is attached and access the record.Datastore fetch record from XML orJson source.

Datastore is created using method

Var objectDataSore = new Ext.data.Store();

In this method specify

1.url of the file to connect to database.

2.Json or XML source.

3.Other things like sorting etc.

2. Define a columnmodel(Information about grid column).Columnmodel method define the column structure for the grid.

Columnmodel can de define as


Var objectColumnmodel=new Ext.grid.columnmodel()


3.Pass the grid Datastore and columnmodel.

var grid = new Ext.grid.GridPanel({

                       ds: objectDataSore,
                       cm: objectColumnmodel
 
        });

We can also define the columnmodel while creating object of Grid Panel instead of defining in column model.

4. Render the Grid


Grid.render();


5.Load in the data from our data store

objectDataSore.load();


Source code for HTMl file: index.html

Source code for javascript file: application.js

Source code for aspx file: dbaccess.aspx


Monday, July 7, 2008

Furled pages for topic firefox

For searching each of following topics i have spend a lot. Y need almost all to these if you really love working on Firefox ( I do love)

Friday, July 4, 2008

What is most important in website development???

Methodology is an Important Website Development Requirement


Web development is a comparatively newer practice in a place where industries have been around for decades at a go. Considering the young age of the industry, Website development has gone a great distance already and is set to move further ahead in a short span of time. This industry has grown on tried and tested techniques. Web site development teams across the globe have evolved by trying different and unique things every time which could be beneficial to its growth.

The most important thing in website development is to follow a set methodology. It is quite difficult to find a perfect methodology which would fit your website requirements. But once you have acquired the same, consider your task made easier. It then becomes pretty simple to create a website. Here we shall be discussing a few things that need to be kept in mind while building

The most essential factor in website development is time management. Most web developers face the time challenge in their projects. This could be for various reasons, either the client does not like the idea, or the idea has changed while it was being developed, or even because the team is taking time to crack a difficult code. These frequent diversions caused a lot of problem to the project that did not only go over time but also over budget. The solution to such things was just finding out a way of doing things better.

This brings us back to the requirement of a methodology. You can either create your own methodology for website creation by investing in a little bit of research work, or you could try adapting or adopting existing methodologies. It is always better to build up your own methodology which would fit the bill of being cost effective, less complex in understanding, concise so that it can be easily referred to when required. Building up an in-house methodology will make it less prone to risks which could prove dangerous to the project.

Building one's own website creation methodology saves a lot of time which we spend in understanding the methodology that are already existing. This makes it more difficult to tedious a procedure. The presentations which the ready made website development methodology produces are generally confusing and make things more difficult than what they generally are.

Hence, in order to deliver website development services on time, it is advised that all web developers prepare their own methodology after a good R& D and save it for long run.

Tuesday, July 1, 2008

Google Adwords Advantages

Few reason on why anyone should opt for Google Adwords...

AdWords Advantages

Google AdWords aims to provide the most effective advertising available for businesses of any size. We pledge to help you meet your customer acquisition needs by enabling you to:

* Reach people looking for your product or service
* Fully control your ad budget
* Easily create and edit your ads
* See your ads on Google within minutes of creating them

AdWords gives you 24/7 access to detailed performance reports that help you track the effectiveness of your ad campaigns. We also strive to give you the friendliest, most knowledgeable customer service possible. You can expect a prompt response to your email questions, typically within one business day. Read on to learn about what AdWords has to offer you.

1. Control

With all the great features listed below, a Google AdWords account is fully customizable for any advertiser.

* Cost-per-click (CPC) pricing, so you pay only for the clicks you've received at a price you've set (choose a maximum CPC from 1 cent USD to US$100).
* Cost-per-impression (CPM) pricing for those who prefer to target individual content sites and pay by the impression.
* Daily budget you set, starting from 1 cent USD.
* Targeted ads you create and manage.
* Ad scheduling: run your ads on the days and hours you want.
* Performance reports 24/7 online in your account.
* Advertising network of sites and products for increased ad exposure.
* One or multiple ads targeted with one or more keywords.

And with no monthly minimum spending limit or time commitment and only a minimal fee to set up your account, Google AdWords is the ideal marketing tool for small to medium businesses.

2. Success

The success of our advertising program is built upon the success of our advertisers. So, we want to do everything it can to help you get more out of your ads and attract qualified prospects in the most cost-effective manner possible. Provide you with cost estimations and tools to help you control pricing. In addition, we're committed to sharing with you what makes AdWords advertising work by keeping you up-to-date with the latest Google AdWords features.

3. Support

A Help Center to make sure you benefit from the tools we provide and the flexibility of controlling your own account. You'll find the Help Center filled with useful program information, performance tips, and step-by-step instructions for creating and maintaining your account.

Monday, June 30, 2008

.NET Language Integrated Query (LINQ)

The next big challenge in programming technology is to reduce the complexity of accessing and integrating information from relational databases and XML.

Rather than adding relational or XML-specific features to our programming languages at runtime, we can take a more general approach and could add general purpose query facilities to the .NET Framework that apply to all sources of information, not just relational or XML data. This facility is called .NET Language Integrated Query (LINQ).

.NET Language Integrated Query defines a set of general purpose standard query operators that allow traversal, filter, and projection operations to be expressed in a direct yet declarative way in any .NET-based programming language. The standard query operators allow queries to be applied to any IEnumerable-based information source.

The extensibility of the query architecture is that it can be used to provide implementations that work over both XML and SQL data. The query operators over XML (XLinq) use an efficient, easy-to-use in-memory XML facility to provide XPath/XQuery functionality in the host programming language. The query operators over relational data (DLinq) build on the integration of SQL-based schema definitions into the CLR type system.

LINQ is built entirely on general purpose language features, some of which are new to C# 3.0 and Visual Basic 9.0. Each of these features has utility of its own, yet collectively these features provide an extensible way to define queries and queryable API’s.

In general, the developer is free to use named methods, anonymous methods, or lambda expressions with query operators. Lambda expressions have the advantage of providing the most direct and compact syntax for authoring. More importantly, lambda expressions can be compiled as either code or data, which allows lambda expressions to be processed at runtime by optimizers, translators, and evaluators.

Note: Lambda expressions are similar to CLR delegates and must adhere to a method signature defined by a delegate type.

eg for Lamda:

IEnumerable<string> expr = from s in names

where s.Length == 5

orderby s

select s.ToUpper();

The code written above is equivalent to this lamda expression:

Eg IEnumerable<string> expr = names

.Where(s => s.Length ==5)

.OrderBy(s => s)

.Select(s => s.ToUpper());

Wednesday, June 25, 2008

Web 2.0 T shirts!!

Web 2.0 T -Shirts......!!!! what next..???.This is amazing....Guys check this out

I’m as guilty as everyone else. I’ve tasted the artificial fruit flavor of the Web 2.0 Kool-Aid and I loved it. I’ve evangelized every new service and site into oblivion. I’ve knowingly touted a service which I knew had no lasting power in this world of tech start-ups. I’ve been thoroughly tempted by the snake of the Internet garden of knowledge and taken a bite out of the Web 2.0 apple.

When tech observer and PR visionary Steve Rubel wrote an article back last fall titled “The Web 2.0 is Skunk Drunk on Its Own Kool-Aid“, I doubt he knew how much of an impact it would have on tech culture. How much of a lasting shock wave it would cast through the world of the new tech evangelism movement. In fact, the article had so much of an influence that there is now a T-Shirt to accompany the articles premise.

The “Web 2.Oh Yeah!” T-Shirt is a perfect addition to your Web 2.0 loving uniform. Add it to your closet with the rest of your start-up schwag t-shirts, pins and stickers. If you’re one of those people who jumps on every chance they get to be part of the early adopter team of a new service, this is the shirt for you.

Mule Design offers their “Web 2.Oh Yeah!” T-Shirt for $20 from their online store in Men’s L-XL sizes, as well as Women’s medium sized. Either this t-shirt is really popular so far or they just don’t have a great selection of sizes available yet. Either way this is definitly going to be joining the confines of my wardrobe.