Architecture :: Differentiate B.w Abstraction And Encapsulation?
Feb 14, 2011I cannot differentiate b.w Abstraction and Encapsulation.Could anyone explain diff b/w these two together with some c# examples?
View 9 RepliesI cannot differentiate b.w Abstraction and Encapsulation.Could anyone explain diff b/w these two together with some c# examples?
View 9 Replieswhen we write all our application methods and variables in a classes is nothing but data abstraction and encapsulation.Is it right?
View 2 Replies1. Why we need override the methods? (i know what is ovwrriding but why ?)I gave answer to extend the functionality of method is it right ? again sub question was ,
Class A
{
method1()[code]....
if i can create the object of Class A in class B and can invok the method then why need to override metho here ? in fact i could not get this question , because i think both concept are irrelevat with each other. why he asked this ?same for overloading.
why we need overloading?If MSIL is there then what is need of CLS(common language runtime ) and CTS(common type system)List the 5 resposibilities of CLR (I explained only CTS,CLS,Garbage collection) was i right . what else?
What is role of abstraction and encapsulation? what the difference between them ? In which situation we have to devlop abstration and encapsulation.
6.What is included in signatures , when we said overloading means same name but different in signature. Is access modifiers included?
7.What is asp.net application life cycle?
8.Let say I am requesting for web application first time (genuine first time), how the request will executes? how IIS will know that for which application is this request is ?
9.If interfaces have empty methods (implicit abstract method) then what is its need? why we say it is reduces the code and provide reusability ?
10.In which scenario we need to implement interfaces?
11.In which circumstances we need to develop abstract classes?
12.Is class is static, means we can not create its instance, we can not derive it then how can we use method containing it? Why we need static classes?
Please guide me about these all question
13 What are the http handlers. http modules? who handle the request and resposes? why need of httpcontext ? what are the limitations of http handler, httprequest, httpcontext, httpresponse.
I am using code like this in Business Logic.Can u explian the below whether i am using Encapsulation concept in the below code.Also tell me why i should use private for declaring variable _Region and public for the property Region
private string _Region;
public string Region
{ [code]....
I am creating a core library for one of our internal project. This core library supposed to contain some abstract classes and generic classes which will then be extended by specialized projects. For example, There is an AbstractPerson class with standard properties and methods for a Person class while another project will implement a Person class which will inherit from the AbstractPerson class to add project specific functionality.
Now we need to impelment DAL for this common and specialized projects.As most of operations are generic so i want to include them into core library as Repository classes. However, Repository classes need to access LINQ dataContext. Which is generated from the specialized databases. Hence there is no dataContext available in Core library to work. So how could i can create a common repository classes for generic methods which can reside in the common library.
I am sort of using a repository pattern to extract information from a database. I have two classes, report and reportRepository.
The trouble I have is that since reportReposity has to fill in all the details for the report object, all the members in the report have to be publicly accessible.
Is there a way so that I can ensure that only the repository class can access some of the methods of the report class and only it can set some of the properties that other classes cannot, sort of like what friend does in c++. Or is there a completely different way of handling this situation?
I am using C# in ASP.NET 2.0
on my asp.net page i am linking 2 css files which are used by 2 different controls but the main problem is that one class name is same in both so they are conflicting with each other, how can i distinguish between them. Both are of jquery, 1 is slider control and another one is time picker control. and they are conflicting on their background image as i want to change background image of slider control's scroller. code for using slider :
<div id="time1" style="float: left; width: 100px" >
<code>$('#time1 input').ptTimeSelect({ popupImage:
'<img alt="Select" src="../images/icon_clock_2.gif"
style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" />'
}); </code>
<div >
<input id="s2Time1" runat="server" name="s2Time1" readonly="readonly" style="width: 60px" />
</div>
</div>
below code is for time picker :
<div id="time2" style="float: left; width: 100px">
<code>$('#time2 input').ptTimeSelect({ popupImage: '<img alt="Select" src="../images/icon_clock_2.gif"
style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" />'
}); </code>
<div>
<input id="s2Time2" runat="server" name="s2Time2" readonly="readonly" style="width: 60px" /></div>
</div>
Is there a way to differentiate multiple tabs or windows in IE8? Using this information I want to uniquely identify tab/window where the web request is coming from.
View 2 RepliesI have 2 xml documents that I need to find the difference and then save it back to an xml file. I already have the code to get the difference, I am just lost on how to save the IEnumerable back to xml. I tried to stuff it into an XDocument, but got a conversion error.
Code:
Dim xDoc As XDocument = XDocument.Load("doc1.xml")
Dim xDoc2 As XDocument = XDocument.Load("doc2.xml")
Dim result = xDoc2.Descendants("Contact").Except(xDoc.Descendants("Contact"))
'Tried this but It blew up.
Dim resultDoc As XDocument = result
resultDoc.Save("result.xml")
Am I going to have to rebult the xml document and manually add the elements? Or does LINQ support converting back to the same schema?
I am not using asp.net membership role provider. But what i want to do is differentiate b/w employees and customers who register to my site. I want to assign some rights to my employees and very few rights to customers (like they should be registered but they can only give feedback)...
How can i achieve this? what changes should i make to the database table in SQL?
If I have 2 or 3 different domain names which all point to my same application; is there a way that I can differentiate which of the domain name was used to reach my application? for example if I have both [URL] and [URL] that both reach the same application and I would like to be able to tell which one of those 2 is being used, in code behind?
View 1 RepliesI've a requirement to know if drill down is expanded then what would be value and if it is collapsed then what would be value in SSRS 2005 reporting. So on the basis of this; i can show and hide data column in the matrix control.
I tried to use inscope() function but always getting - True.
I need something if drill down ------> + = Inscope(Grid) value, - = Inscope(Grid) value.
how to differentiate whether a managed library is running in the context of asp.net application or in a executable?
View 2 RepliesI am trying to differentiate between a debugging session on the localhost and a live environment in terms of calls to the WS.
View 5 RepliesI have a problem by getting session which created for new site visit or session expired.
View 3 RepliesWhen a .NET server control is rendered in a browser it is rendered as a html control. Then how a browser differentiate between a server control and a html control. If the two control rendered as same then how server side events fire for a server control? If u say by using runat="server" attribute then also we can add runt="server" for html controls to work at server side... so then how these are recognized?
View 11 RepliesI am looking details on the internal working of asp.net architecture. The topics need to include the following:
Asp.Net Thread/Application Pools HttpRuntime HttpApplication - When and how it is set up How HttpContext is set up How objects can passed along the pipeline using HttpContext.Current.Items Why does modification of static variables requires locks in ASP.NET (advanced)IIS 7 Integration Mode
I am new to MVC framework. I am having issue as follows,I am having "txtUsername" textbox inside my view (myView.aspx). The same control also avialble in my usercontrol(MyUserControl.ascx).In my view i am rendering this usercontrol as follows
<% = Html.Textbox("txtUsername")%>
<% Html.RenderPartialView("MyUserControl")%>
I am can able to access this both textbox in view and usercontrol in controller class as follows
ViewData["txtUsername"] = "Text from Controller";
Here how do i differentiate these controls. If i run the application both textbox from view and user control filled by the text"Text from Controller". I dont want to fill the text with view's textbox.
i want to create a centralised business or Service authendication architecture in .net. for example, we have a clients like c1, c2, c3, c4, ... etc. everybody logins seperatly as well as grouply. ie, if client "C1" logins [with login authentication] he can access c2 , c3, c4 also without login authendication. So its like a google. if we enters gmail account, we can access orkut, picasa like that.. i need the cetralised architecture.
And, client "c1" seperately asks seperately how will be the authendication architecture.
so give me the single solution for both these two scenarios. how will be the architecture for these two and how is the Data Base (Login) Structure.
recently i've studied on ADO.NET's Entity Model Framework and say 'wow' as ORM is one of the fevourite pattern i practice..but suddenly i've come to an ambiguous situation when i'm going to start. i usually follow the following 3-tier architecture..
1. UI Layer
2. BLL - business logic layer
3. DAL - Data Access Layer
a. DTO / DAO
b. Gateway (contains the sql query/stored procedure and connection with DB)
now when i'm going to use the Entity Model Design,where the DBML/ .edmx File should be placed? Because many a times i'm using the DBML file as DTO because of the mapped objects.. in the same time, sometimes DBML ( .edmx file in .NET 4.0) contains CRUD methods and stored procedured method as well as methods with different selection operations,- which should be in Gateway. so where the .edmx file should be placed !?!! IN DTO namespace !? or in Gateway namespace!
moreover sometimes there is no need for the BLL which breaks the rules of inter-layer-communication (UI > BLL > DAL.Gateway)! what makes me confuse is, what should be the ideal n-tier architecture when i'll use the ADO.NET Entity Model Design Framework
I am working on 3 tier architecture: UI, BL, DAL. In my UI i have following code for Asynchronous page processing:
[Code]....
But I want a database fetch operation to be performed in this asyncronous method. And due to 3 tier arch. i am unable to do this in UI Layer. Can anyone guide me that how can I implement Asynchronous processing in 3 tier architecture? Note: If you are going to place EndAsyncWork1 in DAL then show that how can I return a value back to UI layer from this function.
[Code]....
I want to know that What are the factors if we use methods on each .cs page for connection and executing query on each aspx code behind page rather then using BAL .
How our application get affected in terms of performance and speed or other way?
when we put our website on server after publish/compile in general approach (using query in C# code behind) rathor than using stored procedures?
then which logic is better and why ?
Using C#, is there are way to differentiate between ConnectionStrings in the machine.config and the web.config? I would like to iterate over the collection in the web.config but not those from the machine.config. ASP.NET 3.5, C#
View 4 RepliesWhile using a third party dll I was getting the following exception - "exePath must be specified when not running inside a stand alone exe" with following trace
System.Configuration.ConfigurationManager.OpenExeConfigurationImpl(ConfigurationFileMap fileMap, Boolean isMachine, ConfigurationUserLevel userLevel, String exePath).
The reason I found was that it was looking for app.config and I had provided the details in web.config. My question is why does the system.configuration differentiate between web.config and app.config.
How would i differentiate at server if the request is coming from Win 2k3 machine or Win xp 64 bit machine. I tried using navigator.useragent to find the Client machine OS. But here Windows NT 5.2 is same for both the OS. Is there any way to distinguish it at server.
View 3 Replies