Friday, March 20, 2020
Pornography and the internet (pros and cons) essays
Pornography and the internet (pros and cons) essays What was originally ment to be a form of controlling our governments missle supply 41 years ago, has now exploded into what we call today the internet. Sending and receiving information has never been as easy as it is today. With just a couple of keystrokes and mouseclicks we can have acess to almost anything we want on our computer screens. One of the biggest problems that has arisen with this new found technology is how easy it makes distributing and accessing pornographic material. Many citizens feel as though the internet needs to be regulated to keep pornographic imagry out of the hands of children. I feel that restricting the right of citizens to view and distribute legal pornography on the internet is a direct infringement on our First Amendment right. Allowing pornography to be distributed on the net helps keep in tact our rights as Americans, provides jobs to a whole new group of workers and entrapaneurs, and it provides a form of relief to people who might have otherw ise resorted to more drastic measures. To first understand the debate on whether or not pornography should be allowed on the internet, a basic knowledge of what the internet is, and when it was started is needed. Most of todays youth that uses the internet everyday for a variety of tasks take for granted that it has only been around and easily accessed for roughly 15 years. The concept of the internet, or what was then called Arpanet was created in 1957. The goal was to design a system that could be used from anywhere in the U.S. for the government to control its missile supply in case of war. The early 1990s is when the World Wide Web (or that www that is put in front of any webpage address) was created, and the public had access to it. In 1997 a study on site access showed that of the top 11,000 searches, 47% were targeted toward pornography. This would seem to show that pornography has given the internet a...
Wednesday, March 4, 2020
Hama Rules - Syrian Massacre of Muslim Brotherhood
Hama Rules - Syrian Massacre of Muslim Brotherhood Hama is Syrias fourth largest city after Aleppo, Damascus, and Homs. It is located in the northwestern part of the country. In the early 1980s, it was a stronghold of the Syrian Muslim Brotherhood, which was working to topple the minority, Alawite regime of then-Syrian President Hafez el Assad. In February 1982, Assad ordered his military to demolish the city. New York Times reporter Thomas Friedman called the tactic Hama Rules. Answer Syrian President Hafez el Assad took power in a military coup on November 16, 1970, when he was the minister of defense. Assad was an Alawite, a splinter Islamic sect that makes up about 6 percent of the Syrian population, which is predominantly Sunni Muslim, with Shiites, Kurds and Christians forming other minorities. Sunnis make up more than 70 percent of the population. As soon as Assad took over, the Syrian branch of the Muslim Brotherhood began to plan for his overthrow. By the late 1970s, a slow-simmer, but persistently violent guerilla war was being waged against Assads regime as bombs went off outside Syrian government buildings or Soviet advisers or members of Assads ruling Baath Party were shot in frequent attacks or taken hostage. Assads regime responded with abductions and assassinations of its own. Assad himself was the target of an assassination attempt on June 26, 1980, when Muslim Brotherhood threw two hand grenades at him and opened fire when Assad was hosting the Mali head of state. Assad survived with a foot injury: hed kicked away one of the grenades.ââ¬â¹ Within hours of the assassination attempt, Rifaat Assad, Hafezs brother, who controlled the states Defense Companies, sent 80 members of those forces to Palmyra Prison, where hundreds of Muslim Brotherhood members were being held. According to Amnesty International, the soldiers were divided into groups of 10 and, once inside the prison, were ordered to kill the prisoners in their cells and dormitories. Some 600 to 1,000 prisoners are reported to have been killed. ... After the massacre, the bodies were removed and buried in a large common grave outside the prison. That was just a warm-up for what was to come later, as surprise searches of Muslim Brotherhood households became frequent, as did curbside executions in Hama, as well as torture. The Muslim Brotherhood stepped up its attacks, murdering dozens of innocent people. In February 1982, Friedman wrote in his book, From Beirut to Jerusalem, President Assad decided to end his Hama problem once and for all. With his sad eyes and ironic grin, Assad always looked to me like a man who had long ago been stripped of any illusions about human nature. Since fully taking power in 1970, he has managed to rule Syria longer than any man in the post-World War II era. He has done so by always playing by his own rules. His own rules, I discovered, were Hama Rules. On Tuesday, Feb. 2, at 1 a.m., the assault on Hama, a Muslim Brotherhood stronghold, began. It was a cold, drizzly night. The city turned into a scene of civil war as Muslim Brotherhood gunmen immediately responded to the attack. When close-quarter combat looked to disadvantage the Syrian forces of Rifaat Assad, he turned tanks loose on Hama, and over the next several weeks, large parts of the city were demolished and thousands executed or killed in the battles. When I drove into Hama at the end of May, Friedman wrote, I found three areas of the city that had been totally flattenedeach the size of four football fields and covered with the yellowish tint of crushed concrete. Some 20,000 people were killed at Assads orders. That is Hama Rules.
Sunday, February 16, 2020
TOYOTA ASSIGNMENT Example | Topics and Well Written Essays - 250 words - 1
TOYOTA - Assignment Example Such segmentation will thus more closely match particular needs of this specific group of sexual orientation. The segmentation will thus enable even those who are still hesitant to declare the homosexual orientation and hence a need for market strategy based on this group as their needs cannot be satisfied through regular markets. The needs of this particular group will be met as marketers get to understand the exact needs of sexually oriented individuals and target marketing strategy at a specific group (Hondagneu-Sotelo 23). In addition, it would be much easier and successful to establish and promote specific and customized products and services to sexually oriented group. There may be no customized products as only particular group is served and not individuals. In addition, some may argue that sexual orientation marketing will promote immorality and thus it might be faced with difficulties from those opposing sexual orientation
Monday, February 3, 2020
Special education case review Essay Example | Topics and Well Written Essays - 1000 words
Special education case review - Essay Example The court reversed the district courts grant for a summary judgment. It held that compliance with obligations to children with hearing disabilities under IDEA does not signify compliance with obligations for effective communications under the ADA. In arriving at this conclusion, the court noted that there are differences between the provisions of the IDEA and those of Title II of the ADA.à Because of this difference, failure of a claim under the IDEA does not necessarily exclude a claim under Title II of the ADA. In A.C v. Shelby County Board of Education, A.C was a minor with type I diabetes. She attended Bon Lin Elementary school, which is governed by the Shelby County Board of Education SCBE. Her parents had requested certain disability accommodations for her. These accommodations included the retention of a full-time nurse, making the childââ¬â¢s classroom a peanut free zone due to her allergy to peanuts and taking of her blood tests in her classroom as opposed to the school clinic. There had been tensions between the school and the childââ¬â¢s parents regarding these requests. The situation got out of hand when the school principal made reports to the department of child services alleging that the parents were medically abusing the child. The parents filed a suit claiming that the violation of section 504 of the Rehabilitation Act and the ADA. Section 504 and the ADA prohibits retaliations against individuals due to opposing practices made while seeking to enforce their rights unde r these Acts.
Saturday, January 25, 2020
Ethical Behaviour Within The Work Place Philosophy Essay
Ethical Behaviour Within The Work Place Philosophy Essay Yes I believe that the use of ethical behavior will pay off in the long run. I believe that the ethical behavior at work place is highly influenced by the leaders at workplace. We human beings are social animals and as a part of one of our basic instincts we like to copy people we admire and respect. So if the leader is transparent, truthful, self-sacrificing and shows the highest standards of ethical and moral conduct his followers eventually develop respect and admiration. If the leader believes that ethical standards and ethical commitment builds customer trust and winning with integrity is the key mantra to business success then his/ her employees will do as well. This is what will attract and keep the best employees in the company. The main proposition for the ethical behavior is that ethical behavior is concerned with should and should not, and implies that there is required by law or which are commercially a responsibility of, and depends on the leadership in an organization, that the argument has significant implications for corporate governance. There are well known difficulties in defining the term leadership and in specifying what is meant by ethics in the context of business behavior, difficulties which have been rehearsed recently in the Journal of business Ethics.Ã While business ethics have always been important from a social and moral point of view, they also become a pragmatic requirement in the corporate Olympics. The doing- more- with less strategies place in even greater premiums on trust than did the adversarial protection, business practices of the traditional corporation. Some of the key characteristics of ethical behavior are: try to satisfy all constituencies, dedicated to high and broad purpose and also committed to learning in order to remain current and responsive to change which also tries to be the best at whatever they do. For example I would like to cite a story from my past experience in life. The principal of our school (ARMY SCHOOL) use to receive monthly salary through a cheque from the director general of the school committee. But once the principal received 2 cheques of the same amount for the same month. Being an ethical human being and a man of principles and values he returned the extra cheque back to the director gen eral. Now many of his colleagues said that he should have en cashed the money from the extra cheque and should not have returned it. However the principal replied that it would have been unethical if he would have used it for personal use. A few years later the director general of the school committee had to appoint a secretary for funds department and was looking for a suitable candidate. So all of his colleagues and other principals applied for the vacant position. Out of all the principals of army schools throughout northern India he chose our principal. All his colleagues were amazed as they were more qualified that he was and had much more experience. However when the director general of the school committee asked replied that there wasnt a better person than him suited for this job. Just because the principal was ethical and had high moral conduct, maybe he wasnt rewarded at that time but if we look at it, in the long run he outlasted all of his colleagues and was rewarded a m uch higher position than all of them. The same can be applied to the business as well. If one wants the business to survive and flourish successful one should have an ethical concern towards the customer, employees, shareholders and community. The customer always wants the quality of the product to be legit and want to be treated fairly while purchasing the product. Expecting the returns from the investments keeping the same standard of the growth within the business and maintaining the standard quality of the ethical behavior for the well beings of entire society. We learn from mistakes and we should be passionate about what we believe and I believe not matter what but we always learn from good ethical environment at workplace. Another advantage of ethical code is protection of company assets. A good example of high ethical standards in a company is when its employees protect the companys asset and not misuse them. Manager or the supervisor should take an active role in bringing awareness to all the individuals at the workplace of the responsibilities and expectations of the organization. Also he must set the standards at workplace for ethical code of conduct. He should make clear to the employees what is right and what is wrong. On the other hand the employees should actively be aware and should have knowledge of the ethical code of conduct. Management must demonstrate through consistent examples their personal alignment with ethical principles and values, their expectations that employees will do what is right and fair, their encouragement and support of open communication and candor within the organization. Responsibility is another element which is combining to the moral ethical value. The sense of responsibility also comes from within. If one feels proud of the company he /she is working and is satisfied from the work condition, then the urge to work ethically for that company comes from w ithin. One feels like taking the initiative to perform task. You dont make excuses or hide your face when a task is assigned to you instead you make sure that the task is performed in the right way and feel like taking up the whole responsibility for the task. This is what we call as winning with integrity. And when an employee reaches this stage their actions become unrestricted and they perform far better than what is expected out of them. Being ethical is essential when it comes to problem solving and improving processes. In a work place it is always required to establish baseline measures and increase the efficiency. Also one should never be afraid of admitting mistakes. If you cover up your unethical behavior then, firstly its can affect our image and secondly it prevents us from growing as leaders in the long run. For example once a teacher gave an assessment to 2 students which was due in weeks time. Once of the student was hard working and honest and the other one was totall y opposite but very clever at copying assessments. So the 1st student worked day and night to make the assessment however the 2nd student copied it from him and submitted it to the teacher before he could. After the assessment the 1st student got a zero and the 2nd one got 85%. When the teacher asked by the teacher for reason by the first student said the assessment was copied from the other student. But the hard working student didnt give up because deep inside he knew that he was ethically correct and hadnt cheated. At the end of the year when it came to the final exam the teacher gave a similar case study assessment. But the only difference was that it was to be finished in 3 hrs under his supervision. Now the 2nd student who used to slack of and never did any assessment by himself was dumbstruck and it was like the tip of his pen had almost frozen. He didnt know what to write and how to conduct the assessment. However the 1st student who always prepared his assessments honestly just knew what to write and how to write. He completed the assessment and cleared the semester with good grades however the copy cat failed the exam and had to re-sit the exam. The moral of the story is again that if you believe what youve done is right and complies with your ethical standards then it will always pay you off in the long run. So in all to sum it up the higher the ethical climate the higher the profit of an organization. If one has to be ethical at work then he/she should ask the following 4 basic questions from him/herself which are being practiced at Rotary international: Is it the truth? Is it fair to all concerned? Will it build good will and better relationships? Will it be beneficial to all concerned? If you can answer these four questions accurately then you are in a position to act ethical at your workplace. Also being ethical means solving common problems at workplace which are generally: Quality Safety Property Human relationships It is the duty of the leaders to understand them and make judgments. Finally it is our elders or leaders who pass ethics to us in many ways and if we learn from their experiences we will get to know that being ethical will pay you in the long run. Answer 2) Ethical leadership is about all knowing your core moral values and having the ability and courage to live them in every aspect of your life for the betterment and upliftment of the common. I would like to throw light on the fact that ethical leaders are also human beings but the only difference between an ethical leader and a regular human being is the moral courage. Life is not perfect and we are not perfect. Everyone has his/her own moral sense. We have the ability to make choices (right or wrong), important to us, as we travel the path of life. Choices which we choose are basically based upon the personal set of values we have quoted as rules or principles for how we will carry out and live our life. Also the fact remains that all the choices are not necessarily ethical. But most of us know when such a situation occurs. But standardizing our actions through moral conduct is the right thing to do. Before we discuss our main topic of discussion i.e. impact of ethical leaders on the society I would like to say that: Whatever type of ethical standards we have accustomed for ourselves will always be with us 24 by 7. There are no other different moral conducts or ethical principles for business. We carry them with our personality. Leaders co-exist everywhere. Leaders are everywhere in every field. They are present in a family, community, workplace, school and represent the interests of the common good. Besides that they safeguard rights of their followers. Some nations who are pioneers in certain fields and dominating the worlds economy call themselves as leader but when it comes to sense of moral conduct they are not ethical. Today, developments are taking place at a very rate but the standard of human life span is shrinking. The hunger for money and power has watered down the difference between right and wrong. We have designed a cob-web around us. Everyone wants to climb the ladder and reach to the very top even if it means pulling someone down and stepping on their head to do so. The harmful effects are noticeable in the environment around us, by chaos and increase in fraud, offence, contamination and social disturbance. Today the common masses have lost their trust in their leaders and blame them for their misery. For example in India, the population no longer believe that their political leaders are trustworthy. Most of the voters rate them low on ethical conduct and honesty. More than 50% of the subjects surveyed by JAGO (JAGO is a Hindi word meaning awaken or get up) India team on a campaign said that administration is literally making their lives worse. Unethical behaviour and corruption has amalgamated with moral values so much that our new generation can hardly distinguish the two. We learn it at the basic level for e.g. at school, home and sports. So we can says that it is very much involved at every point in business among employees and employers both. People prefer the alleyway (shortcut) instead of the highway. To be equipped with ethically competency in todays dynamic world we need to develop certain specific personal and social skills with a keen understanding of how to make well established flourishing economy while taking care of the world on which the life of the common mass depends as well. As an Indian and as a fellow human being I would like to say this on behalf of the mass population. If for once our politicians and leaders: think for the betterment of the mass population and not their self centred interests. Exhibit legitimacy and veracity in their conduct Then they should not be scared of any hatred for their ethical practices. Ã In some situations when leaders may feel extremely stressed that they have to decide between personal Benefits or Ethics. If siding with the ethics will only earn you reputation, then that should be the only option. Ã Leaders need to be unbiased towards their followers and should favour what is appropriate. This will spread of a lot of operation in the organization, even if it means creating some opponents, too. When no one is supporting the leader. They should act bold and adhere to the cause. If our leaders just even implement few of the above mentioned points I believe this world would be a much merrier place to live in. Ethical leaders need to be for the people, by the people and should be conscious of how their decisions impact others. The leaders should have the sense of serving the people from within and should come with benign interests for the mass population. This way they can motivate their follower and show them what self sacrifice means. This implementation involves participation of both the parties towards common goals. Ethical leadership is very important in communicating in a business culture as well. While making a decision the leader should make such choice or decision which is good both for the people and the business as well. The leaders should have lucid ethical conduct of doing business and make these principles known to others in their circle clearly. They should convey their message through all channels on all the possible grounds (personal, professional and legal). This not only helps in gaining respect and admiration from the employees but also gives a peace of mind for oneself knowing that one have done right. Dealing otherwise will generate mistrust at both personal and professional level. Ethical leaders should be truthful, see-through and trustworthy. For this very reason the world knows Mahatma Gandhi. There are many people who want to restore ethical values in the society. But, having a larger section infected with the virus, it becoming difficult to stay ethical and lucid in this dynamic world. If ethical leadership needs to be reformed it needs to introduced at the top level first The leaders would need to demonstrate an example of ethical behaviour before their followers expect it from their leaders.
Friday, January 17, 2020
Tupac
There are many conspiracy theories concerning the life and death of Tupac Shakur. Tupac Amaru Shakur was an American rapper and actor. Tupac was born New York, New York, United States on 16 June 1971. His birth name was Lesane Parish Crooks. Tupac was killed on September 13, 1996, in Las Vegas, Nevada. There have been many different stories about his death. People say he is still alive and then people said he is dead. There have also been people saying his death was caused because of his music and the Illuminati killed him.Various conspiracy theorists throughout the public believe that the Illuminati killed Tupac because he was exposing them and also not promoting the ideals that they desired. The ways Tupac exposed the Illuminati was one way by his lyrics in his songs, for example: in one of his songs it says: ââ¬Å"im seeininââ¬â¢ demons hittinââ¬â¢ weed got me hearinââ¬â¢ screamsâ⬠scared to go to sleep, watch the scene like a dope-fiend peobably be punished for it (exposing the Illuminati), thiugh you canââ¬â¢t ignore it.I live the life of a thug nigga, and die for it niggaz pass the clip and watch me bring em to the floor I got some shit that they ainââ¬â¢t ready for (what you got? ) I got the secretz of wasâ⬠(about the illuminati). Another example of how Tupac exposed the Illuminati in his lyrics is another song he wrote, he said: ââ¬Å"Busters dhot me five times, real niggaz donââ¬â¢t die cant ya hear me? Laced with this game, I know you fear me spit the secret to war, so (Illiminati) cowards fear me my only fear of death is renicarnation heart of a solider with a brain to teach your whole nation (about the illuminati) And feelin no more pain. Another example of how Tupac exposed the Illuminati was by using symbols in his music videos, album cover pictures, and etc. Illuminati symbols are branched across numerous things you come across in your everyday life. The pryamid, the ââ¬Å"all seeing eyeâ⬠(of Horus or Lucifer (Represents the knowledge Lucifer gave to the secret Societies)), the using of the devil horns with your hands, the flashing if a 666 by using the symbol for ââ¬Å"okayâ⬠. Tupacââ¬â¢s final album was called: The Don Killuminati: The 7 Day Theory. The theme of all the songs had to do with the Illuminati.Before going to prison, Tupac was conveying the ideals such as ââ¬Å"thug life,â⬠drinking, having sex, and other ideals that the people wanted to hear. Tupac had been to jail many times before. In 1995, Tupac lost his temper when he was cut from a film and was arrested when he assaulted the film's director. Also, in 1995, a jury convicted him of sexual abuse and sentenced him to four and a half years in prison. After eight months in prison Shakur was released when Suge Knight, head of Death Row Records, paid his one-million-dollar bail.After the last time he got out of jail, he was more of a Christian came out of prison as a changed man. In 1994 Tupac was against the Illuminatiââ¬â¢s concepts also. Tupac started promoting more positive ideas very effectively due to the amount of respect he gained. He was then considered a threat to the Illuminati leading people to believe that this may have led to the Illuminati plotting his death. The development of the Illuminati was founded on May 1, 1776, in Ingolstadt (Upper Bavaria) and became known as the Order of the Illuminati, with an initial membership of 5, by Jesuit-taught Adam Weishaupt (d. 830), who was the very first lay professor of canon law at the University of Ingolstadt. It was made up of freethinkers as a descendant of the Enlightenment and appears to have actually been modeled on the Freemasons. The Illuminatiââ¬â¢s members took a vow of silence and pledged obedience to their superiors. Group members were split into 3 primary sections, each with a number of qualifications, and lots of Illuminati chapters drew membership from other Masonic lodges. (Illuminati History) Originally Weish aupt had planned the order to be named the ââ¬Å"Perfectibilistsâ⬠.The group has also been called the Bavarian Illuminati and its ideology has been called ââ¬Å"Illuminismâ⬠. Many influential intellectuals and progressive politicians counted themselves as members, including Ferdinand of Brunswick and the diplomat Xavier von Zwack, the second-in-command of the order. The order had branches in most European countries: it reportedly had around 2,000 members over the span of ten years. It attracted literary men such as Johann Wolfgang von Goethe and Johann Gottfried Herder and the reigning dukes of Gotha and Weimar. In 1777 Karl Theodor became ruler of Bavaria.He was a proponent of Enlightened Despotism and his government banned all secret societies including the Illuminati. Internal rupture and panic over succession preceded its downfall, which was affected by the Secular Edict made by the Bavarian government. ] The March 2, 1785 edict ââ¬Å"seems to have been deathblow to the Illuminati in Bavaria. â⬠Weishaupt had fled and documents and internal correspondences, seized in 1786 and 1787, were subsequently published by the government in 1787. Von Zwack's home was searched to disclose much of the group's literature. There are also theories about Tupac faking his death, and he is still alive.The 7 Day Theory is an idea pushed by the proponents that attempt to find the smallest details of any situation in order to provide more support for the conspiracy. This evidence is very disputable, because some will slightly alter details in order to gain the evidence needed. Deep personal research is suggested when inspecting the details of the 7 Day Theory. The repetition of an occurrence of numbers can happen anytime. The Number 23, a movie from New Line Cinema, mentioned multiple occurrences of the number 23. Using these occurrences of numbers for support is weak and quite silly.Some believers of the conspiracy favor to point out the 7 Day Theory. A main focus of that is the title of one of his albums, The Don Killuminati: The 7 Day Theory. Many parts of his life and death bring about suspicion that focuses on the number 7. It is noticed that Tupac survived 7 days after he was shot. He was shot on the 7th of September and managed to stay alive until the 13th. That is seven days if you include the day he was shot. Others also notice that he was officially announced dead at 4:03 p. m. As we know, four plus three equals seven. Tupac, aka Makaveli, died at the age 25.His age of death is another key factor that relates two numbers adding up to 7. Two plus five happens to equal seven. Another coincidence that is suspect to this significance of 7 is the release date of All Eyez on Me. Tupac died exactly seven months after the release of the album, which was released on February 13, 1996. Tupac died on September 13, 1996 (Scott, 1997). One of the major components of the conspiracy theories is the lyrics of Tupacââ¬â¢s songs. Many believe that Pac left us clues about, and even foretelling, his death. By examining bits and pieces of his music, conspiracists hope to extract a deeper meaning to them as a whole.One song he wrote was named: ââ¬Å"Ambitionz az a Ridahâ⬠, the lyrics were: ââ¬Å"Blast me but they didn't finish, didn't diminish my powers so now I'm back to be a muthaf*&kin' menace, they cowards thatââ¬â¢s why they tried to set me up, had b*tch a*s niggas on my team so indeed they wet me up, but Iââ¬â¢m back reincarnated. â⬠Many believers take this statement to suggest Tupac was reincarnated as Makaveli. Another song he wrote was ââ¬Å"Blasphemyâ⬠, the lyrics were: ââ¬Å"I'm contemplating thoughts, wondering the thought to go, Brotha getting shot coming back resurrected. â⬠Here, a direct statement about coming back is made.One last song was ââ¬Å"Only Fear of Deathâ⬠, the lyrics were: ââ¬Å"Never will I die, I'll be back. â⬠Here is a third instance in which Tupac i mplies his resurrection. On multiple accounts, he mentions a plot but never specifies his plan of action. There are many conspiracy theories concerning the life and death of Tupac Shakur. Many say the Illiminati killed him, and then thereââ¬â¢s theriors that he faked his death, and he is living in cuba. Citations ââ¬Å"BallerStatus. com. â⬠BallerStatus. com. Ronnie Gamble, 24 Aug. 2009. Web. 02 Nov. 2012. .Houston, Akil. ââ¬Å"Shakur, Tupac. â⬠Encyclopedia of African American History, 1896 to the Present: From the Age of Segregation to the Twenty-first Century. Ed. Paul FinkelmanNew York: Oxford UP, 2008. Oxford African American Studies Center. Fri Nov 02 00:59:44 EDT 2012. . Illuminati History Secrets. â⬠Illuminati History. Illuminati History, 2012. Web. 02 Nov. 2012. ;http://www. illuminatihistory. net/;. ââ¬Å"Illuminati. â⬠Wikipedia. Wikimedia Foundation, 28 Oct. 2012. Web. 02 Nov. 2012. ;http://en. wikipedia. org/wiki/Illuminati;.
Thursday, January 9, 2020
Using Namespaces in VB.NET
The most common way VB.NET namespaces are used by most programmers is to tell the compiler which .NET Framework libraries are needed for a particular program. When you choose a template for your project (such as Windows Forms Application) one of the things that youre choosing is the specific set of namespaces that will be automatically referenced in your project. This makes the code in those namespaces available to your program. For example, some of the namespaces and the actual files they are in for a Windows Forms Application are: System in System.dllSystem.Data in System.Data.dllSystem.Deployment System.Deployment.dllSystem.Drawing System.Drawing.dllSystem.Windows.Forms System.Windows.Forms.dll You can see (and change) the namespaces and references for your project in the project properties under the References tab. This way of thinking about namespaces makes them seem to be just the same thing as code library but thats only part of the idea. The real benefit of namespaces is organization. Most of us wont get the chance to establish a new namespace hierarchy because its generally only done once in the beginning for a large and complicated code library. But, here, youll learnà how to interpret the namespaces that you will be asked to use in many organizations. What Namespaces Do Namespaces make it possible to organize the tens of thousands of .NET Framework objects and all the objects that VB programmers create in projects, too, so they dont clash. For example, if you search .NET for a Color object, you find two. There is a Color object in both: System.DrawingSystem.Windows.Media If you add an Imports statement for both namespaces (a reference may also be necessary for the project properties) ... Imports System.DrawingImports System.Windows.Media ... then a statement like ... Dim a As Color ... will be flagged as an error with the note, Color is ambiguous and .NET will point out that both namespaces contain an object with that name. This kind of error is called a name collision. This is the real reason for namespaces and its also the way namespaces are used in other technologies (such as XML). Namespaces make it possible to use the same object name, such as Color, when the name fits and still keep things organized. You could define a Color object in your own code and keep it distinct from the ones in .NET (or the code of other programmers). Namespace MyColorPublic Class ColorSub Color() Do somethingEnd SubEnd ClassEnd Namespace You can also use the Color object somewhere else in your program like this: Dim c As New MyColor.Colorc.Color() Before getting into some of the other features, be aware that every project is contained in a namespace. VB.NET uses the name of your project (WindowsApplication1 for a standard forms application if you dont change it) as the default namespace. To see this, create a new project (we used the name NSProj and check out the Object Browser tool): Click Here to display the illustrationClick the Back button on your browser to return The Object Browser shows your new project namespace (and the automatically defined objects in it) right along with the .NET Framework namespaces. This ability of VB.NET to make your objects equal to .NET objects is one of the keys to the power and flexibility. For example, this is why Intellisense will show your own objects as soon as you define them. To kick it up a notch, lets define a new project (We named ours NewNSProj in the same solution (use File Add New Project ...) and code a new namespace in that project. And just to make it more fun, lets put the new namespace in a new module (we named it NewNSMod). And since an object must be coded as a class, we also added a class block (named NewNSObj). Heres the code and Solution Explorer to show how it fits together: Click Here to display the illustrationClick the Back button on your browser to return Since your own code is just like Framework code, its necessary to add a reference to NewNSMod in NSProj to use the object in the namespace, even though theyre in the same solution. Once thats done, you can declare an object in NSProj based on the method in NewNSMod. You also need to build the project so an actual object exists to reference. Dim o As New NewNSProj.AVBNS.NewNSMod.NewNSObjo.AVBNSMethod() Thats quite a Dim statement though. We can shorten that by using an Imports statement with an alias. Imports NS NewNSProj.AVBNS.NewNSMod.NewNSObj...Dim o As New NSo.AVBNSMethod() Clicking the Run button displays the MsgBox from the AVBNS namespace, Hey! It worked! When and Why to Use Namespaces Everything so far has really just been syntax - the coding rules that you have to follow in using namespaces. But to really take advantage, you need two things: A requirement for namespace organization in the first place. You need more than just a Hello World project before the organization of namespaces starts to pay off.A plan to use them. In general, Microsoft recommends that you organize your organizations code using a combination of your company name with the product name. So, for example, if youre the Chief Software Architect for Dr. Nos Nose Knows Plastic Surgery, then you might want to organize your namespaces like ... DRNoConsultingReadTheirWatchNChargeEmTellEmNuthinSurgeryElephantManMyEyeLidsRGone This is similar to .NETs organization ... ObjectSystemCoreIOLinqDataOdbcSql The multilevel namespaces are achieved by simply nesting the namespace blocks. Namespace DRNoNamespace SurgeryNamespace MyEyeLidsRGone VB CodeEnd NamespaceEnd NamespaceEnd Namespace or Namespace DRNo.Surgery.MyEyeLidsRGone VB CodeEnd Namespace
Subscribe to:
Posts (Atom)