Architecture :: Encapsulation Doubt In The Code?
Nov 26, 2010
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]....
View 5 Replies
Similar Messages:
Feb 14, 2011
I cannot differentiate b.w Abstraction and Encapsulation.Could anyone explain diff b/w these two together with some c# examples?
View 9 Replies
Mar 13, 2010
when we write all our application methods and variables in a classes is nothing but data abstraction and encapsulation.Is it right?
View 2 Replies
Oct 18, 2010
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
View 2 Replies
Mar 25, 2010
I'm using WCF service in my project.my doubt iswhen i used WCF service in windows application after each time a sevice is called i need to close it otherwise it will gives an error.
serviceClient objService = new serviceClient();
try
{
[code]...
View 1 Replies
Jan 4, 2011
1. 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.
View 4 Replies
Apr 10, 2010
I've a project of a web application that all the code is in vb.net. If I want to put a new page written in C# is that possible ?
View 2 Replies
Jul 9, 2010
i have a asp.net application which is currently working in LAN / intranet my is the development server in which i have all the files , images and other functionalities its confiured thr' IIS so that other clinets in the INTRANET can access the aoolication. i have a email module which works fine . using this e mil modules i sent emails conating images, hyperlinks text etc to the gmail, yahoo etc ids and accessed it from my debelopment system asweel from other systems in the network.all of them work fine but if i sent it to a person who access the email outside the INTRANET the images nor the hyperlinks are displayed.only the text matter is displayed.
View 26 Replies
Aug 2, 2010
I am very new to thegridview control. As while searching for sample coding to edit the Gridview datas during runtime,i got the following codings protected void Edit(object sender, GridViewEditEventArgs e)
View 4 Replies
Oct 29, 2010
I have doubt in XML using in asp.netIn my project there are 15 forms and all are coded using C# and now I am going to add a new form using VB. And all the data using inside if that VB form from XML file.I have a Doubt How to write code inside to make connection with my SQL server 2008 and database.How to use Query String for retrieving data from data base and pass it to VB formPlease Do help me with small coding file with a little description.I am developing this form for to Create Event Calendar in ASP.net
View 1 Replies
Oct 14, 2010
I've moved away from using sqldatasources, and now I exeucte all my sql in my code behind. However, I'm looking to make my codebehind a little more cleaner/neater. For example, on one page, there are three stored procedures that must execute, and All three have these same 8 lines of code for each of my three stored procedures. How can I condense my code behind to not always have to add this...
SqlConnection conn = default(SqlConnection);
SqlCommand comm = default(SqlCommand);
SqlDataReader reader = default(SqlDataReader);
string connectionString = ConfigurationManager.ConnectionStrings["xyz"].ConnectionString;
conn = new SqlConnection(connectionString);
comm = new SqlCommand();
comm.Connection = conn;
comm.CommandType = System.Data.CommandType.StoredProcedure;
View 10 Replies
Jan 6, 2010
Presently I am working using single tier architecture. Now I am wanting to learn how to write code using 3 tier architecture.
View 8 Replies
Nov 3, 2010
I am not sure exactly which topic this post should go under...
Here is what I am doing.
I have a web form where a person will edit their blog article. At some point, once they are done editing, they can click a button "Publish Blog Now".
Once the blog is published in the click event on the server side I am doing a query to get a list of subscriber email address.
These are people who subscribed to this blogger and wish to receive an email notification whenever this person publishes a new blog.
What I just realized today is that my hosting provider only allows me to send a maximum of 200 emails per hour. Which means in my loop I need to sleep for roughly 20 seconds between each email notification sent. But I dont want the user who clicked the publish button to have to sit there and wait while that process is going.
How can I return to the user but yet continue to run some code on the server side to send out the emails in the background even if user closes web browser?
This is an ASP.NET web application targeting .net 4.0 and I am using c# as my back-end language and VS2010 as my development tool.
View 7 Replies
Aug 3, 2010
I just want to ask , how to claer logics , and how to think Logically While writting code ... As i am working from the past 4 months My Seniors always ask me to think logicaly just post this qusetion bcoz i thought these things are happening to me ?
View 5 Replies
Mar 21, 2011
I got loads of website, that share one of two baseclasses. I need the two baseclasses to be able to share part of the same code. I dont want to have to duplicate the shared code per baseclass.
so.. I got a page.aspx that inherits the baseclass and that inhertis 'sub' baseclass that inherits the web.ui.page class. So far so good :-)
In my baseclass I got a Public (at the top of the class not in any method- not sure of the proper term) Varable that is constructed from a structure in the BO class.
it Public PageDetails AS CoreDomainSetupBO.GetStartUpDetails = {database method}
I need the pagedetails to be available in the sub baseclass but it cant be defined there as the page details value is defined differently in the different base classes.
I hope that makes sense, I need to sub base class to be able to use a property that is defined at baseclass level.
View 3 Replies
Feb 14, 2011
How do I measure code quality in VS 2010. What I am specifically looking for is Industry standards How do I measure this
View 1 Replies
Oct 4, 2010
I am creating an authentication service. This service has one of the methods to validate username and password and return a status based on it.
The validation method has bunch of things to check before it can say user is valid. This method has a pseudo code similar to this:
If UserName and Password is correct
If User Account is Locked (due to invalid attempts)
{[code]....
As you can see there are lots of if else statements that I am writing. It looks more like a procedural programming rather than object oriented.How can I fit such kind of code in object oriented pattern?
View 2 Replies
Nov 24, 2010
find a free 3-Tier Code Generator for asp.net .
View 2 Replies
Jul 20, 2010
If an error happens in the DA_layer, how do I pass it do the code_bedhing to show the user?
[Code]....
View 3 Replies
Oct 4, 2010
I 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
View 1 Replies
Sep 22, 2010
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.
View 3 Replies
Dec 25, 2010
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
View 4 Replies
Jul 30, 2010
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]....
View 1 Replies
May 20, 2010
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 ?
View 8 Replies
Apr 28, 2010
I have implemented the 3-tier architecture project; DAL, BAL, and presentation layer are three layers in it. I am going to implement the following scenario:
Presentation layer calls to a function in the BAL layer which returns 2 string variable, and in turn this function from BAL layer calls to a DAL layer function which also returns 2 string variable. How can I implement the above scenario?
View 2 Replies