What is a Data structure and an ADT?

It is my second year in university already and learned lot of things so far now. 😉 So i got a subject called Data Structures and Algorithms in this semester. This is a very important subject and will be helpful in my future career. This subject contains ton of concepts in computer science. So i would like to share my knowledge with you that i got by self learning.

What is an ADT(abstract data type) – Abstract data type is a model of a type of data. It defines set of data values and associated operations on it. So ADT is independent of its implementation. Actually I understood this  by a simple example. So here i’m going to give a example which will be helpful to you. Think about, you want to create a Bag ADT. So we are not going to bother about how the implementation should be done but what are the set of data values and operations associated on it.

So if we consider about data values of this ADT : positions of the data items don’t matter and items don’t need to be unique also.

Operations associated with Bag ADT : Add items to bag, remove items from bag, number of items inside the bag at particular moment and etc.. 😉

So this is all we should know about our ADT and implementation can be done in any language with the use of any data structure.

So what is a data structure- Data structure is a particular way of organizing data inside computer memory. examples of data structures are linked lists, arrays, trees. So those data structures are used to implement the above mentioned ADTs. 😉

Hope you got the idea about ADTs and data structures. So in next post i’m going to talk about Stack ADT.

How to connect ASP.net with SQL server

In my last post, I showed you how to create simple web page in ASP.net . Normally every web site has a database to store data. So if we are going to create web site in ASP.net, we should have a database too. I used MySql database in my first year at university to understand the concepts in Database management. After that i tried few experiments with MSSql database which is developed by microsoft. Then i understood there is not much difference between MySql and MSSql . So that here i’m going to use MSSql database. MSSql is microsoft product,so that ASP.Net can easily communicate with this database. Because ASP.Net already includes the required drivers to communicate with MSSql Database. You can download MSSql server from microsoft site very easily.(Download MSSql server 2008 express with tools)

Afrer downloading MSSql server you can create a new database( if you want to learn how to create new database in MSSql  and other database concepts , try database posts of my website. 😉 )

Then go to visual web developer and create new website as we did in last post.

databaseAs like above shown, you can see the new ASP.net web site customization window. In this window click on Database explorer bar(shown by number 1 on figure). In your case, there will be no any database under data connections root folder. So do following steps to connect your database to here.

1. right click on data connections and click on add connection.Then it will prompt a add connection window as like shown below.

connection2. Select data source as Microsoft Sql Server(sql client).

3. In server name field, you can give localhost\sqlexpress

4. Afrer that click on refresh and then you can select your appropriate database name by the connect to a database part of add connection window. Select database name and then you are ready to go.

After doing the above mentioned processes, you can see that all the tables and table definitions are shown in database explorer in visual web developer. You can add any column any row inside visual web developer by using database explorer.

try to retrieve data using this and practice it yourself. Hope to see you with next post soon. Good Luck all 😉

First ASP.Net web page.

So as i mentioned in my last ASP.net post, this is the time to do some coding. If you are going to create ASP.Net web sites, it is better to download and install Visual Web Developer 2008 Express in your windows machine. Because I’m also using Visual Web Developer for learning ASP.Net. Just google it and install visual web developer. After installing Visual Web Developer, you can get the main window as like below.

VWEBDeveloprAs like shown in the above figure first go to file menu and select new web site. Then you will get a new window which consists of built in templates for your websites. As we are learning  ASP.Net, select ASP.Net web site template and click ok.

CaptureSo in above figure, red arrow shows a file which has .aspx extension. That is the ASP.Net web page’s file extension 😉 . Below that you can see the blue arrow points to file which has the extension .aspx.cs . This is the code file of the default .aspx web page. You can add code to your asp.net web page using this code file. This code file is linked to the web page using the code file tag which is underlined by green color in above figure. So you can add any String between div tags. And also you can change the page title as you wish. 😛

Then go to the Debug menu and select start without debugging option.Then your default browser will open the web page automatically and display the page content.If you check the url on address bar you can see something like this:


So you can understand it uses web server to process the page and then send html content to the browser.

