Tuesday, June 16, 2009

New Technologies to come soon !!!



Lately all the media services have been buzzing about new projects of the big boys (Microsoft, Google). The whole big fuss is about the sea of possibilities that those companies would like to offer to the internet society. How could this change the internet as we know it and especially the social services?
A wave comes crashing in …
First and probably the most exciting of the new projects is Google Wave. The whole concept was presented to larger public at the end of May 2009. This could seem as yet another social communication and collaboration tool.
How would this help to us? This will greatly speed up the process of sending and receiving emails, communicating with your friends and even sharing files. Secondly, the interface looks just very eye-pleasing. And most of all Google and its Gmail service are the most popular providers of such a service and those taking a step forward means this could change the way we communicate.

The second project is Microsoft’s Bing. It’s kind of a search engine, focused on intelligent results - simple and organized. Bing is useful to help you with your decisions. Grouping the results in logical and dynamic sections and giving you the most valuable data directly on one page. Microsoft’s Bing doesn’t and probably they do not want to outperform Google. Instead of delivering just a search engine they’ve decided to introduce the world to a new decision engine.

Sunday, June 14, 2009

Google Search



I came across a very interesting article about google searching tips. Here are some interesting stuff about google. Hope this would increase your efficiency.
Tips To search:
 To find Meanings: Type: define :
o Example: define: plantation

 To find exact phases: Type :”< Phase you want to find out>”
o Note: Make sure you type them within double quotes.
o Example:”One small step for man”

 To Find Link Pages: Type: link :< site name>
o Example: link: www.wmin.ac.uk

 To Find Math answers: Type: 5+8, 35%of 80, sqrt (4)
 To Find Conversions: mph in speed of light, km in m
 For multiple searching: Sri Lanka OR Colombo
 To Find Similar Words:Type :~
Example: ~book

Thursday, June 11, 2009

Object Relational Mapping ???


Object-Relational mapping is a programming technique that links databases to object-oriented language concepts, creating a "virtual object database." The package that implements the Object relational Mapping is known as Object Relational Mapper or ORM. ORM can be used in an n-tier application. There are many ORM packages available in the market both for free and commercial usage. However, some programmers develop their own ORM packages for the same purpose. This article would provide brief explanation about object relational mapping.
What is object Relational Mapping?
Definition: Object relational mapping is a technique converting data between incompatible type systems in relational databases and object-oriented programming languages.

When we are developing an object oriented application that requires a relational database we will need to have persistence objects that are modeled against your database design and to know how to interact with different tables in the database. We can either create them manually or use an Object relation mapping tool. When an object relational mapping tool is connected to a database, it allows you to map persistence objects to database tables and views, specify single row transactional operations, queries and stored procedure calls as methods to these objects. It allows you to define one to one, one to many, many to many relationships based on database design. It generates fully working persistent object code.
Object relational mapping is used when we want to take the advantage of transparent persistence and use a relational database. Relational database may be required because:
The data already resides in one or more relational databases
The data is new, but there are technical or political reasons for using a relational database
ORM – Object Relational Map per is a package that maps the objects to the relational tables and Tables columns to the object attribute one to one.
Example: We have an Employee Table with some columns in it. The figure below shows a business object of type Employee. It is not mandatory to have the employee declaration as shown below.
The Code written below is in C#. It typically explains a skeleton of business object.
Example code
Class Employee
{
public ID;
public Employee Name;
public Employee Salary;
}
The Employee class created needs to have a metadata that helps the ORM map to the table. There are many ORM packages available that deal with encapsulating the metadata with the class. We will look at the same in the next section.



Mapping terminology
• Mapping (v)-The act of determining how objects and their relationships are persisted in permanent data storage, in these case relational databases.
• Mapping (n)-The definition of how an object’s property or a relationship is persisted in permanent storage.
• property-A data attribute, either implemented as a physical attribute such as the string first Name or as a virtual attribute implemented via an operation such as get Total() which returns the total of an order
• Property mapping-A mapping that describes how to persist an object’s property.
• Relationship mapping-A mapping that describes how to persist a relationship (association, aggregation, or composition) between two or more objects.

