Interaction Between WCF, DAO And DTO Layers In An Application
Feb 25, 2011
how the WCF, DAO and DTO layers communicate with each other? I would appreciate if someone can specify which layer comes first and then how it interacts with the next layer
View 1 Replies
Similar Messages:
Aug 4, 2010
I want to understand the interaction of telephone with webforms application.
In order to do that I want to create a small application which will be able to receive multiple calls at a time, place them in a queue and then forward calls one by one to a call answerer.
It should also be able to retrieve the Caller Id i.e number from which the call is being made.
How this may be achieved?
If there is any ready made solution available with source code pls provide links.
View 2 Replies
Apr 19, 2010
I am using layered architecture in dotnet (mostly I work on web projects). I am confuse what layers should I use ?
I have small idea that there should be the following layers.
user interface
customer types (custom entities)
business logic layer
data access layer
My purpose is sure quality of work and maximum re-usability of code.
some one suggested to add common types layer in it. Please guide me what should be layers ? and in each layer what part should go ?
View 5 Replies
Nov 4, 2010
While designing (and then implementing) a layered application:
Is it correct to use the same ORM objects accross all layers? (which would go against encapsulation).
Or the presentation, business and data layer should each have their own objects? (which would lead to lots of code repetition).
e.g. (just to illustrate the question): if one uses Linq to SQL in the Data Layer and Visual Studio's O/R designer to generate the ORM objects, are those objects supposed to be used in the Business and Presentation Layers as well.
i.e.: Are the objects associated with the entities that the application handles a crosscutting issue?
View 1 Replies
Jan 26, 2010
I'm trying to create my first Asp.Net application from scratch. Tried to create this post in some of the other forums but I couldn't find a better place.
So, as the title says, I'm having trouble trying to model my application. I'm like an OOP newbie. I'll show my classes first and then I'll write my questions.
Model Layer
public class User
{
private int id;
public int Id { get { return id; } set { id = value; } }
private string login;
public string Login { get { return login; } set { login = value; } }
private string password;
public string Password { get { return password; } set { password = value; } }
}
Data Access Layer
public class BasicDAL
{
private SqlConnection connection;
//>>Returns a new connection to the database
public SqlConnection GetConnection()
{
//>>If connection is active close it before starting a new one
if (connection != null)
if (connecion.State != ConnectionState.Closed)
connection.Close();
connection = new SqlConnection("MyConnectionStringHere");
return connection;
}
}
public class UserDAL : BasicDAL
{
//>>Insert a new user
public void Insert(User user); { /* Insert into DB */ }
//>>Authenticate user login with its password
public void Authenticate(User user); { /* Authentication code here */ }
}
Business Logic Layer
[Code]....
So, model layer is pretty simple. Just a user representation. On the Data Access Layer I have a basic class with a GetConnection method. All DAL classes will extend this one.
My first problem lies on Business Logic Layer. With the above scenario, I've placed the same methods that I placed at the DAL. BLL methods would call DAL. As simple as that but I believe It is not the best way to do it, is it? How can I improve those classes?
Also, I have to "try..catch" blocks. That's because I can't find good places for it. I mean, if I place a try..catch on GetConnection method, for instance, how my ASPX page would get this error? How my ASPX page can tell the difference between "database offline" and "sql syntax error" when executing "userBll.Insert(newUser);".
My problem is mainly placing the exception handlers. I understand I would probably have to change return type of some methods. I didn't change because I believe that will have something with the exception handlers.
Btw, please assume I can't use TableAdapters and stuff like that. I would like to create all layers by myself.
View 3 Replies
Mar 13, 2010
Here is the scenario.
Every project has a Supervisor.
When I select the supervisor for a particular project, I'm using a dropdownlist.Table is like this
ProjectId | SupervisorId | ......
--------------------------------------
1 | 1
In my application, I'm binding a Collection of Supervisor type, which I'm feeling that it is an additional overhead. Becuase I only want his ID. So binding an object collection to the dropdown which seems no worth.
View 5 Replies
Apr 1, 2010
I have question about N-tier architecture. everyone about 3-Layer architecture these are:
1). UI Layer,
2). Business Layer,
3). Data Access Layer.
i already have worked on this.
Then i heard about LINQ to sql. how many layer an web application should contain.
As my knowledge. if i use LINQ to slq then i have to worked only 2-Layer:
- Data Acess/Business Layer: which contains only *.dbml files which is my database and
- UI Layer: which contains *.aspx files.
View 3 Replies
Mar 3, 2011
N - Layered Application: One class library for all layers or for each layer?
View 5 Replies
Apr 23, 2010
We have many instances in our application where we would like to be able to access things like the currently logged in user id in our business domain and data access layer. On log we push this information to the session, so all of our front end code has access to it fairly easily of course. However, we are having huge issues getting at the data in lower layers of our application. We just can't seem to find a way to store a value in the business domain that has global scope just for the user (static classes and properties are of course shared by the application domain, which means all users in the session share just one copy of the object). We have considered passing in the session to our business classes, but then our domain is very tightly coupled to our web application. We want to keep the prospect of a winforms version of the application possible going forward.
View 3 Replies
Apr 4, 2011
I built a scraper for an ASP.NET site (specifically a Jenzabar course searching portlet) that would create a new session, load the first search page, then simulate a search by posting back the required fields. However, something changed, and I can't figure out what, and now I get HTTP 500 responses to everything. There are no new fields in the browser's POST data that I can see.I would ideally like to figure out how to fix my own scraper, but that is probably difficult to ask about on StackOverflow without including a ton of specific contex
View 4 Replies
May 18, 2010
I have written this code for opening a text file ,but its saying that file not found.
[Code]....
View 5 Replies
Jun 26, 2010
Basically I have a page where a user can select up to 3 vehicles by make and model. I have 3 divs on the page that is generated with a basic foreach loop. When the user selects a make and model from respective dropdown lists I am firing a javascript function that returns a JSonResult that loads a dynamic partial view into a seperate div. This partial view displays a div with a grid whereby the user can select one of n-number of services using a checkbox.Next what I would like to do is if the user selects a servce for the one of the vehicle selections, I would like to add this selection to a list of "ServiceSelection" that is part of my viewmodel. Ultimately the user would click a button that would redirect to the next step in the process and pass the entire updated viewmodel to this new page.
View 1 Replies
Jan 9, 2010
I am working on a web application project in which i add a dynamic number of LinkButtons at runtime according to user selection, each link should redirect the user to a specific web page ,but what actually happened is that the last hyperlink is the only one responded! the following code show the declaration :
''''''''Public WithEvents ItemName As LinkButton
''Public Sub AddLinkButtons
''''''''For i = FirstIndex To StopFlag
''''''''ItemName = New LinkButton
''''''''ItemName.Text = Dt.Rows(i).Item(1)
''''''''Me.ContentTD.Controls.Add(ItemName)
''''''''Next
''End Sub
''''''''Private Sub ItemName_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ItemName.Click
''''''''SelectedItemToFind.ItemFlag = 1
''''''''SelectedItemToFind.SelectedItem = sender.Text
''''''''Response.Redirect("Default.aspx?Main=SearchResult")
''''''''End Sub
View 4 Replies
Oct 8, 2010
.net has all these build in GUI elements. The purpose is that we build a .net web application and for the coding itselve I'm very familiar with jQuery in PHP but I noticed that in .Net everybody starts using it too.Is jQuery the best way these days to deal with this in .NET (c#)? or are there others you might recommend?
View 5 Replies
May 31, 2010
I read some article about unitOfwork and repository but i'm still confused about how they interact, and how to use them in the right way.
I'm using an addressbook project to practise on patterns (even if , likely, patterns are not usefull) without any ORM framework for persistence.
My domain objects are (at now) : AddressBook (acts as an application controller), Contact (contains information about each contact in the address book), ContactGroup (mantain collections of contact).
Should i have to use distinct repository object for contact ad contactgroup?
I thought to use a UnitOfWork for the operation about the adding/removing contact to group : the user can add existing contact to a group, create a new contact while adding it to the group or remove contact from group.
View 1 Replies
May 5, 2010
Learning how to do a master page in asp.net. Trying to figure out how my style sheet interacts with respects to the master page and content page. I can get HTML tags like body and the style sheet to react. But when I call the ID attribute of a label no styling takes place. What am I missing here as far as interaction? BTW I'm using VS2008
CSS sample:
body
{
height:1200px;
width:920px;
border-style:solid;
border-color:blue;
padding:10px 10px 10px 10px;
}
#toptext1
{
position:relative;
top:-225px;
right:-500px;
font-size:22px;
font-weight:bold;
}
From the master page:
<body>
<form id="form1" runat="server">
<asp:image id="cookNookLogo" ImageUrl="images/Logo.gif" runat="server"
AlternateText="CookNook" Width="449px"></asp:image>
<p>
<asp:Label ID="toptext1" runat="server" Text="Quality Recipes, Hints and Supplies"></asp:Label>
</p>
From the content page:
<%@ Page Language="C#" MasterPageFile="~/CNMasterPage.master" AutoEventWireup="true" CodeFile="Home.aspx.cs" Inherits="Home" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<link href="App_Themes/cn/cn.css" rel="stylesheet" type="text/css" />
</asp:Content>
When I was doing this without a master page it worked so where am I going wrong with the attributes?
View 2 Replies
Dec 11, 2010
I have several ASP.NET sites, hosted on the same domain (different subdomains) and working via HTTPS. I have WCF service, hosted on the same domain. I have a separate state server for sessions.
All sites use cookieless session (if someone asks why - i will reply later, but it's a 'must')
On my sites, I use grid components from Telerik (but actually it does not matter) that ask for data from WCF service and must be filled with this data.
The problems are:
1) I cannot manage to make POST request to WCF service from javascript: for some reason it's always either GET or OPTIONS (no matter if I use Sys.Net.WebServiceProxy invoke or just a plain jquery AJAX request). It happens even if I indicate COOKIE mode, not cookieless. Maybe because of this I am getting "405 Method not allowed" error - WCF is set for POST request, but the site sends GET...
2) I cannot manage to retrieve SESSION from my websites! I tried approach, that I found, but WCF always uses OWN session, instead of 'connecting' to existing ASP.NET session, despite on ASP.NET compatibility mode. I need SESSION to exchange data between my sites and WCF service
3) I don't have idea currently, how to manage security when exchanging data between mentioned ones, in the light of above-mentioned problems...
4) I don't know exactly, how web.config for WCF service should look like in my case, because I've seen tons of different variants, but all for some simple cases.
Would be really appreciated for the help! I'm stuck for 2 or 3 weeks already, far behind the plan, but nothing still works... I can see there are some pieces of info about similar problems, but I'm afraid to miss some small thing - in web.config or method attribute or IIS setting, etc - and f... up everything.
View 3 Replies
Apr 12, 2010
I have 2 nested master pages, lets call them MP1 and MP2. MP1 is top level, MP2 is level
2. Then I have several content pages. Lets say I have 2 content pages for now CP1 and CP2. Each content page has a form that will have some user input and a SaveData()function that saves the data to a database. Each content page also has a "Save" button that calls the SaveData() function.
MP1 and MP2 have several link buttons. The functionality I need is this: Any time a user clicks on a link button in MP1 or MP2, the SaveData() function of the currently loaded page should be called. This is to save the data even if the user forgets to click the "Save" button before leaving the page.
So far I can do this from the link buttons in MP2. I followed the master pages tutorial # 7
In the .cs file for MP2, I declare:
public event EventHandler SaveData;
then i raise a "SaveData" event any time a link button in MP2 is clicked.in every content page (CP1, CP2 etc.) aspx file, I have Master Type directive to assign the Master Page to MP2.
in CP1, CP2 etc .cs file, i have the following code:
protected void Page_PreInit(object sender, EventArgs e)
{
//wire up the SaveData event from MP2 to Master_SaveData function in this page.
Master.SaveData += new EventHandler(Master_SaveData);
}
private void Master_SaveData(object sender, EventArgs e)
{
//when the MP2 SaveData event is raised, save the data in this page.
SaveData();
}
All of this works fine.Problem is I am not able to do a similar thing from MP1.What I have tried so far is to raise an event in MP1 that is handled in MP2. When the event is handled in MP2, it raises the SaveData event to be handled in the page. The event in MP1 is null and hence never raised.
View 5 Replies
Nov 10, 2010
I am building a web application where i am using multilingual support.
I am using variable for label text display.so that administrator can change in one area and that text reflects throughout the application.
which is better less time consuming for display label text?
1)using relational db interaction.
2)constant variable.
3)xml interaction.
how could I found/calculate the processing time of the above three.
View 2 Replies
Jan 18, 2011
i had one .aspx page,which containts in pageload it excutes few stored procesdures for dumping data from Sql Server to mysql Db. So every 30 mints User manulaly running this page.
So i want to automate this page Every 30 mints it automatically should Excutes that page.with out User intaraction.24/7 process.
how to do this. no one want to touch the application.it should be automate..
View 4 Replies
Jan 19, 2011
Firstly there's a great overview of the IIS7 HTTP request lifecycle and various settings that affect performance here:
ASP.NET Thread Usage on IIS 7.0 and 6.0
Very specifically though, in dotNet 4 the defaults for maxConcurrentRequestsPerCPU and requestsQueueLimit are set to 5000. E.g. equivalent to: (in aspnet.config):[code]....
Seems to me that on a multi-CPU/core server the requestQueueLimit here will always be invoked well berfore the 'perCPU' limit. Thus, if a max of 5000 requests per CPU is what you actually want then I would expect that the requestQueueLimit needs to be increased to 5000 * CPUCount or just disabled altogether.
Is my interpretation correct? If so can I disable requestQueueLimit? (set it to zero?). The documentation on this setting doesn't appear to address this question (so maybe I'm missing something or misreading?)
** side note from the above article: The requestQueueLimit is poorly named. It actually limits the maximum number of requests that can be serviced by ASP.NET concurrently. This includes both requests that are queued and requests that are executing. If the "Requests Current" performance counter exceeds requestQueueLimit, new incoming requests will be rejected with a 503 status code)
View 4 Replies
Mar 7, 2010
I have a form with mulptile panels hidden behind others. It is impossible to edit them in design mode without moving them to the side so that all panels are visible, so that is what I do. I use JavaScript to position the panels during runtime, but it is an innefecient way to do it.
Is there a way to make a panel or layer visible or invisible while working in design mode, kind of like autocad works
View 1 Replies
Nov 18, 2010
I want to use Linq to SQL in my web projects. I mostly work in small and medium size projects. Please guide me what layers I should use ?
Previously I was using DAAB and was using 4 layers (business objects, business logic layer, data access layer and user interface).
View 5 Replies
Nov 1, 2010
Split off from http://forums.asp.net/t/1618613.aspx
I would like to get your advise on Dependency Inversion..Should i include it as a layer between Business Layer and Repository Layer?
I think its really great when different team members work on DAL n BAL etc or when your database will be changed in future. It actually removes the dependency of the Data provider but over the expense of additional coding overhead. My question is , is it really worth it? If i suggest this layer to my PM and give him the above two reasons then i dnt think he will accept it since most of the time each developer works on his DAL/BAL's, and Change in DB wud be the least of his concerns.
RAD in every layer..
I mean if there are any auto generation tools available for generating repositories etc.I read about MVCContrib Grid and i think its a good option to use for Grid.
If i use Spark ViewEngine then can i still use T4 templates to auto create custom views by customizing templates?
View 2 Replies
Jul 6, 2010
I have three layers like UI, business and data access in my asp.net web application project. If I pass say a company code from the UI to the business to the data access and I query the company details like company name, address, phone etc from the database using sqlhelper executedataset() which wil return me a dataset. Then how do I pass these company details back to the UI layer. Is it correct to just pass the datatable object to the business and UI.
View 6 Replies