What is 5005? It is the port number that localhost server uses.

In this case if you don’t start any of the server like apache,IIS manually, It will be still ok to run ASP.net Web pages. Because Visual Web Developer has ASP.Net Development Server for testing purposes.So this server automatically starts in background and processes your ASP.Net web page’s content before sent to the browser.

So hope you guys get good understanding about how to create basic ASP.Net web page. Try to understand what’s going behind the scene. And try your self. In next post I’m going to show how to add dynamic content in to your web page using code file which is embeded with ASP.Net page.

Good luck all 🙂

What is ASP.Net?

When i was studying PHP in my 1st year at University of Moratuwa, i searched for other server side scripting languages for Web. Then i was found that ASP is same as PHP but it is developed for microsoft products only. If you are working with microsoft technologies, understanding about ASP is very useful. After the development of .Net framework by microsoft in 2002 ASP.Net becomes the popular technology among all. So i’m also a beginner to ASP.Net but i’m learning it by my own. So i’m going to share with you what i gain from my ASP.Net Journey.

How ASP.Net Works?

asp.net archi

So i uploaded a small diagram which shows how ASP.Net work. I hope you can get clear idea about this architecture after reading the below mentioned steps. Try to understand this 😉

1.First web browser(Chrome,Firefox) sends http request to the http  server. (http is a protocol that uses in internet to communicate among computers and http server means every server like Apache,IIS runs a software called http server.)

2. Server only knows about html pages. So ASP.Net(Application Server) processes the web request to make some dynamic changes and send it again to the Server(IIS,Apache).

3. Then server returns  html page to the web browser. So that user can see the nice,colorful web page on his screen 😛

*ASP.net is called as application server which can communicate with databases and other web resources.

So you can understand that there is not much difference between PHP and Microsoft ASP.Net . Hope you got good understanding about what is ASP.Net and how it works. In my next post i’m going to build ASP.net web pages with you 😉 Thank you all and good luck in out ASP.Net Journey!

If you are in Computer/Software Field… Should familiar with these

Today I read an article about the languages that programmer should know. So i thought to share the idea which i got from that article. As a programmer, we can select many paths like web development, application development, Mobile app development and etc. If you want to be a good programmer, at least you have to know about the basics of those main areas. So I’m going to list down about those languages below. So that you can understand what are the areas that you should brush up in your career.

HTML & CSS – html is a markup language which allows to show the web page contents. css is the method use to decorate those html contents. html is like skeleton of human body. it is the structure

of human body and muscles,skin and etc. is like css .because it makes human body decorative. It is just a simple example 😉

PHP – PHP is a server side scripting language. This is a very powerful server side scripting language. You can generate dynamic web page contents with the use of PHP.

Javascript – javascript is a client side scripting language which is embedded in most web browsers. javascript allows the web page to be more alive.

Java – As a application programmer you should have sound knowledge of java programming language and OOP concepts.

C++/C# – I prefer learning C# will be more helpful for your career. It’s run on .net framework which is developed by microsoft.

Python – Python is another powerful language. It can use to make web sites, games,GUIs and etc. It can be used on its own or as a part of django framework.

ASP.net – this is also like PHP but it can be only used with microsoft server. Because it is a microsoft product.

SQL– SQL standards for structured query language which is used to manipulate data in databases. This is not a programming language or scripting language. It is better to learn MySql in start and after that you can see the differences between mysql and othe sqls like Mssql,Oracle.

Objective-c –  objective-c is the underlying programming language of apple products. So if you are going to make an application for Mac OS x , you should have good knowledge about objective-c. This is Object Oriented language based on C.

Ajax – Ajax stands for Asynchronous javascript and XML. AJAX uses javascript in the background  to communicate with server. So without refreshing the page you can see the changes in pages. You know that in gmail,facebook, and google talk ,updates can be seen without refreshing the page.

So i hope you get an idea about what are the areas you should brush up as a IT/Computer science undergraduate.I hope to post next post very soon. good luck for all 🙂