Advantages of ORM
• ORM will reduce the programming code and through catching it will improve performance over using an embedded SQL or call-level interface with a relational database manager.
• A big advantage of mapping tools is that they provide an abstraction of the underlying database engine. Most of them allow switching easily between RDBMSs (Relational Database Management Systems).
• Automatic generation of SQL statements – The ORM layer generates automatically SQL statements. This helps the programmers concentrate more on the actual business logic removing the overhead of the SQL statements.
• Support of the Multiple Databases – Majority of the ORM packages available in the market support ANSI SQL standards. Hence, they can be used with most of the RDBMS. This can very useful in product development.
• ORM emphasizes on fully following the object oriented approach. Everything is an object. Database CRUD operations are typically called as a function. We will have functions on the business objects like Save, Update and Delete

Disadvantages of ORM
• Lack of standards – We have variety of ORM packages available in the market. We do not have common standard or conventions followed. Lack of such standard has made the programmers job tough. An ORM package may be completely different from another one.
• Performance related issues - Most of ORM related packages use reflection. As we know, using Reflection excessively is a performance overhead.


Compare toolsFeatures that a good ORM tool would provide

• Be able to use inheritance, create hierarchies between entities, and use polymorphism (we are using objects!). The tools can support a variety of combinations for tables and classes to allow these mechanisms.
• Handle any type of relations (1-1, 1-n, n-n)
• Support for transactions
• Aggregates (equivalent to SQL's SUM, AVG, MIN, MAX, COUNT)
• Support for grouping (SQL's GROUP BY)
• Static and dynamic queries
• Stored procedure calls
• Object catching
• Customization of generated code
• Template customization

Wednesday, June 10, 2009

Add your own holidays and events to outlook calendar


1. On the Tools menu, click Options, and then click Calendar Options.
2. Under Calendar options, click Add Holidays.
3. Select the check box next to each country/region whose holidays you want to add to your calendar, and then click OK.
If you already added a country's or region's holidays to your calendar, the check box for that country/region is selected in the Add Holidays to Calendar dialog box. If you try to add the same items again, you receive the following message:
“Holidays for country/region are already installed. Do you want to install them again?”
If you click Yes, the holidays and events are installed a second time, and you see duplicate holiday and event entries.
In case if you accidentally clicked yes, here is the way to delete it.
1. Go Calendar, view, Current view, Events.
2. Select the holidays that you want to delete. To select multiple rows, press the CTRL key, and then click other rows.
**Click the Calendar icon to select a row. Do not click in the data cells of the row.
3. Click Delete on the Standard toolbar.
Create custom holiday and event files
1. Exit Outlook if it is running.
2. In Microsoft Windows Explorer, locate the following file:
C:\Program Files\Microsoft Office\Office12\1033
3. Make a backup copy of the file.
4. Open the Outlook.hol file , using a text editor .Example :Notepad
5. Type a new header and custom events by using the format described below
[Country or Description] ItemCount

Holiday or event description, yyyy/mm/dd

Note:
“ItemCount” is the total number of items listed for a particular country, region or description. There should be a space between the closing bracket and the number, as well as a carriage return at the end of the line. On each holiday line, there should be a comma and a space between the holiday description and the date, as well as a carriage return at the end of the line.



Example:
[Holidays] 4
sampleday1, 2009/06/15
sampleday2, 2009/10/03
sampleday3, 2009/12/08
sampleday3, 2009/04/14
6.Save and close Outlook.hol.
The next time you run Outlook, the new “Holidays” dates are available for adding to your calendar.

Tuesday, June 9, 2009

This article is based on object oriented concepts. I personally believe that this would provide you correct information pool and a better explanation about OO concepts.

Object Orientation??

Object orientation sees, real world things as objects. For example teacher, insurance policy etc. In real world we simplify objects in our thinking and work with models .Its exactly similar to what are doing in software industry. We can simply say that teacher owns a bicycle and reads a book. Let’s try to explain it using OO concepts:

Abstraction –Abstraction and generalization are often used together. Abstraction simply means presentation of an object to external world simply .In other words, ability to hide irrelevant data from the use of names to reference objects. The idea behind is to manage complexity in large programmes. Abstraction can be categorized into two ways.

Abstraction

Procedural Abstraction Data Abstraction

Procedural Abstraction; Procedure abstraction is to decompose problem to many simple sub-works as much as possible

Data Abstraction; Data abstraction is to collect essential elements composing to a compound data.