Programmatically today is good. I added user and membership tables using aspnet_regsql.exe in a database. After creating it I connected it through Provider class in web.config.
Next, I created roles programmatically and assign roles to users.
This is great. I wanted to do it for last two three days and failed. But the method is not very difficult at all.
You use a command line code like this:
aspnet_regsql.exe -d -E -A all
pressing enter the required classes(tables) will have added to the database. Now using the proper connection string you can get connected to the database.
The next steps are pieces of cakes as you drag web controls from Login toolbox. The default classes automatically attached and next thing you write down a class which inheriting from SqlProvider overrides the methods to create Roles and assign users to that roles.
Asp.Net ships with plenty of classes that you can use with your classes and create objects accordingly.
This is the greatness of Object Oriented Programming.
I find it Philosophical getting reflections of the real world. Don’t you?
Probably this news did not go unnoticed. Now Steve Jobs’ Apple is most valuable tech firm in the world and in NASDAQ it overtook old rival Bill Gates’ Microsoft.
Okay I’m a not a financial market expert nor I’m a tech guru so I can explain the nittygritty of this up and down.
What I can do is sharing my experience with Microsoft technology as a ASP.NET web developer. In a nutshell, Microsoft technology is superb. From the web development point I can say, it is almost unparallel. It is very very much user/developer friendly but not developing country friendly. 🙂
I hope you get my point. When you build a web site with visual studio, you can get the free versions of VS and SQL Server(Express) but a child knows you can not download it using a pirated Windows.
So here is the catch. You must buy a genuine Windows. DO you know how much it cost in a developing country?
In our country, India, a small percentage of people can buy that. Seventy percent (more than seventy crore) is BPL. Twenty five percent belongs to the Middle income group but not that all can buy genuine softwares.
So in India, like other developing country, there is a vast market of piracy. You have brilliant teams. Great thinkers who can make impossible things possible. Microsoft has everything to make technology talk. But what is the use of brilliance if that does not serve mankind, general people?
DO we really have something to do with this win and lose? Nothing at all. Apples’ IPad is too costly and moreover you can not probably download a pirated version from the internet.
So it really does not matter, who overtakes whom. Still Microsoft’s technology comes to our help. Microsoft definitely knows about the piracy, but until now it goes on and people with no money, can use their pirated softwares to make their living.
That is the good side of the Microsoft story. I don’t know how Apple’s technology will come to the help. Hopefully it’ll come.
This qustion really haunts beginners. When you build up a web site with the help of Visual Studio 2005 or 2008 or 2010, the basic steps are easy. In fact, it seems that it’s a piece of cake. But when you are asked to write down a class of your own which will control the Default.aspx page to display something it turns around to difficulties.
Even, the seasoned computer addicts are puzzled at some points when they are asked to go through the basic concepts of Object Oriented Programming.
They are confused. They eventually ask silly questions like : what this object oriented programming does in ASP.NET?
This questions really haunt beginners. What actually happens? How it happens? Why should I learn object oriented programming to build web site etc.
I want to understand this from the angle of a student. And I’ll try to write about it in a few installments so that a beginner like me can start from zero and build up a web site that will talk to the datas in a databse and make things happen.
Just now I’m learning and building a project based on three tier architecture.
This is extremely useful especially when you’re going to build an application that would be solid, hacker-proof and could be extended in future.
The first tier is Presentation. This will be viewed and used by the end user. Like you view a web page, perticipate etc.
The second tier is Business tier. It plays the role of a bridge between upper and lower tier. In the lower tier there is Data tier. Business tier stays between them, ie; Presentation and Data, maintaining the connection.
How this happens I’ll explain.
Being a developer, in the one hand you might have many end users. The number of end users are varying. It could be very large. So you have to build a site that’d sustain that pressure and will not be broken.
On the other hand you have your client. They could be also very demanding. Moreover, lately after a site has been built up, client might want to extend the application.
So the Business tier, where client will operate, should be flexible. To maintain that flexibility, you write down your own classes that will have thier own members. This classes could be static. There could be struct for maintaining speed. You know struct is mainly used as data container. Speed is a factor in a dynamic site.
In the lower section, there is the final tier Data. It is called Data tier or Database tier. The valuable data resides in Data tier.
The whole architecture goes in a sequential flow so that from the Presentation tier you can not jump onto the Data tier. The Businaess tier not only stands between them but also guards the Data tier controlling the end user’s demand and query against the Data.
Altogether, the whole three tier architecture not only looks impregnable but also stands solid against any malicious codes.
It looks like this:
1) Presentation tier
2) Business tier
3) Data tier
2) Business tier
1) Presentation tier
The flow moves down and goes up accordingly.
A note for the beginners like me: the Object Oriented Programming solidly displays its main characteristics in the Business tier where you write down the classes like Generic Data Access, Database Access, many utility classes like sending mails etc.
In your classes you can call the default .NET classes accordingly, create their instances and use them.
At the end of the day the application is ready, dynamic and kicking.
Best of luck!
The impact of Rabindranath Tagore is stupendous. I must admit, I got my strength to fight loneliness, restlessness, every “ness” that brings mess :), from his songs, lyrics, poems even sometimes proses.
My wife Mithu syas “amader ektai thakur, Rabindranath Thakur”(we have one God : Rabindranath). Actually in Bengali, thakur means God.
I know, everyone has their own support to burtress on at the time of distress. Sometimes it may be Shakespeare, sometimes it could be some one else. I’m trmendous admirer of Ernest Hemingway also, there are so many other Literary Icons, Film makers, artists, but my outlook towards Life is so close to his….
I am not a celeb. People never search for my story of life, nor be interested to listen. So in a second thought I decided not to elaborate my unfinished autobiography 🙂
I started this blog having a special intention to help people in ASP.NET. Basic questions usually disturb us. Finding answers we are relieved and get the neccessary motivation for movimg forward.
So helping people is my primary motivation to adopt this age-old medium.
After I started learning ASP.NET, C#, I still think that I have to go miles than I have already traversed. But I can at least try to help.
Let me try.
Like if you are a student of Object Oriented Programming and ask how to learn object oriented programming then these two chapters are must read.
The second part
I was bit confused at the start. Whether I’ll write only technical blogs on my favourite subjects (ASP.NET or PHP) or keep moving on diffrent tracks?
After a little bit introspection, I decided to move outside the technical topics. The thing is, there are so many good moments that I’d like to share with the world!
Like, few days back, I read a very nice article on Edgar Rice Burroughs the creator of Tarzan by Gore Vidal.
Here is the link
an intersting article
It’s simply witty, full of humor and insight.
It took me to the great childhood days of seventies. 🙂
I’d like to add few lines regarding this. Mainly for one reason. My childhood days revolved around few characters like Tarzan, Phantom, Mandreck, Lothar, Flash Gordon…But I’ve to name few more characters with whom I got aquainted later like Dipak-Ratan, Biumal-Kumar, Jayanta-Manik etc.
Due to that, I’d like to name Swapankumar with Edgar Rice Burroughs. Swapankumar is not internationally acclaimed children writer, neither his characters Dipak-Ratan, but his simple prose, fighting sequences, mystery(if there is any :)), had tremendous impact on my small imaginary world.